This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
dev:crosscompiler:backend:register_allocator [2018/01/04 15:39] – [Register Usage] ursgraf | dev:crosscompiler:backend:register_allocator [2018/02/28 14:43] – [Determine Used Parameters] ursgraf | ||
---|---|---|---|
Line 5: | Line 5: | ||
Registers can be classified as // | Registers can be classified as // | ||
- | [[dev: | + | * [[dev: |
- | [[dev: | + | |
===== Resolving of Phi-Functions ===== | ===== Resolving of Phi-Functions ===== | ||
The operands of a phi-function must all get the same register as the result of the phi-function. For this purpose all these operands have a field //join//. \\ | The operands of a phi-function must all get the same register as the result of the phi-function. For this purpose all these operands have a field //join//. \\ | ||
Line 39: | Line 39: | ||
===== Determine Used Parameters ===== | ===== Determine Used Parameters ===== | ||
- | Parameters are passed in volatile registers. Some of them have to be copied to nonvolatile registers. Some parameters might not be used at all in a method. This can be determined in the exit set of the last node. If a value is null in that set the parameter with this index was never loaded and hence no register must be reserved. The following example demonstrates parameter usage. | + | Parameters are passed in volatile registers. Some of them have to be copied to nonvolatile registers. Some parameters might not be used at all in a method. This can be determined in the exit set of the last node. If a value is null in that set the parameter with this index was never loaded and hence no register must be reserved. The following example demonstrates parameter usage on a ppc platform. |
<code java> | <code java> | ||
float m2(long a, float b, double c, byte[] d, short e, int f, int g) { | float m2(long a, float b, double c, byte[] d, short e, int f, int g) { |