[llvm] [LICM] Improve LICM when calls only change Inaccessible memory (PR #169379)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 26 06:00:17 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:
Hello @arsenm,
Not sure I understand the question.
onlyAccessesInaccessibleMemory is checking the memory effect of the call. It calls onlyAccessesInaccessibleMem that check if the memory effect only access Inaccessible memory:
https://github.com/llvm/llvm-project/pull/169379
More information about the llvm-commits
mailing list