summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorPiotr Padlewski <piotr.padlewski@gmail.com>2016-12-27 15:06:07 +0000
committerPiotr Padlewski <piotr.padlewski@gmail.com>2016-12-27 15:06:07 +0000
commit2202aa97653bcfe8d21504d22652a0bf39d4031e (patch)
treee954a602765d61e46dadd4a8502f0675c3168c12 /llvm/lib/Analysis
parent5240a305a4c9047fdba15f4322f8f2cef6275eed (diff)
downloadbcm5719-llvm-2202aa97653bcfe8d21504d22652a0bf39d4031e.tar.gz
bcm5719-llvm-2202aa97653bcfe8d21504d22652a0bf39d4031e.zip
[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. llvm-svn: 290607
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/MemoryDependenceAnalysis.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
index dc5f9276fa5..647b1dec7c8 100644
--- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
@@ -353,6 +353,7 @@ MemoryDependenceResults::getInvariantGroupPointerDependency(LoadInst *LI,
// 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))
OpenPOWER on IntegriCloud