diff options
author | Owen Anderson <resistor@mac.com> | 2009-12-03 03:43:29 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-12-03 03:43:29 +0000 |
commit | c9f2027adb6f700b0a2822cd9bee1d2623b0c9e5 (patch) | |
tree | 57c2f68322f576256bf13b205ba073c022457dd7 /lib | |
parent | 229694f0ee630ceabe96a8bd48952f6740f928b2 (diff) | |
download | external_llvm-c9f2027adb6f700b0a2822cd9bee1d2623b0c9e5.zip external_llvm-c9f2027adb6f700b0a2822cd9bee1d2623b0c9e5.tar.gz external_llvm-c9f2027adb6f700b0a2822cd9bee1d2623b0c9e5.tar.bz2 |
Fix this crasher, and add a FIXME for a missed optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index ceb57f8..cbe7add 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -1449,6 +1449,16 @@ bool GVN::processNonLocalLoad(LoadInst *LI, LoadPtr = MD->GetAvailablePHITranslatedValue(LI->getOperand(0), LoadBB, UnavailablePred, TD, *DT); } + + // Assign value numbers to these new instructions. + for (SmallVector<Instruction*, 8>::iterator NI = NewInsts.begin(), + NE = NewInsts.end(); NI != NE; ++NI) { + // FIXME: We really _ought_ to insert these value numbers into their + // parent's availability map. However, in doing so, we risk getting into + // ordering issues. If a block hasn't been processed yet, we would be + // marking a value as AVAIL-IN, which isn't what we intend. + VN.lookup_or_add(*NI); + } // If we couldn't find or insert a computation of this phi translated value, // we fail PRE. |