diff options
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index cdc3a4efc1..6311491c7d 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -1437,10 +1437,11 @@ 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? + SmallVector<Instruction*, 8> NewInsts; #if 0 Value *LoadPtr = MD->InsertPHITranslatedPointer(LI->getOperand(0), LoadBB, - UnavailablePred, TD, *DT); + UnavailablePred, TD, *DT, NewInsts); #else Value *LoadPtr = MD->GetAvailablePHITranslatedValue(LI->getOperand(0), LoadBB, @@ -1465,6 +1466,7 @@ bool GVN::processNonLocalLoad(LoadInst *LI, // we do not have this case. Otherwise, check that the load is safe to // put anywhere; this can be improved, but should be conservatively safe. if (!allSingleSucc && + // FIXME: REEVALUTE THIS. !isSafeToLoadUnconditionally(LoadPtr, UnavailablePred->getTerminator())) return false; |