[llvm] r290607 - [MemDep] Operand visited twice bugfix
Piotr Padlewski via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 27 07:06:08 PST 2016
Author: prazek
Date: Tue Dec 27 09:06:07 2016
New Revision: 290607
URL: http://llvm.org/viewvc/llvm-project?rev=290607&view=rev
Log:
[MemDep] Operand visited twice bugfix
Because operand was not marked as seen it was visited twice.
It doesn't change behavior of optimization, it just saves redudant
visit, so no test changes.
Modified:
llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=290607&r1=290606&r2=290607&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Tue Dec 27 09:06:07 2016
@@ -353,6 +353,7 @@ MemoryDependenceResults::getInvariantGro
// Queue to process all pointers that are equivalent to load operand.
SmallVector<Value *, 8> LoadOperandsQueue;
LoadOperandsQueue.push_back(LoadOperand);
+ Seen.insert(LoadOperand);
while (!LoadOperandsQueue.empty()) {
Value *Ptr = LoadOperandsQueue.pop_back_val();
if (isa<GlobalValue>(Ptr))
More information about the llvm-commits
mailing list