diff options
| author | Philip Reames <listmail@philipreames.com> | 2018-08-30 00:12:29 +0000 | 
|---|---|---|
| committer | Philip Reames <listmail@philipreames.com> | 2018-08-30 00:12:29 +0000 | 
| commit | bed556133d81f99cc7a931ed94783a5d2860e00e (patch) | |
| tree | 68a2c616a5781036f283b016d93716edb3e954a5 /llvm/lib | |
| parent | 207863261ca5466bf529bbd13ba0502a649e00d0 (diff) | |
| download | bcm5719-llvm-bed556133d81f99cc7a931ed94783a5d2860e00e.tar.gz bcm5719-llvm-bed556133d81f99cc7a931ed94783a5d2860e00e.zip | |
[SimplifyCFG] Rename a variable for readibility of a future change [NFC]
llvm-svn: 341004
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 17 | 
1 files changed, 9 insertions, 8 deletions
| diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index f0ed075cce6..62a635fa38e 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -2713,16 +2713,16 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI, unsigned BonusInstThreshold) {      // Clone Cond into the predecessor basic block, and or/and the      // two conditions together. -    Instruction *New = Cond->clone(); -    RemapInstruction(New, VMap, +    Instruction *CondInPred = Cond->clone(); +    RemapInstruction(CondInPred, VMap,                       RF_NoModuleLevelChanges | RF_IgnoreMissingLocals); -    PredBlock->getInstList().insert(PBI->getIterator(), New); -    New->takeName(Cond); -    Cond->setName(New->getName() + ".old"); +    PredBlock->getInstList().insert(PBI->getIterator(), CondInPred); +    CondInPred->takeName(Cond); +    Cond->setName(CondInPred->getName() + ".old");      if (BI->isConditional()) {        Instruction *NewCond = cast<Instruction>( -          Builder.CreateBinOp(Opc, PBI->getCondition(), New, "or.cond")); +          Builder.CreateBinOp(Opc, PBI->getCondition(), CondInPred, "or.cond"));        PBI->setCondition(NewCond);        uint64_t PredTrueWeight, PredFalseWeight, SuccTrueWeight, SuccFalseWeight; @@ -2786,7 +2786,8 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI, unsigned BonusInstThreshold) {            Instruction *NotCond = cast<Instruction>(                Builder.CreateNot(PBI->getCondition(), "not.cond"));            MergedCond = cast<Instruction>( -              Builder.CreateBinOp(Instruction::And, NotCond, New, "and.cond")); +               Builder.CreateBinOp(Instruction::And, NotCond, CondInPred, +                                   "and.cond"));            if (PBI_C->isOne())              MergedCond = cast<Instruction>(Builder.CreateBinOp(                  Instruction::Or, PBI->getCondition(), MergedCond, "or.cond")); @@ -2795,7 +2796,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI, unsigned BonusInstThreshold) {            // PBI_C is true: (PBI_Cond and BI_Value) or (!PBI_Cond)            //       is false: PBI_Cond and BI_Value            MergedCond = cast<Instruction>(Builder.CreateBinOp( -              Instruction::And, PBI->getCondition(), New, "and.cond")); +              Instruction::And, PBI->getCondition(), CondInPred, "and.cond"));            if (PBI_C->isOne()) {              Instruction *NotCond = cast<Instruction>(                  Builder.CreateNot(PBI->getCondition(), "not.cond")); | 

