diff options
author | David Greene <greened@obbligato.org> | 2009-07-22 22:32:19 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2009-07-22 22:32:19 +0000 |
commit | d7d71ae30947b79b3efd8e894ab9d06d56c52abe (patch) | |
tree | 66be26bee88f97b8b3fe424a5e1659d8e1ebc612 /lib/CodeGen/LiveInterval.cpp | |
parent | d1147266c27f635be76b988769f4c9b8eec922a9 (diff) | |
download | external_llvm-d7d71ae30947b79b3efd8e894ab9d06d56c52abe.zip external_llvm-d7d71ae30947b79b3efd8e894ab9d06d56c52abe.tar.gz external_llvm-d7d71ae30947b79b3efd8e894ab9d06d56c52abe.tar.bz2 |
Reorder if-else branches as suggested by Bill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76808 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveInterval.cpp')
-rw-r--r-- | lib/CodeGen/LiveInterval.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp index 0428105..c8d3d43 100644 --- a/lib/CodeGen/LiveInterval.cpp +++ b/lib/CodeGen/LiveInterval.cpp @@ -800,15 +800,15 @@ void LiveInterval::ComputeJoinedWeight(const LiveInterval &Other) { // weight of the non-spilled interval. This can only happen with // iterative coalescers. - if (weight == HUGE_VALF && + if (Other.weight != HUGE_VALF) { + weight += Other.weight; + } + else if (weight == HUGE_VALF && !TargetRegisterInfo::isPhysicalRegister(reg)) { // Remove this assert if you have an iterative coalescer assert(0 && "Joining to spilled interval"); weight = Other.weight; } - else if (Other.weight != HUGE_VALF) { - weight += Other.weight; - } else { // Otherwise the weight stays the same // Remove this assert if you have an iterative coalescer |