[llvm] r346798 - [MemorySSA] Create query after checking if instruction is a fence.
Alina Sbirlea via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 13 13:12:49 PST 2018
Author: asbirlea
Date: Tue Nov 13 13:12:49 2018
New Revision: 346798
URL: http://llvm.org/viewvc/llvm-project?rev=346798&view=rev
Log:
[MemorySSA] Create query after checking if instruction is a fence.
The alternative is checking if I is a fence in the Query constructor, so
as to not attempt to get a non-existent MemoryLocation.
Modified:
llvm/trunk/lib/Analysis/MemorySSA.cpp
Modified: llvm/trunk/lib/Analysis/MemorySSA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemorySSA.cpp?rev=346798&r1=346797&r2=346798&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemorySSA.cpp (original)
+++ llvm/trunk/lib/Analysis/MemorySSA.cpp Tue Nov 13 13:12:49 2018
@@ -2199,13 +2199,14 @@ MemorySSA::CachingWalker::getClobberingM
return StartingAccess->getOptimized();
const Instruction *I = StartingAccess->getMemoryInst();
- UpwardsMemoryQuery Q(I, StartingAccess);
// We can't sanely do anything with a fence, since they conservatively clobber
// all memory, and have no locations to get pointers from to try to
// disambiguate.
- if (!Q.IsCall && I->isFenceLike())
+ if (!ImmutableCallSite(I) && I->isFenceLike())
return StartingAccess;
+ UpwardsMemoryQuery Q(I, StartingAccess);
+
if (isUseTriviallyOptimizableToLiveOnEntry(*MSSA->AA, I)) {
MemoryAccess *LiveOnEntry = MSSA->getLiveOnEntryDef();
StartingAccess->setOptimized(LiveOnEntry);
More information about the llvm-commits
mailing list