diff options
-rw-r--r-- | llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp b/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp index 9085f07ee21..b7944a34579 100644 --- a/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp +++ b/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp @@ -175,9 +175,9 @@ static bool processMemAccess(Instruction *I, LazyValueInfo *LVI) { return true; } -/// processCmp - See if LazyValueInfo's ability to exploit edge conditions, -/// or range information is sufficient to prove this comparison. Even for -/// local conditions, this can sometimes prove conditions instcombine can't by +/// See if LazyValueInfo's ability to exploit edge conditions or range +/// information is sufficient to prove this comparison. Even for local +/// conditions, this can sometimes prove conditions instcombine can't by /// exploiting range information. static bool processCmp(CmpInst *C, LazyValueInfo *LVI) { Value *Op0 = C->getOperand(0); @@ -207,13 +207,13 @@ static bool processCmp(CmpInst *C, LazyValueInfo *LVI) { return true; } -/// processSwitch - Simplify a switch instruction by removing cases which can -/// never fire. If the uselessness of a case could be determined locally then -/// constant propagation would already have figured it out. Instead, walk the -/// predecessors and statically evaluate cases based on information available -/// on that edge. Cases that cannot fire no matter what the incoming edge can -/// safely be removed. If a case fires on every incoming edge then the entire -/// switch can be removed and replaced with a branch to the case destination. +/// Simplify a switch instruction by removing cases which can never fire. If the +/// uselessness of a case could be determined locally then constant propagation +/// would already have figured it out. Instead, walk the predecessors and +/// statically evaluate cases based on information available on that edge. Cases +/// that cannot fire no matter what the incoming edge can safely be removed. If +/// a case fires on every incoming edge then the entire switch can be removed +/// and replaced with a branch to the case destination. static bool processSwitch(SwitchInst *SI, LazyValueInfo *LVI) { Value *Cond = SI->getCondition(); BasicBlock *BB = SI->getParent(); @@ -293,8 +293,7 @@ static bool processSwitch(SwitchInst *SI, LazyValueInfo *LVI) { return Changed; } -/// processCallSite - Infer nonnull attributes for the arguments at the -/// specified callsite. +/// Infer nonnull attributes for the arguments at the specified callsite. static bool processCallSite(CallSite CS, LazyValueInfo *LVI) { SmallVector<unsigned, 4> Indices; unsigned ArgNo = 0; @@ -326,7 +325,7 @@ static bool processCallSite(CallSite CS, LazyValueInfo *LVI) { return true; } -/// See if LazyValueInfo's ability to exploit edge conditions, or range +/// See if LazyValueInfo's ability to exploit edge conditions or range /// information is sufficient to prove the both operands of this SDiv are /// positive. If this is the case, replace the SDiv with a UDiv. Even for local /// conditions, this can sometimes prove conditions instcombine can't by |