diff options
author | Renato Golin <renato.golin@linaro.org> | 2015-11-10 18:01:16 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2015-11-10 18:01:16 +0000 |
commit | 0e77d72b0ad39fb31d4a435497bd4610e61c586f (patch) | |
tree | 2574e11db523ab14deade6458b69a556ddf6f18f /llvm/lib | |
parent | fe68904fa6001b29930391722ba1d4401906cb99 (diff) | |
download | bcm5719-llvm-0e77d72b0ad39fb31d4a435497bd4610e61c586f.tar.gz bcm5719-llvm-0e77d72b0ad39fb31d4a435497bd4610e61c586f.zip |
Revert "Strip metadata when speculatively hoisting instructions"
This reverts commit r252604, as it broke all ARM and AArch64 buildbots, as
well as some x86, et al.
llvm-svn: 252623
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Analysis/LoopInfo.cpp | 7 | ||||
-rw-r--r-- | llvm/lib/Transforms/Scalar/LICM.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 5 |
3 files changed, 0 insertions, 16 deletions
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp index e679b7ad7b8..9ee72361c92 100644 --- a/llvm/lib/Analysis/LoopInfo.cpp +++ b/llvm/lib/Analysis/LoopInfo.cpp @@ -120,13 +120,6 @@ bool Loop::makeLoopInvariant(Instruction *I, bool &Changed, // Hoist. I->moveBefore(InsertPt); - - // There is possibility of hoisting this instruction above some arbitrary - // condition. Any metadata defined on it can be control dependent on this - // condition. Conservatively strip it here so that we don't give any wrong - // information to the optimizer. - I->dropUnknownNonDebugMetadata(); - Changed = true; return true; } diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index 6d70cdc3ade..ba39afd4287 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -672,10 +672,6 @@ static bool hoist(Instruction &I, BasicBlock *Preheader) { // Move the new node to the Preheader, before its terminator. I.moveBefore(Preheader->getTerminator()); - // Metadata can be dependent on the condition we are hoisting above. - // Conservatively strip all metadata on the instruction. - I.dropUnknownNonDebugMetadata(); - if (isa<LoadInst>(I)) ++NumMovedLoads; else if (isa<CallInst>(I)) ++NumMovedCalls; ++NumHoisted; diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index ff81e7d5acf..e0c598f92e2 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -1618,11 +1618,6 @@ static bool SpeculativelyExecuteBB(BranchInst *BI, BasicBlock *ThenBB, SpeculatedStore->setOperand(0, S); } - // Metadata can be dependent on the condition we are hoisting above. - // Conservatively strip all metadata on the instruction. - for (auto &I: *ThenBB) - I.dropUnknownNonDebugMetadata(); - // Hoist the instructions. BB->getInstList().splice(BI->getIterator(), ThenBB->getInstList(), ThenBB->begin(), std::prev(ThenBB->end())); |