[Mlir-commits] [flang] [llvm] [mlir] [mlir][llvm][OpenMP] Hoist __atomic_load alloca (PR #132888)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Mar 26 04:58:29 PDT 2025
================
@@ -118,8 +118,14 @@ AtomicInfo::EmitAtomicLoadLibcall(AtomicOrdering AO) {
Value *PtrVal = getAtomicPointer();
PtrVal = Builder->CreateAddrSpaceCast(PtrVal, PointerType::getUnqual(Ctx));
Args.push_back(PtrVal);
+
+ auto CurrentIP = Builder->saveIP();
+ BasicBlock &InsertBB =
+ Builder->GetInsertBlock()->getParent()->getEntryBlock();
----------------
NimishMishra wrote:
> This means that the entry block here is the original entry block of the function that contains the outlined operation not the entry block of the final outlined function.
Is that so? Thanks for pointing out. I thought the function outlining occurred before the codegen inside the function.
I'll then implement the stack save/restore solution.
https://github.com/llvm/llvm-project/pull/132888
More information about the Mlir-commits
mailing list