mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-16 00:16:50 +00:00
Minor code micro-optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101141 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2a7cb9d9ce
commit
3ab131243e
@ -1698,15 +1698,15 @@ const SCEV *ScalarEvolution::getMulExpr(SmallVectorImpl<const SCEV *> &Ops,
|
|||||||
return getAddExpr(NewOps);
|
return getAddExpr(NewOps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Ops.size() == 1)
|
||||||
|
return Ops[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip over the add expression until we get to a multiply.
|
// Skip over the add expression until we get to a multiply.
|
||||||
while (Idx < Ops.size() && Ops[Idx]->getSCEVType() < scMulExpr)
|
while (Idx < Ops.size() && Ops[Idx]->getSCEVType() < scMulExpr)
|
||||||
++Idx;
|
++Idx;
|
||||||
|
|
||||||
if (Ops.size() == 1)
|
|
||||||
return Ops[0];
|
|
||||||
|
|
||||||
// If there are mul operands inline them all into this expression.
|
// If there are mul operands inline them all into this expression.
|
||||||
if (Idx < Ops.size()) {
|
if (Idx < Ops.size()) {
|
||||||
bool DeletedMul = false;
|
bool DeletedMul = false;
|
||||||
@ -2091,9 +2091,9 @@ ScalarEvolution::getSMaxExpr(SmallVectorImpl<const SCEV *> &Ops) {
|
|||||||
// maximum-int.
|
// maximum-int.
|
||||||
return Ops[0];
|
return Ops[0];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (Ops.size() == 1) return Ops[0];
|
if (Ops.size() == 1) return Ops[0];
|
||||||
|
}
|
||||||
|
|
||||||
// Find the first SMax
|
// Find the first SMax
|
||||||
while (Idx < Ops.size() && Ops[Idx]->getSCEVType() < scSMaxExpr)
|
while (Idx < Ops.size() && Ops[Idx]->getSCEVType() < scSMaxExpr)
|
||||||
@ -2190,9 +2190,9 @@ ScalarEvolution::getUMaxExpr(SmallVectorImpl<const SCEV *> &Ops) {
|
|||||||
// maximum-int.
|
// maximum-int.
|
||||||
return Ops[0];
|
return Ops[0];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (Ops.size() == 1) return Ops[0];
|
if (Ops.size() == 1) return Ops[0];
|
||||||
|
}
|
||||||
|
|
||||||
// Find the first UMax
|
// Find the first UMax
|
||||||
while (Idx < Ops.size() && Ops[Idx]->getSCEVType() < scUMaxExpr)
|
while (Idx < Ops.size() && Ops[Idx]->getSCEVType() < scUMaxExpr)
|
||||||
|
Loading…
Reference in New Issue
Block a user