[llvm] [LICM] Improve LICM when calls only change Inaccessible memory (PR #169379)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 25 05:57:28 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())
----------------
arsenm wrote:
Isn't onlyAccessesInaccessibleMemory implemented in terms of MemoryEffects? Can you keep all of this in terms of MemoryEffects?
https://github.com/llvm/llvm-project/pull/169379
More information about the llvm-commits
mailing list