mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233091 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dcd8c45f20
commit
63ccf14139
@ -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
Block a user