mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Micro-optimize GroupByComplexity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112431 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0f32ae3aa7
commit
c6a8e99fb3
@ -704,8 +704,9 @@ static void GroupByComplexity(SmallVectorImpl<const SCEV *> &Ops,
|
||||
if (Ops.size() == 2) {
|
||||
// This is the common case, which also happens to be trivially simple.
|
||||
// Special case it.
|
||||
if (SCEVComplexityCompare(LI)(Ops[1], Ops[0]))
|
||||
std::swap(Ops[0], Ops[1]);
|
||||
const SCEV *&LHS = Ops[0], *&RHS = Ops[1];
|
||||
if (SCEVComplexityCompare(LI)(RHS, LHS))
|
||||
std::swap(LHS, RHS);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user