summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveInterval.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2009-07-22 22:32:19 +0000
committerDavid Greene <greened@obbligato.org>2009-07-22 22:32:19 +0000
commit1164d1f283cd551e84fc70f3bfc57e7b8973c5f1 (patch)
tree4dc6e0aaa75d3e7bf80251869de014d9acc43562 /llvm/lib/CodeGen/LiveInterval.cpp
parent6aea57560fa50112f1d2be10de0650ce1eca6854 (diff)
downloadbcm5719-llvm-1164d1f283cd551e84fc70f3bfc57e7b8973c5f1.tar.gz
bcm5719-llvm-1164d1f283cd551e84fc70f3bfc57e7b8973c5f1.zip
Reorder if-else branches as suggested by Bill.
llvm-svn: 76808
Diffstat (limited to 'llvm/lib/CodeGen/LiveInterval.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveInterval.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp
index 04281055510..c8d3d43e520 100644
--- a/llvm/lib/CodeGen/LiveInterval.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud