summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-27 22:50:07 +0000
committerChris Lattner <sabre@nondot.org>2009-11-27 22:50:07 +0000
commit971fd57f7d8f6496c5170499ac40ddee538488b3 (patch)
tree3a789c680b86de96a2a3b693e2d53671e0bc6ef9 /lib
parent6f7b210b2577fbc9247a9fc5223655390008ae89 (diff)
downloadllvm-971fd57f7d8f6496c5170499ac40ddee538488b3.tar.gz
llvm-971fd57f7d8f6496c5170499ac40ddee538488b3.tar.bz2
llvm-971fd57f7d8f6496c5170499ac40ddee538488b3.tar.xz
disable value insertion for now, I need to figure out how
to inform GVN about the newly inserted values. This fixes PR5631. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90022 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/GVN.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp
index 18cfd2208d..cdc3a4efc1 100644
--- a/lib/Transforms/Scalar/GVN.cpp
+++ b/lib/Transforms/Scalar/GVN.cpp
@@ -1437,10 +1437,16 @@ bool GVN::processNonLocalLoad(LoadInst *LI,
//
// FIXME: This may insert a computation, but we don't tell scalar GVN
// optimization stuff about it. How do we do this?
+#if 0
Value *LoadPtr =
MD->InsertPHITranslatedPointer(LI->getOperand(0), LoadBB,
UnavailablePred, TD, *DT);
-
+#else
+ Value *LoadPtr =
+ MD->GetAvailablePHITranslatedValue(LI->getOperand(0), LoadBB,
+ UnavailablePred, TD, *DT);
+#endif
+
// If we couldn't find or insert a computation of this phi translated value,
// we fail PRE.
if (LoadPtr == 0) {