Commit 1dee355e authored by sebastian.buchwald1's avatar sebastian.buchwald1
Browse files

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.
parent bc43d836
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment