tblah wrote: > If I read the code correctly, `mergeFiniBB` merges all previous FiniBBs into > the new OtherFiniBB (why not make the new code use the existing pre-FiniBB by > emitting a branch to it?), and therefore effectively requires that all > FiniBBs branch to the the same exit. If so, could you add a comment for that > (in addition to "must not contain any non-finalization code")?
I designed this for the sections implementation using the static wsloop lowering. The OtherFiniBB is the basic block generated for the loop finalisation. I thought that replacing this block would be more invasive than re-using it. Then every "new" finalization block will just be a branch to OtherFini. There is only ever one real finalization block that contains more than a branch. It would be possible to avoid any intermediate blocks containing only the branch but that would have required more invasive changes. I was hoping to keep cleanups separate from functional changes. https://github.com/llvm/llvm-project/pull/164586 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
