https://github.com/Meinersbur commented:
> Instead of a single deallocation point, lists of those are used. This is to > cover cases where there are multiple exit blocks originating from a single > entry. If an allocation needing explicit deallocation is placed in the entry > block of such cases, it would need to be deallocated before each of the exits. Clang uses a pattern that uses only a single block for multiple exits: Assing each exiting block an unique number, jump to a single BB that impements the dtor, then `switch` to the successor of the exiting block according the that unique number. I assume this is done to reduce code size, LLVM JumpThreading pass can duplicate that block again depending on whether we optimize for size. https://github.com/llvm/llvm-project/pull/154752 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits