aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-06-07 19:12:54 +0000
committerDan Gohman <gohman@apple.com>2010-06-07 19:12:54 +0000
commitef07158c11b6083578e6d533a1a69afe2e186903 (patch)
tree9567598c38314c36c1784a4b950fda451ea43695 /lib
parent41a628237ce7892e081f126826db6b2391b100aa (diff)
downloadexternal_llvm-ef07158c11b6083578e6d533a1a69afe2e186903.zip
external_llvm-ef07158c11b6083578e6d533a1a69afe2e186903.tar.gz
external_llvm-ef07158c11b6083578e6d533a1a69afe2e186903.tar.bz2
Micro-optimize this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105542 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/ScalarEvolution.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 1d6f21d..08831df 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -505,8 +505,10 @@ namespace {
return false;
// Primarily, sort the SCEVs by their getSCEVType().
- if (LHS->getSCEVType() != RHS->getSCEVType())
- return LHS->getSCEVType() < RHS->getSCEVType();
+ unsigned LST = LHS->getSCEVType();
+ unsigned RST = RHS->getSCEVType();
+ if (LST != RST)
+ return LST < RST;
// Then, pick an arbitrary sort. Use the profiling data for speed.
const FoldingSetNodeIDRef &L = LHS->getProfile();