diff options
| author | Carlos Alberto Enciso <carlos.alberto.enciso@gmail.com> | 2018-10-10 12:09:34 +0000 |
|---|---|---|
| committer | Carlos Alberto Enciso <carlos.alberto.enciso@gmail.com> | 2018-10-10 12:09:34 +0000 |
| commit | c0952c8a08098f7d1f97d468d445cb94b034699f (patch) | |
| tree | b39e17a5b82650366d7d19144fe7ea28c2ab1789 /llvm/lib/Transforms/Utils/SimplifyCFG.cpp | |
| parent | 52391ea0b3af40a2e7b2232e1c8b2a37cd1c0680 (diff) | |
| download | bcm5719-llvm-c0952c8a08098f7d1f97d468d445cb94b034699f.tar.gz bcm5719-llvm-c0952c8a08098f7d1f97d468d445cb94b034699f.zip | |
Revert "[DebugInfo][Dexter] Unreachable line stepped onto after SimplifyCFG."
This reverts commit r344120.
It was causing buildbot failures.
llvm-svn: 344135
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 3e73c537292..ebbcf800254 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -2375,10 +2375,24 @@ static bool FoldTwoEntryPHINode(PHINode *PN, const TargetTransformInfo &TTI, // Move all 'aggressive' instructions, which are defined in the // conditional parts of the if's up to the dominating block. - if (IfBlock1) - hoistAllInstructionsInto(DomBlock, InsertPt, IfBlock1); - if (IfBlock2) - hoistAllInstructionsInto(DomBlock, InsertPt, IfBlock2); + if (IfBlock1) { + for (auto &I : *IfBlock1) { + I.dropUnknownNonDebugMetadata(); + dropDebugUsers(I); + } + DomBlock->getInstList().splice(InsertPt->getIterator(), + IfBlock1->getInstList(), IfBlock1->begin(), + IfBlock1->getTerminator()->getIterator()); + } + if (IfBlock2) { + for (auto &I : *IfBlock2) { + I.dropUnknownNonDebugMetadata(); + dropDebugUsers(I); + } + DomBlock->getInstList().splice(InsertPt->getIterator(), + IfBlock2->getInstList(), IfBlock2->begin(), + IfBlock2->getTerminator()->getIterator()); + } while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) { // Change the PHI node into a select instruction. |

