[Mlir-commits] [mlir] [mlir][llvm] Improve alloca handling during inlining (PR #75961)
Mehdi Amini
llvmlistbot at llvm.org
Wed Dec 20 01:15:20 PST 2023
================
@@ -50,11 +50,29 @@ static bool hasLifetimeMarkers(LLVM::AllocaOp allocaOp) {
static void
handleInlinedAllocas(Operation *call,
iterator_range<Region::iterator> inlinedBlocks) {
+ // The traversal's objective is to locate the entry block of the closest call
+ // site ancestor that has the automatic allocation scope trait. In pure LLVM
+ // dialect programs, this is the LLVM function containing the call site.
+ // However, mixed dialect programs may have other allocation scopes.
+ assert(call->getParentWithTrait<OpTrait::AutomaticAllocationScope>() &&
+ "expected call site to be in an automatic allocation scope");
----------------
joker-eph wrote:
I don't know how we can guarantee that this assert will never fail? What kind of verifier and other structural invariant prevents it?
https://github.com/llvm/llvm-project/pull/75961
More information about the Mlir-commits
mailing list