[llvm-branch-commits] [clang] [llvm] [mlir] [OMPIRBuilder] Add support for explicit deallocation points (PR #154752)
Michael Kruse via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Aug 22 04:00:55 PDT 2025
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
More information about the llvm-branch-commits
mailing list