diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r-- | llvm/lib/Transforms/Scalar/ADCE.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopUnroll.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Transforms/Scalar/SCCP.cpp | 16 |
4 files changed, 13 insertions, 13 deletions
diff --git a/llvm/lib/Transforms/Scalar/ADCE.cpp b/llvm/lib/Transforms/Scalar/ADCE.cpp index a2ca367c458..7307ff813a2 100644 --- a/llvm/lib/Transforms/Scalar/ADCE.cpp +++ b/llvm/lib/Transforms/Scalar/ADCE.cpp @@ -229,7 +229,7 @@ bool ADCE::doADCE() { isa<UnwindInst>(I) || isa<UnreachableInst>(I)) { // FIXME: Unreachable instructions should not be marked intrinsically // live here. - markInstructionLive(I); + markInstructionLive(I); } else if (isInstructionTriviallyDead(I)) { // Remove the instruction from it's basic block... BB->getInstList().erase(I); diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 7c5cfa823a4..766cf017326 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -2896,7 +2896,7 @@ Instruction *InstCombiner::visitSetCondInst(BinaryOperator &I) { I.getName()), I); } } - + if (Op1) return new SelectInst(LHSI->getOperand(0), Op1, Op2); break; @@ -4640,9 +4640,9 @@ static Constant *GetGEPGlobalInitializer(Constant *C, ConstantExpr *CE) { if (ConstantStruct *CS = dyn_cast<ConstantStruct>(C)) { C = CS->getOperand(El); } else if (isa<ConstantAggregateZero>(C)) { - C = Constant::getNullValue(STy->getElementType(El)); + C = Constant::getNullValue(STy->getElementType(El)); } else if (isa<UndefValue>(C)) { - C = UndefValue::get(STy->getElementType(El)); + C = UndefValue::get(STy->getElementType(El)); } else { return 0; } diff --git a/llvm/lib/Transforms/Scalar/LoopUnroll.cpp b/llvm/lib/Transforms/Scalar/LoopUnroll.cpp index 45b81f7e39c..75df8bb7281 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnroll.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnroll.cpp @@ -88,7 +88,7 @@ static unsigned ApproximateLoopSize(const Loop *L) { } else if (I->hasOneUse() && I->use_back() == Term) { // Ignore instructions only used by the loop terminator. } else if (DbgInfoIntrinsic *DbgI = dyn_cast<DbgInfoIntrinsic>(I)) { - // Ignore debug instructions + // Ignore debug instructions } else { ++Size; } diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index 384c00d1ceb..d9d74ca8ea9 100644 --- a/llvm/lib/Transforms/Scalar/SCCP.cpp +++ b/llvm/lib/Transforms/Scalar/SCCP.cpp @@ -835,13 +835,13 @@ void SCCPSolver::visitLoadInst(LoadInst &I) { // Transform load (constantexpr_GEP global, 0, ...) into the value loaded. if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) if (CE->getOpcode() == Instruction::GetElementPtr) - if (GlobalVariable *GV = dyn_cast<GlobalVariable>(CE->getOperand(0))) - if (GV->isConstant() && !GV->isExternal()) - if (Constant *V = - GetGEPGlobalInitializer(GV->getInitializer(), CE)) { - markConstant(IV, &I, V); - return; - } + if (GlobalVariable *GV = dyn_cast<GlobalVariable>(CE->getOperand(0))) + if (GV->isConstant() && !GV->isExternal()) + if (Constant *V = + GetGEPGlobalInitializer(GV->getInitializer(), CE)) { + markConstant(IV, &I, V); + return; + } } // Otherwise we cannot say for certain what value this load will produce. @@ -915,7 +915,7 @@ void SCCPSolver::visitCallSite(CallSite CS) { void SCCPSolver::Solve() { // Process the work lists until they are empty! while (!BBWorkList.empty() || !InstWorkList.empty() || - !OverdefinedInstWorkList.empty()) { + !OverdefinedInstWorkList.empty()) { // Process the instruction work list... while (!OverdefinedInstWorkList.empty()) { Value *I = OverdefinedInstWorkList.back(); |