[llvm] [LICM] Improve LICM when calls only change Inaccessible memory (PR #169379)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 26 07:43:18 PST 2025
================
@@ -277,6 +277,17 @@ static bool areLoadsReorderable(const LoadInst *Use,
return !(SeqCstUse || MayClobberIsAcquire);
}
+bool hasInaccessibleMemoryClobber(const CallBase *CallFirst,
+ const CallBase *CallSecond) {
+
+ MemoryEffects ME1 = CallFirst->getMemoryEffects();
+ MemoryEffects ME2 = CallSecond->getMemoryEffects();
+ if (CallFirst->onlyAccessesInaccessibleMemory() ||
+ CallSecond->onlyAccessesInaccessibleMemory())
----------------
CarolineConcatto wrote:
I am not sure why exposing memory effects for both calls inside instructionClobbersQuery function is better than hidden inside the function hasInaccessibleMemoryClobber.
Do you mind explaining what is the reason?
https://github.com/llvm/llvm-project/pull/169379
More information about the llvm-commits
mailing list