The height is a measure for the longest data dependency path from a node to the end of a basic block. This is useful for scheduling heuristics and can also be used to speedup reachability queries.
◆ ir_heights_t
◆ get_irn_height()
Returns the height of a node inside a basic block.
The height of the node is the maximal number of edges between a sink node in that block and the node itself (plus 1).
- Parameters
-
h | The heights object. |
irn | The node. |
- Returns
- The height of the node.
◆ heights_free()
Frees a heights object.
- Parameters
-
◆ heights_new()
Creates a new heights object.
This also computes the heights for each block in the graph.
- Parameters
-
◆ heights_reachable_in_block()
Checks if the node tgt
is reachable according to data dependence edges from the node src
.
Both nodes must be in the same block.
- Parameters
-
h | The heights object. |
src | The source node of a possible path. |
tgt | The target node of a possible path. |
- Returns
- 1, if src is data dependent on tgt, 0 if not.
◆ heights_recompute_block()
Recomputes the height information for a certain block.
This can be used to recompute the height information of a block.
- Parameters
-
h | The heights object. |
block | The block |
- Returns
- The maximum over all heights in the block.