diff options
| author | Piotr Padlewski <piotr.padlewski@gmail.com> | 2016-12-27 15:06:07 +0000 |
|---|---|---|
| committer | Piotr Padlewski <piotr.padlewski@gmail.com> | 2016-12-27 15:06:07 +0000 |
| commit | 2202aa97653bcfe8d21504d22652a0bf39d4031e (patch) | |
| tree | e954a602765d61e46dadd4a8502f0675c3168c12 /llvm/lib/Analysis | |
| parent | 5240a305a4c9047fdba15f4322f8f2cef6275eed (diff) | |
| download | bcm5719-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.cpp | 1 |
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)) |

