From 971fd57f7d8f6496c5170499ac40ddee538488b3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 27 Nov 2009 22:50:07 +0000 Subject: 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 --- lib/Transforms/Scalar/GVN.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib') 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) { -- cgit v1.2.3