forked from OSchip/llvm-project
Refactor: Simplify boolean expressions in lib/Analysis
Simplify boolean expressions using `true` and `false` with `clang-tidy` Patch by Richard Thomson. Reviewed By: nlewycky Differential Revision: http://reviews.llvm.org/D8528 llvm-svn: 233091
This commit is contained in:
parent
504f38da4e
commit
19ef0d3b97
|
@ -5308,12 +5308,9 @@ static bool canConstantEvolve(Instruction *I, const Loop *L) {
|
|||
if (!L->contains(I)) return false;
|
||||
|
||||
if (isa<PHINode>(I)) {
|
||||
if (L->getHeader() == I->getParent())
|
||||
return true;
|
||||
else
|
||||
// We don't currently keep track of the control flow needed to evaluate
|
||||
// PHIs, so we cannot handle PHIs inside of loops.
|
||||
return false;
|
||||
// We don't currently keep track of the control flow needed to evaluate
|
||||
// PHIs, so we cannot handle PHIs inside of loops.
|
||||
return L->getHeader() == I->getParent();
|
||||
}
|
||||
|
||||
// If we won't be able to constant fold this expression even if the operands
|
||||
|
|
Loading…
Reference in New Issue