This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
dev:crosscompiler:ssa [2016/02/25 13:33] – external edit 127.0.0.1 | dev:crosscompiler:ssa [2022/12/20 11:31] (current) – ursgraf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Static Single Assignment Form ====== | ====== Static Single Assignment Form ====== | ||
The Static Single Assignment Form (SSA) is an intermediate form which allows various optimizations and facilitates register allocation. The main point of the SSA is that each variable is assigned a value only once. Each new assignment leads to a new instance of this variable (indicated by i< | The Static Single Assignment Form (SSA) is an intermediate form which allows various optimizations and facilitates register allocation. The main point of the SSA is that each variable is assigned a value only once. Each new assignment leads to a new instance of this variable (indicated by i< | ||
- | When optimizing, subsequent instuctions can simply use the definition and the value of these variables (e.g. for constant folding). The register allocation can be made more efficient as the living ranges of the instances are generally very short. More information about the creation and usage of the SSA can be found in [[http:// | + | When optimizing, subsequent instuctions can simply use the definition and the value of these variables (e.g. for constant folding). The register allocation can be made more efficient as the living ranges of the instances are generally very short. More information about the creation and usage of the SSA can be found in [[http:// |
The SSA is stored into nodes similar to the CFG nodes. For this purpose we define SSANode as an extension of CFGNode. | The SSA is stored into nodes similar to the CFG nodes. For this purpose we define SSANode as an extension of CFGNode. |