diff options
author | Owen Anderson <resistor@mac.com> | 2011-08-02 02:23:42 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-08-02 02:23:42 +0000 |
commit | 9b7fdc7e8af26b65c9afdee45d4ec0b22c8a17c8 (patch) | |
tree | 7e6632ae2ae784824a916088ccae892b165e5c05 /lib/Transforms/Scalar/Reassociate.cpp | |
parent | 74699fda1598c3c30c1a237fe7e75b11d1a53596 (diff) | |
download | llvm-9b7fdc7e8af26b65c9afdee45d4ec0b22c8a17c8.tar.gz llvm-9b7fdc7e8af26b65c9afdee45d4ec0b22c8a17c8.tar.bz2 llvm-9b7fdc7e8af26b65c9afdee45d4ec0b22c8a17c8.tar.xz |
Revert r136503 and r136480 in an effort to fix non-determinism in the llvm-gcc buildbots on i386. Devang is looking into the root cause.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136674 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r-- | lib/Transforms/Scalar/Reassociate.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp index 1080b75ed0..e6341ae307 100644 --- a/lib/Transforms/Scalar/Reassociate.cpp +++ b/lib/Transforms/Scalar/Reassociate.cpp @@ -75,7 +75,6 @@ namespace { class Reassociate : public FunctionPass { DenseMap<BasicBlock*, unsigned> RankMap; DenseMap<AssertingVH<>, unsigned> ValueRankMap; - DenseMap<Value *, DbgValueInst *> DbgValues; SmallVector<WeakVH, 8> RedoInsts; SmallVector<WeakVH, 8> DeadInsts; bool MadeChange; @@ -105,9 +104,6 @@ namespace { void ReassociateInst(BasicBlock::iterator &BBI); void RemoveDeadBinaryOp(Value *V); - - /// collectDbgValues - Collect all llvm.dbg.value intrinsics. - void collectDbgValues(Function &F); }; } @@ -348,11 +344,6 @@ void Reassociate::LinearizeExprTree(BinaryOperator *I, void Reassociate::RewriteExprTree(BinaryOperator *I, SmallVectorImpl<ValueEntry> &Ops, unsigned i) { - // If this operation was representing debug info of a value then it - // is no longer true, so remove the dbg.value instrinsic. - if (DbgValueInst *DVI = DbgValues.lookup(I)) - DeadInsts.push_back(DVI); - if (i+2 == Ops.size()) { if (I->getOperand(0) != Ops[i].Op || I->getOperand(1) != Ops[i+1].Op) { @@ -1103,7 +1094,6 @@ Value *Reassociate::ReassociateExpression(BinaryOperator *I) { bool Reassociate::runOnFunction(Function &F) { - collectDbgValues(F); // Recalculate the rank map for F BuildRankMap(F); @@ -1123,22 +1113,11 @@ bool Reassociate::runOnFunction(Function &F) { // Now that we're done, delete any instructions which are no longer used. while (!DeadInsts.empty()) if (Value *V = DeadInsts.pop_back_val()) - if (!RecursivelyDeleteTriviallyDeadInstructions(V)) - if (DbgValueInst *DVI = dyn_cast<DbgValueInst>(V)) - DVI->eraseFromParent(); + RecursivelyDeleteTriviallyDeadInstructions(V); // We are done with the rank map. RankMap.clear(); ValueRankMap.clear(); - DbgValues.clear(); return MadeChange; } -/// collectDbgValues - Collect all llvm.dbg.value intrinsics. -void Reassociate::collectDbgValues(Function &F) { - for (Function::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI) - for (BasicBlock::iterator BI = FI->begin(), BE = FI->end(); - BI != BE; ++BI) - if (DbgValueInst *DVI = dyn_cast<DbgValueInst>(BI)) - DbgValues[DVI->getValue()] = DVI; -} |