mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Replace the original ad-hoc code for determining whether (v pred w) implies
(x pred y) with more thorough code that does more complete canonicalization before resorting to range checks. This helps it find more cases where the canonicalized expressions match. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76671 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -337,19 +337,25 @@ namespace llvm {
|
||||
/// found.
|
||||
BasicBlock* getPredecessorWithUniqueSuccessorForBB(BasicBlock *BB);
|
||||
|
||||
/// isNecessaryCond - Test whether the condition described by Pred, LHS,
|
||||
/// and RHS is a necessary condition for the given Cond value to evaluate
|
||||
/// to true.
|
||||
bool isNecessaryCond(Value *Cond, ICmpInst::Predicate Pred,
|
||||
const SCEV *LHS, const SCEV *RHS,
|
||||
bool Inverse);
|
||||
/// isImpliedCond - Test whether the condition described by Pred, LHS,
|
||||
/// and RHS is true whenever the given Cond value evaluates to true.
|
||||
bool isImpliedCond(Value *Cond, ICmpInst::Predicate Pred,
|
||||
const SCEV *LHS, const SCEV *RHS,
|
||||
bool Inverse);
|
||||
|
||||
/// isNecessaryCondOperands - Test whether the condition described by Pred,
|
||||
/// LHS, and RHS is a necessary condition for the condition described by
|
||||
/// Pred, FoundLHS, and FoundRHS to evaluate to true.
|
||||
bool isNecessaryCondOperands(ICmpInst::Predicate Pred,
|
||||
const SCEV *LHS, const SCEV *RHS,
|
||||
const SCEV *FoundLHS, const SCEV *FoundRHS);
|
||||
/// isImpliedCondOperands - Test whether the condition described by Pred,
|
||||
/// LHS, and RHS is true whenever the condition desribed by Pred, FoundLHS,
|
||||
/// and FoundRHS is true.
|
||||
bool isImpliedCondOperands(ICmpInst::Predicate Pred,
|
||||
const SCEV *LHS, const SCEV *RHS,
|
||||
const SCEV *FoundLHS, const SCEV *FoundRHS);
|
||||
|
||||
/// isImpliedCondOperandsHelper - Test whether the condition described by
|
||||
/// Pred, LHS, and RHS is true whenever the condition desribed by Pred,
|
||||
/// FoundLHS, and FoundRHS is true.
|
||||
bool isImpliedCondOperandsHelper(ICmpInst::Predicate Pred,
|
||||
const SCEV *LHS, const SCEV *RHS,
|
||||
const SCEV *FoundLHS, const SCEV *FoundRHS);
|
||||
|
||||
/// getConstantEvolutionLoopExitValue - If we know that the specified Phi is
|
||||
/// in the header of its containing loop, we know the loop executes a
|
||||
|
Reference in New Issue
Block a user