Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Computer Science · Begrippenlijst

Wat is Tile, tiling?

Ook bekend als: tile · tiling

Definition 7.8 University Computer Science — Year 3 · Hoofdstuk 7 — Intermediate Code and Code Generation

A tile is a tree pattern with a target instruction and a cost: the pattern (mem (+ r c)) with cc a 12-bit constant is lw c(r) at cost 1. A tiling of an expression tree covers each of its nodes by exactly one tile, the tiles fitting together at their leaves, which are the results of other tiles. Its cost is the sum of the costs of its tiles, and an optimal tiling has the least cost.

The optimal tiling of : six tiles, seven instructions (la is two). Thick edges join the nodes of one tile, whose instruction is written beside its root; a dashed edge passes a result from one tile to another. The register i needs no tile. The tile lw 4(r) covers three nodes, the load, the addition and the constant 4; covering them one by one would cost a li, an add and a lw.
The optimal tiling of Output 7.4: six tiles, seven instructions (la is two). Thick edges join the nodes of one tile, whose instruction is written beside its root; a dashed edge passes a result from one tile to another. The register i needs no tile. The tile lw 4(r) covers three nodes, the load, the addition and the constant 4; covering them one by one would cost a li, an add and a lw.
Lees in het hoofdstuk →