`fanout_raise` in `refpruning` algorithm doesn't work on this subtle case
Continue from https://github.com/numba/numba/issues/9213 Tested with 0.39.1. I feel latest version still has this issue.
I found a subtle case for refcounting, which our refpruning algorithm under ffi can't prune it.
However, it should be in theory, since I think any path reaching raise block can be ignored?
Just want to make sure that you also think this's prunable. I do have a real case having this kind of pattern and have a workaround for this. Removing these refcounting calls can boost 5%~10% performance for my benchmark.
cc @sklam
However, it should be in theory, since I think any path reaching raise block can be ignored?
Yes, that's right. In other words, we pretend that the raise block has corresponding decrefs. The effect is that we allow the raise block to leak.