Rather than iterating over the whole function from the start until no
internal calls are found, process each block only once and continue
processing after splitting. This version of the function also does not
seemingly invalidate iterators from within the loop.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Thanks for improving the efficiency of fixCFGForPIC(). The change looks fine to me. Do you think the implementation will be simpler if we make Blocks a queue and add newly added blocks to the end? This way we can get rid of the inner loop and dealing with CurrentBB/NextBB.
Comment Actions
That makes totally sense. It somehow slipped my mind.
As far as I can tell, there is also no need for setting annotation in this function anymore. Is that correct?