summaryrefslogtreecommitdiffhomepage
path: root/ir/be/betranshlp.c
diff options
context:
space:
mode:
authorSebastian Buchwald <Sebastian.Buchwald@kit.edu>2015-09-14 13:35:37 +0200
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>2015-09-14 13:43:04 +0200
commit1dee355efa10c38d5b674cddd2f3728b50de8f00 (patch)
tree64aaf12ca33a6999323d27f4f796f8987d188640 /ir/be/betranshlp.c
parentbc43d836d4ea952d4ad01a1e5c103ff69c524d1e (diff)
be: Order stack nodes by the height of the 'before', not 'after', nodes.
Heights are the longest chain of users, not operands, in the block. Therefore the after nodes all have the same height of 0, because they have no users, yet. This fixes several tests on SPARC.
Diffstat (limited to 'ir/be/betranshlp.c')
-rw-r--r--ir/be/betranshlp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/be/betranshlp.c b/ir/be/betranshlp.c
index 7cce3b8..5ee5d33 100644
--- a/ir/be/betranshlp.c
+++ b/ir/be/betranshlp.c
@@ -616,8 +616,8 @@ static int cmp_stack_dependency(const void *c1, const void *c2)
* Additionally, we need to respect transitive dependencies. Consider a
* Call a depending on Call b and an independent Call c.
* We MUST NOT order c > a and b > c. */
- unsigned h1 = get_irn_height(heights, n1);
- unsigned h2 = get_irn_height(heights, n2);
+ unsigned h1 = get_irn_height(heights, b1);
+ unsigned h2 = get_irn_height(heights, b2);
if (h1 < h2)
return 1;
if (h1 > h2)