diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index 4d24cc90c5b..1eff0badb65 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -404,7 +404,7 @@ private: /// Try to set the current value used for the comparison, it succeeds only if /// it wasn't set before or if the new value is the same as the old one bool setValueOnce(Value *NewVal) { - if(CompValue && CompValue != NewVal) return false; + if (CompValue && CompValue != NewVal) return false; CompValue = NewVal; return (CompValue != nullptr); } @@ -1216,7 +1216,7 @@ HoistTerminator: if (!SI) SI = cast (Builder.CreateSelect(BI->getCondition(), BB1V, BB2V, - BB1V->getName()+"."+BB2V->getName())); + BB1V->getName() + "." + BB2V->getName())); // Make the PHI node use the select for all incoming values for BB1/BB2 for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) @@ -1878,10 +1878,10 @@ static bool FoldTwoEntryPHINode(PHINode *PN, const TargetTransformInfo &TTI, isa(IfCond))) return false; - // If we all PHI nodes are promotable, check to make sure that all - // instructions in the predecessor blocks can be promoted as well. If - // not, we won't be able to get rid of the control flow, so it's not - // worth promoting to select instructions. + // If all PHI nodes are promotable, check to make sure that all instructions + // in the predecessor blocks can be promoted as well. If not, we won't be able + // to get rid of the control flow, so it's not worth promoting to select + // instructions. BasicBlock *DomBlock = nullptr; BasicBlock *IfBlock1 = PN->getIncomingBlock(0); BasicBlock *IfBlock2 = PN->getIncomingBlock(1); @@ -1892,8 +1892,8 @@ static bool FoldTwoEntryPHINode(PHINode *PN, const TargetTransformInfo &TTI, for (BasicBlock::iterator I = IfBlock1->begin();!isa(I);++I) if (!AggressiveInsts.count(&*I) && !isa(I)) { // This is not an aggressive instruction that we can promote. - // Because of this, we won't be able to get rid of the control - // flow, so the xform is not worth it. + // Because of this, we won't be able to get rid of the control flow, so + // the xform is not worth it. return false; } } @@ -1905,8 +1905,8 @@ static bool FoldTwoEntryPHINode(PHINode *PN, const TargetTransformInfo &TTI, for (BasicBlock::iterator I = IfBlock2->begin();!isa(I);++I) if (!AggressiveInsts.count(&*I) && !isa(I)) { // This is not an aggressive instruction that we can promote. - // Because of this, we won't be able to get rid of the control - // flow, so the xform is not worth it. + // Because of this, we won't be able to get rid of the control flow, so + // the xform is not worth it. return false; } } @@ -2114,7 +2114,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI, unsigned BonusInstThreshold) { if (!Cond || (!isa(Cond) && !isa(Cond)) || Cond->getParent() != BB || !Cond->hasOneUse()) - return false; + return false; // Make sure the instruction after the condition is the cond branch. BasicBlock::iterator CondIt = ++Cond->getIterator(); @@ -2886,7 +2886,7 @@ static bool SimplifyCondBranchToCondBranch(BranchInst *PBI, BranchInst *BI, if (BIV != PBIV) { // Insert a select in PBI to pick the right value. Value *NV = cast - (Builder.CreateSelect(PBICond, PBIV, BIV, PBIV->getName()+".mux")); + (Builder.CreateSelect(PBICond, PBIV, BIV, PBIV->getName() + ".mux")); PN->setIncomingValue(PBBIdx, NV); } }