Modifier and Type | Field and Description |
---|---|
ILOCFunction |
LocalRegisterAllocator.currentFunction
Function that is currently being allocated
|
Modifier and Type | Field and Description |
---|---|
List<ILOCFunction> |
ILOCProgram.functions
List of ILOC functions
|
Modifier and Type | Method and Description |
---|---|
ILOCFunction |
ILOCProgram.getFunction(String name)
Search for a function based on name
|
Modifier and Type | Method and Description |
---|---|
void |
PeepholeOptimizer.removeChainedJump(ILOCFunction func)
Replaces instructions of the form:
jmp lX
[...]
lX: jmp lY
with
jmp lY
[...]
lX: jmp lY
|
void |
PeepholeOptimizer.removeIdentityAddAndMult(ILOCFunction func)
Replaces instructions of the form:
addI rX, 0 => rY
with
i2i rX => rY and
Replaces instructions of the form:
multI rX, 1 => rY
with
i2i rX => rY
Removes instructions of the form: addI rX, 0 => rX
Removes instructions of the form: multI rX, 1 => rX
|
void |
PeepholeOptimizer.removeUselessCopies(ILOCFunction func)
Removes instructions of the form: i2i rX -> rX
|
void |
PeepholeOptimizer.replaceOneLineJumps(ILOCFunction func)
Removes jump in code of the form:
jmp lX
lX: [...]
|
void |
PeepholeOptimizer.storeLoadOptimize(ILOCFunction func)
(CASE 1) Replaces code of the form:
storeAI rX -> bp + offset
load bp + offset -> rY
with
storeAI rX -> bp + offset
i2i rX -> rY
(CASE 2) Replaces code of the form:
storeAI rX => BP+offset
load BP+offset => rX
with
storeAI rX => BP+offset
|
Copyright © 2019. All rights reserved.