X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FTransforms%2FScalar%2FJumpThreading.cpp;h=c2caf48b76169ab455aeb23c274d40340257ad35;hp=b07b5d90898de6ec76437e15bf53af684919f020;hb=90c579de5a383cee278acc3f7e7b9d0a656e6a35;hpb=d13db2c59cc94162d6cf0a04187d408bfef6d4a7 diff --git a/lib/Transforms/Scalar/JumpThreading.cpp b/lib/Transforms/Scalar/JumpThreading.cpp index b07b5d90898..c2caf48b761 100644 --- a/lib/Transforms/Scalar/JumpThreading.cpp +++ b/lib/Transforms/Scalar/JumpThreading.cpp @@ -45,7 +45,10 @@ Threshold("jump-threading-threshold", // Turn on use of LazyValueInfo. static cl::opt -EnableLVI("enable-jump-threading-lvi", cl::ReallyHidden); +EnableLVI("enable-jump-threading-lvi", + cl::desc("Use LVI for jump threading"), + cl::init(false), + cl::ReallyHidden); @@ -76,7 +79,7 @@ namespace { #endif public: static char ID; // Pass identification - JumpThreading() : FunctionPass(&ID) {} + JumpThreading() : FunctionPass(ID) {} bool runOnFunction(Function &F); @@ -1314,6 +1317,9 @@ bool JumpThreading::ThreadEdge(BasicBlock *BB, << ", across block:\n " << *BB << "\n"); + if (LVI) + LVI->threadEdge(PredBB, BB, SuccBB); + // We are going to have to map operands from the original BB block to the new // copy of the block 'NewBB'. If there are PHI nodes in BB, evaluate them to // account for entry from PredBB.