mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-04-09 05:37:16 +00:00
Fixed constant propagation problem: (const-identification.kc) Constants are not identified correctly. Some times constant pointers are treated as variables Eg. byte* SCREEN = $0400 is adressed through zero-page even though it can be adressed directly.
This commit is contained in:
parent
14219443a8
commit
bcef1c3662
@ -140,8 +140,8 @@ public class Compiler {
|
||||
optimizations.add(new Pass2CullEmptyBlocks(program));
|
||||
optimizations.add(new Pass2UnaryNotSimplification(program));
|
||||
optimizations.add(new Pass2AliasElimination(program));
|
||||
optimizations.add(new Pass2RedundantPhiElimination(program));
|
||||
optimizations.add(new Pass2SelfPhiElimination(program));
|
||||
optimizations.add(new Pass2RedundantPhiElimination(program));
|
||||
optimizations.add(new Pass2ConditionalJumpSimplification(program));
|
||||
optimizations.add(new Pass2ConstantIdentification(program));
|
||||
optimizations.add(new Pass2ConstantAdditionElimination(program));
|
||||
|
@ -30,6 +30,14 @@ Features
|
||||
- Consider whether autocasting word & byte* is possible ?
|
||||
- Add UpliftRemains support for attempting to uplift potentials to ALU (requires modifying two registers: 1. the ALU potential to ALU - the one added to the ALU potential to A.)
|
||||
- Syntax for composing a word from two bytes. word w = { lo, hi } --> ICL: w = lo _word_ hi;
|
||||
- A syntax for supporting custom ASM fragments? Allowing the adding of a new operator / function call that is compiled into custom written ASM-fragments. Currently there seems to be a quite short way when adding a new expression operator - maybe give the progrmmer the same freedom.
|
||||
|
||||
Constants
|
||||
- Do not create multiple versions & phi-statements for declared constants.
|
||||
- Perform static constant analysis determining if a var is ever assigned. Mark as constant before creating SSA/versions.
|
||||
- Limit number of versions & phi-blocks by create a generative algorithm for creating initial phi-blocks & variable versions.
|
||||
- When an assignment is encountered create a new version.
|
||||
- Backtrack the necessary new phi-blocks and changes into the code?
|
||||
|
||||
Word Math
|
||||
- Support Word table lookup (through 2 byte-tables)
|
||||
@ -83,7 +91,15 @@ Register Allocation
|
||||
- Combinations should be created in a tree-structure instead of just doing all combinations
|
||||
- Example: For equivalence classes a, b, c if a&c have overlapping live ranges they can never have the same register. Therefore the combination iterator should not create combinations where C has the same register as a.
|
||||
- Optimize registers in local windows - creating smaller sets of combinations. Currently some programs easily has millions of possible combinations.
|
||||
|
||||
- Optimize registers in a tree search.
|
||||
- Initially allocate all variables to ZP registers
|
||||
- Handle each scope prioritized
|
||||
- Handle each variable prioritized
|
||||
- For each variable try each potential register.
|
||||
- Examine if current variables overlap with other variable assigned to the same register. If an overlap is found - the branch is dead
|
||||
- Generate ASM & examine clobber. If the potential register allocation results in clobber - the branch is dead.
|
||||
- Handle each remaining allocation possibility in order of their score - highest score first.
|
||||
- Assign the variable to the selected register & Recurse down to the next variable.
|
||||
|
||||
Process/Code Structure Improvement
|
||||
- Eliminate copy visitor
|
||||
@ -109,7 +125,6 @@ Real Usage
|
||||
- Implement polygon filler for complex polygons.
|
||||
- Implement a true type font renderer.
|
||||
|
||||
|
||||
Done
|
||||
+ Test the ASM program output resulting from compiling specific KC program input.
|
||||
+ Create a proper main function for the compiler
|
||||
@ -166,3 +181,4 @@ Done
|
||||
+ (callconstparam.kc) Constant call parameters are stored as values in the called function - not at the call. The reference from the call to the constant does not include the function name, so the result is an unknown symbol error when compiling the ASM.
|
||||
+ Inline constants that are only call parameters used once (eg. x0#0 and x0#1 in callconstparam.kc)
|
||||
+ Ensured that assignment to variables with ALU potential does not affect potential registers through clobbering.
|
||||
+ (const-identification.kc) Constants are not identified correctly. Some times constant pointers are treated as variables Eg. byte* SCREEN = $0400 is adressed through zero-page even though it can be adressed directly.
|
||||
|
@ -0,0 +1,3 @@
|
||||
cmp {zpby1}
|
||||
bcc {la1}
|
||||
beq {la1}
|
@ -0,0 +1,3 @@
|
||||
lda #{coby1}
|
||||
cmp #{coby2}
|
||||
bcs {la1}
|
@ -0,0 +1,4 @@
|
||||
lda {zpby1}
|
||||
cmp {zpby2}
|
||||
bcc {la1}
|
||||
beq {la1}
|
@ -0,0 +1,3 @@
|
||||
sta {zpptrby1}+1
|
||||
lda #<{cowo1}
|
||||
sta {zpptrby1}
|
@ -0,0 +1,3 @@
|
||||
stx {zpptrby1}+1
|
||||
ldx #<{cowo1}
|
||||
stx {zpptrby1}
|
@ -0,0 +1,3 @@
|
||||
sty {zpptrby1}+1
|
||||
ldy #<{cowo1}
|
||||
sty {zpptrby1}
|
@ -0,0 +1,4 @@
|
||||
lda #<{cowo1}
|
||||
sta {zpptrby1}
|
||||
lda {zpby1}
|
||||
sta {zpptrby1}+1
|
@ -60,7 +60,14 @@ public class Pass2AliasElimination extends Pass2SsaOptimization {
|
||||
StatementPhiBlock.PhiVariable phiVariable = variableIterator.next();
|
||||
AliasSet aliasSet = aliases.findAliasSet(phiVariable.getVariable());
|
||||
if (aliasSet != null) {
|
||||
if (phiVariable.getValues().size() == 1 && aliasSet.contains(phiVariable.getValues().get(0).getrValue())) {
|
||||
boolean remove = true;
|
||||
for (StatementPhiBlock.PhiRValue phiRValue : phiVariable.getValues()) {
|
||||
if(!aliasSet.contains(phiRValue.getrValue())) {
|
||||
remove = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(remove) {
|
||||
variableIterator.remove();
|
||||
}
|
||||
}
|
||||
@ -281,18 +288,39 @@ public class Pass2AliasElimination extends Pass2SsaOptimization {
|
||||
@Override
|
||||
public Void visitPhiBlock(StatementPhiBlock phi) {
|
||||
for (StatementPhiBlock.PhiVariable phiVariable : phi.getPhiVariables()) {
|
||||
if(phiVariable.getValues().size()==1) {
|
||||
StatementPhiBlock.PhiRValue phiRValue = phiVariable.getValues().get(0);
|
||||
if (phiRValue.getrValue() instanceof VariableRef) {
|
||||
VariableRef variable = phiVariable.getVariable();
|
||||
VariableRef alias = (VariableRef) phiRValue.getrValue();
|
||||
if(variable.getScopeNames().equals(alias.getScopeNames())){
|
||||
aliases.add(variable, alias);
|
||||
VariableRef variable = phiVariable.getVariable();
|
||||
VariableRef alias = null;
|
||||
for (StatementPhiBlock.PhiRValue phiRValue : phiVariable.getValues()) {
|
||||
if(alias==null) {
|
||||
// First rValue
|
||||
if (phiRValue.getrValue() instanceof VariableRef) {
|
||||
alias = (VariableRef) phiRValue.getrValue();
|
||||
if(!variable.getScopeNames().equals(alias.getScopeNames())){
|
||||
getLog().append("Not aliassing across scopes: "+variable+" "+alias);
|
||||
alias = null;
|
||||
break;
|
||||
} else if(variable.equals(alias)) {
|
||||
getLog().append("Not aliassing identity: "+variable+" "+alias);
|
||||
alias = null;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
getLog().append("Not aliassing across scopes: "+variable+" "+alias);
|
||||
// Not aliasing non-variables
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// rValue 2-n
|
||||
if(!alias.equals(phiRValue.getrValue())) {
|
||||
// Not aliasing if any rValue is not identical
|
||||
alias = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(alias!=null) {
|
||||
aliases.add(variable, alias);
|
||||
}
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -134,12 +134,14 @@ public class Pass2ConstantInlining extends Pass2SsaOptimization {
|
||||
ConstantValue value = constant.getValue();
|
||||
if(symbol instanceof Variable) {
|
||||
aliases.put(constant.getRef(), value);
|
||||
break;
|
||||
getLog().append("Inlining constant with var siblings "+constant);
|
||||
// break;
|
||||
} else if(symbol instanceof ConstantVar) {
|
||||
ConstantValue otherValue = ((ConstantVar) symbol).getValue();
|
||||
if(!otherValue.equals(value) && !(value instanceof ConstantString) && !(value instanceof ConstantArray) && !(otherValue instanceof ConstantRef)) {
|
||||
aliases.put(constant.getRef(), value);
|
||||
break;
|
||||
getLog().append("Inlining constant with different constant siblings "+constant);
|
||||
// break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,10 @@ package dk.camelot64.kickc.passes;
|
||||
|
||||
import dk.camelot64.kickc.model.*;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/** Compiler Pass eliminating redundant phi functions */
|
||||
public class Pass2RedundantPhiElimination extends Pass2SsaOptimization {
|
||||
|
@ -28,6 +28,14 @@ public class TestPrograms extends TestCase {
|
||||
compileAndCompare("bitmap-bresenham");
|
||||
}
|
||||
|
||||
public void testBitmapPlotter() throws IOException, URISyntaxException {
|
||||
compileAndCompare("bitmap-plotter");
|
||||
}
|
||||
|
||||
public void testConstIdentification() throws IOException, URISyntaxException {
|
||||
compileAndCompare("const-identification");
|
||||
}
|
||||
|
||||
public void testCallConstParam() throws IOException, URISyntaxException {
|
||||
compileAndCompare("callconstparam");
|
||||
}
|
||||
|
@ -18,28 +18,64 @@ byte CSEL = %00001000;
|
||||
byte* SCREEN = $400;
|
||||
const byte* BITMAP = $2000;
|
||||
|
||||
byte[] plot_xlo = $1000;
|
||||
byte[] plot_xhi = $1100;
|
||||
byte[] plot_ylo = $1200;
|
||||
byte[] plot_yhi = $1300;
|
||||
byte[] plot_bit = $1400;
|
||||
const byte[] plot_xlo = $1000;
|
||||
const byte[] plot_xhi = $1100;
|
||||
const byte[] plot_ylo = $1200;
|
||||
const byte[] plot_yhi = $1300;
|
||||
const byte[] plot_bit = $1400;
|
||||
|
||||
byte[] lines_x = { 60, 80, 110, 80, 60, 40, 10, 40, 60 };
|
||||
byte[] lines_y = { 10, 40, 60, 80, 110, 80, 60, 40, 10 };
|
||||
byte lines_cnt = 8;
|
||||
|
||||
void main() {
|
||||
*BGCOL = 0;
|
||||
*FGCOL = 0;
|
||||
*D011 = BMM|DEN|RSEL|3;
|
||||
*D018 = $18; // Needs casting for *D018 = ((word)SCREEN/$40)|((word)BITMAP/$400);
|
||||
initscreen();
|
||||
initplottables();
|
||||
line(0,0,200,100);
|
||||
line(10,20,140,140);
|
||||
init_screen();
|
||||
init_plot_tables();
|
||||
do {
|
||||
lines();
|
||||
} while (true)
|
||||
}
|
||||
|
||||
void line(byte x0, byte y0, byte x1, byte y1) {
|
||||
byte xd = x1-x0;
|
||||
byte yd = y1-y0;
|
||||
byte x = x0;
|
||||
byte y = y0;
|
||||
void lines() {
|
||||
for(byte l=0; l<lines_cnt;l++) {
|
||||
line(lines_x[l], lines_x[l+1], lines_y[l], lines_y[l+1]);
|
||||
}
|
||||
}
|
||||
|
||||
void line(byte x0, byte x1, byte y0, byte y1) {
|
||||
byte xd;
|
||||
byte yd;
|
||||
if(x0<x1) {
|
||||
xd = x1-x0;
|
||||
if(y0<y1) {
|
||||
yd = y1-y0;
|
||||
if(yd<xd) {
|
||||
line_xdyi(x0, y0, x1, xd, yd);
|
||||
} else {
|
||||
plot(x0, y0);
|
||||
plot(x1, y1);
|
||||
}
|
||||
} else {
|
||||
plot(x0, y0);
|
||||
plot(x1, y1);
|
||||
}
|
||||
} else {
|
||||
xd = x1-x0;
|
||||
if(y0<y1) {
|
||||
plot(x0, y0);
|
||||
plot(x1, y1);
|
||||
} else {
|
||||
plot(x0, y0);
|
||||
plot(x1, y1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void line_xdyi(byte x, byte y, byte x1, byte xd, byte yd) {
|
||||
byte e = yd>>1;
|
||||
do {
|
||||
plot(x,y);
|
||||
@ -52,16 +88,18 @@ void line(byte x0, byte y0, byte x1, byte y1) {
|
||||
} while (x<(x1+1))
|
||||
}
|
||||
|
||||
void initscreen() {
|
||||
for(byte* b = BITMAP; b!=BITMAP+$2000; b++) {
|
||||
*b = 0;
|
||||
}
|
||||
for(byte* c = SCREEN; c!=SCREEN+$400;c++) {
|
||||
*c = $14;
|
||||
}
|
||||
void plot(byte x, byte y) {
|
||||
byte* plotter_x = 0;
|
||||
byte* plotter_y = 0;
|
||||
>plotter_x = plot_xhi[x]; // Needs word arrays arranged as two underlying byte arrays to allow byte* plotter_x = plot_x[x]; - and eventually - byte* plotter = plot_x[x] + plot_y[y];
|
||||
<plotter_x = plot_xlo[x];
|
||||
>plotter_y = plot_yhi[y];
|
||||
<plotter_y = plot_ylo[y];
|
||||
byte* plotter = plotter_x+plotter_y;
|
||||
*plotter = *plotter | plot_bit[x];
|
||||
}
|
||||
|
||||
void initplottables() {
|
||||
void init_plot_tables() {
|
||||
byte bit = $80;
|
||||
for(byte x : 0..255) {
|
||||
plot_xlo[x] = x&$f8;
|
||||
@ -82,15 +120,13 @@ void initplottables() {
|
||||
}
|
||||
}
|
||||
|
||||
void plot(byte x, byte y) {
|
||||
byte* plotter_x = 0;
|
||||
byte* plotter_y = 0;
|
||||
>plotter_x = plot_xhi[x]; // Needs word arrays arranged as two underlying byte arrays to allow byte* plotter_x = plot_x[x]; - and eventually - byte* plotter = plot_x[x] + plot_y[y];
|
||||
<plotter_x = plot_xlo[x];
|
||||
>plotter_y = plot_yhi[y];
|
||||
<plotter_y = plot_ylo[y];
|
||||
byte* plotter = plotter_x+plotter_y;
|
||||
*plotter = *plotter | plot_bit[x];
|
||||
void init_screen() {
|
||||
for(byte* b = BITMAP; b!=BITMAP+$2000; b++) {
|
||||
*b = 0;
|
||||
}
|
||||
for(byte* c = SCREEN; c!=SCREEN+$400;c++) {
|
||||
*c = $14;
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
|
93
src/main/java/dk/camelot64/kickc/test/bitmap-plotter.kc
Normal file
93
src/main/java/dk/camelot64/kickc/test/bitmap-plotter.kc
Normal file
@ -0,0 +1,93 @@
|
||||
byte* D011 = $d011;
|
||||
byte RST8 = %10000000;
|
||||
byte ECM = %01000000;
|
||||
byte BMM = %00100000;
|
||||
byte DEN = %00010000;
|
||||
byte RSEL = %00001000;
|
||||
byte* RASTER = $d012;
|
||||
byte* D016 = $d016;
|
||||
byte MCM = %00010000;
|
||||
byte CSEL = %00001000;
|
||||
byte* D018 = $d018;
|
||||
byte* BGCOL = $d020;
|
||||
byte* FGCOL = $d021;
|
||||
|
||||
byte* COLS = $d800;
|
||||
|
||||
|
||||
byte* SCREEN = $400;
|
||||
const byte* BITMAP = $2000;
|
||||
|
||||
void main() {
|
||||
*BGCOL = 0;
|
||||
*FGCOL = 0;
|
||||
*D011 = BMM|DEN|RSEL|3;
|
||||
*D018 = $18; // Needs casting for *D018 = ((word)SCREEN/$40)|((word)BITMAP/$400);
|
||||
init_screen();
|
||||
init_plot_tables();
|
||||
do {
|
||||
do {} while (*RASTER!=$ff)
|
||||
*BGCOL = *BGCOL+1;
|
||||
plots();
|
||||
*BGCOL = *BGCOL-1;
|
||||
} while (true)
|
||||
}
|
||||
|
||||
byte[] plots_x = { 60, 80, 110, 80, 60, 40, 10, 40 };
|
||||
byte[] plots_y = { 10, 40, 60, 80, 110, 80, 60, 40 };
|
||||
byte plots_cnt = 8;
|
||||
|
||||
void plots() {
|
||||
for(byte i=0; i<plots_cnt;i++) {
|
||||
plot(plots_x[i], plots_y[i]);
|
||||
}
|
||||
}
|
||||
|
||||
const byte[] plot_xlo = $1000;
|
||||
const byte[] plot_xhi = $1100;
|
||||
const byte[] plot_ylo = $1200;
|
||||
const byte[] plot_yhi = $1300;
|
||||
const byte[] plot_bit = $1400;
|
||||
|
||||
void plot(byte x, byte y) {
|
||||
byte* plotter_x = 0;
|
||||
byte* plotter_y = 0;
|
||||
>plotter_x = plot_xhi[x]; // Needs word arrays arranged as two underlying byte arrays to allow byte* plotter_x = plot_x[x]; - and eventually - byte* plotter = plot_x[x] + plot_y[y];
|
||||
<plotter_x = plot_xlo[x];
|
||||
>plotter_y = plot_yhi[y];
|
||||
<plotter_y = plot_ylo[y];
|
||||
byte* plotter = plotter_x+plotter_y;
|
||||
*plotter = *plotter | plot_bit[x];
|
||||
}
|
||||
|
||||
void init_plot_tables() {
|
||||
byte bit = $80;
|
||||
for(byte x : 0..255) {
|
||||
plot_xlo[x] = x&$f8;
|
||||
plot_xhi[x] = >BITMAP;
|
||||
plot_bit[x] = bit;
|
||||
bit = bit>>1;
|
||||
if(bit==0) {
|
||||
bit = $80;
|
||||
}
|
||||
}
|
||||
byte* yoffs = $0;
|
||||
for(byte y : 0..255) {
|
||||
plot_ylo[y] = y&$7 | <yoffs;
|
||||
plot_yhi[y] = >yoffs;
|
||||
if((y&$7)==7) {
|
||||
yoffs = yoffs + 320; // Needs better constant type inference for yoffs = yoffs + 40*8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void init_screen() {
|
||||
for(byte* b = BITMAP; b!=BITMAP+$2000; b++) {
|
||||
*b = 0;
|
||||
}
|
||||
for(byte* c = SCREEN; c!=SCREEN+$400;c++) {
|
||||
*c = $14;
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
@ -0,0 +1,29 @@
|
||||
const byte[] plots = $1000;
|
||||
const byte* SCREEN = $0400;
|
||||
|
||||
void main() {
|
||||
for(byte i : 0..39) {
|
||||
plots[i] = i;
|
||||
SCREEN[i] = 0;
|
||||
}
|
||||
do {
|
||||
line(0, 10);
|
||||
} while (true)
|
||||
}
|
||||
|
||||
void line(byte x0, byte x1) {
|
||||
if(x0<x1) {
|
||||
for(byte x = x0; x<=x1; x++) {
|
||||
plot(x);
|
||||
}
|
||||
} else {
|
||||
plot(x0);
|
||||
}
|
||||
}
|
||||
|
||||
void plot(byte x) {
|
||||
byte idx = plots[x];
|
||||
SCREEN[idx] = SCREEN[idx]+1;
|
||||
}
|
||||
|
||||
main();
|
@ -19,6 +19,9 @@
|
||||
.const plot_ylo = $1200
|
||||
.const plot_yhi = $1300
|
||||
.const plot_bit = $1400
|
||||
.const lines_cnt = 8
|
||||
lines_x: .byte $3c, $50, $6e, $50, $3c, $28, $a, $28, $3c
|
||||
lines_y: .byte $a, $28, $3c, $50, $6e, $50, $3c, $28, $a
|
||||
jsr main
|
||||
main: {
|
||||
lda #0
|
||||
@ -28,72 +31,112 @@ main: {
|
||||
sta D011
|
||||
lda #$18
|
||||
sta D018
|
||||
jsr initscreen
|
||||
jsr initplottables
|
||||
jsr init_screen
|
||||
jsr init_plot_tables
|
||||
b1:
|
||||
jsr lines
|
||||
jmp b1
|
||||
rts
|
||||
}
|
||||
lines: {
|
||||
.label _2 = 3
|
||||
.label _3 = 4
|
||||
.label l = 2
|
||||
lda #0
|
||||
sta line.y
|
||||
ldx #$64
|
||||
sta line.x
|
||||
lda #$c8
|
||||
sta line.x1
|
||||
jsr line
|
||||
lda #$14
|
||||
sta line.y
|
||||
ldx #$8c
|
||||
lda #$a
|
||||
sta line.x
|
||||
lda #$8c
|
||||
sta l
|
||||
b1:
|
||||
ldx l
|
||||
lda lines_x,x
|
||||
tay
|
||||
ldx l
|
||||
lda lines_x+1,x
|
||||
sta _2
|
||||
ldx l
|
||||
lda lines_y,x
|
||||
sta _3
|
||||
ldx l
|
||||
lda lines_y+1,x
|
||||
tax
|
||||
sty line.x0
|
||||
lda _2
|
||||
sta line.x1
|
||||
ldy _3
|
||||
stx line.y1
|
||||
jsr line
|
||||
inc l
|
||||
lda l
|
||||
cmp #lines_cnt
|
||||
bcc b1
|
||||
rts
|
||||
}
|
||||
line: {
|
||||
.label xd = 8
|
||||
.label yd = 9
|
||||
.label x = 3
|
||||
.label y = 4
|
||||
.label e = 5
|
||||
.label x1 = 2
|
||||
lda x1
|
||||
sec
|
||||
sbc x
|
||||
sta xd
|
||||
txa
|
||||
sec
|
||||
sbc y
|
||||
sta yd
|
||||
lda yd
|
||||
lsr
|
||||
sta e
|
||||
b1:
|
||||
ldx x
|
||||
ldy y
|
||||
jsr plot
|
||||
inc x
|
||||
lda e
|
||||
clc
|
||||
adc yd
|
||||
sta e
|
||||
lda xd
|
||||
cmp e
|
||||
bcs b2
|
||||
inc y
|
||||
lda e
|
||||
sec
|
||||
sbc xd
|
||||
sta e
|
||||
b2:
|
||||
lda x1
|
||||
clc
|
||||
adc #1
|
||||
cmp x
|
||||
.label x0 = 5
|
||||
.label x1 = 8
|
||||
.label y1 = 9
|
||||
.label xd = 10
|
||||
lda x0
|
||||
cmp x1
|
||||
bcs b1
|
||||
lda x1
|
||||
sec
|
||||
sbc x0
|
||||
sta xd
|
||||
cpy y1
|
||||
bcs b2
|
||||
sty $ff
|
||||
lda y1
|
||||
sec
|
||||
sbc $ff
|
||||
tax
|
||||
cpx xd
|
||||
bcs b3
|
||||
lda x0
|
||||
sta line_xdyi.x
|
||||
sty line_xdyi.y
|
||||
lda x1
|
||||
sta line_xdyi.x1
|
||||
stx line_xdyi.yd
|
||||
jsr line_xdyi
|
||||
breturn:
|
||||
rts
|
||||
b3:
|
||||
ldx x0
|
||||
jsr plot
|
||||
ldx x1
|
||||
ldy y1
|
||||
jsr plot
|
||||
jmp breturn
|
||||
b2:
|
||||
ldx x0
|
||||
jsr plot
|
||||
ldx x1
|
||||
ldy y1
|
||||
jsr plot
|
||||
jmp breturn
|
||||
b1:
|
||||
lda x1
|
||||
sec
|
||||
sbc x0
|
||||
cpy y1
|
||||
bcs b7
|
||||
ldx x0
|
||||
jsr plot
|
||||
ldx x1
|
||||
ldy y1
|
||||
jsr plot
|
||||
jmp breturn
|
||||
b7:
|
||||
ldx x0
|
||||
jsr plot
|
||||
ldx x1
|
||||
ldy y1
|
||||
jsr plot
|
||||
jmp breturn
|
||||
}
|
||||
plot: {
|
||||
.label _5 = 12
|
||||
.label _5 = 15
|
||||
.label plotter_x = 6
|
||||
.label plotter_y = 10
|
||||
.label plotter_y = 13
|
||||
.label plotter = 6
|
||||
lda plot_xhi,x
|
||||
sta plotter_x+1
|
||||
@ -122,7 +165,42 @@ plot: {
|
||||
sta (plotter),y
|
||||
rts
|
||||
}
|
||||
initplottables: {
|
||||
line_xdyi: {
|
||||
.label x = 3
|
||||
.label y = 4
|
||||
.label x1 = 11
|
||||
.label xd = 10
|
||||
.label yd = 12
|
||||
.label e = 5
|
||||
lda yd
|
||||
lsr
|
||||
sta e
|
||||
b1:
|
||||
ldx x
|
||||
ldy y
|
||||
jsr plot
|
||||
inc x
|
||||
lda e
|
||||
clc
|
||||
adc yd
|
||||
sta e
|
||||
lda xd
|
||||
cmp e
|
||||
bcs b2
|
||||
inc y
|
||||
lda e
|
||||
sec
|
||||
sbc xd
|
||||
sta e
|
||||
b2:
|
||||
lda x1
|
||||
clc
|
||||
adc #1
|
||||
cmp x
|
||||
bcs b1
|
||||
rts
|
||||
}
|
||||
init_plot_tables: {
|
||||
.label _6 = 2
|
||||
.label yoffs = 6
|
||||
ldy #$80
|
||||
@ -177,7 +255,7 @@ initplottables: {
|
||||
b10:
|
||||
jmp b2
|
||||
}
|
||||
initscreen: {
|
||||
init_screen: {
|
||||
.label b = 6
|
||||
.label c = 6
|
||||
lda #<BITMAP
|
||||
|
@ -1,139 +1,223 @@
|
||||
@begin: scope:[] from
|
||||
to:@5
|
||||
@5: scope:[] from @begin
|
||||
to:@7
|
||||
@7: scope:[] from @begin
|
||||
[0] call main param-assignment [ ]
|
||||
to:@end
|
||||
@end: scope:[] from @5
|
||||
main: scope:[main] from @5
|
||||
@end: scope:[] from @7
|
||||
main: scope:[main] from @7
|
||||
[1] *((const byte*) BGCOL#0) ← (byte) 0 [ ]
|
||||
[2] *((const byte*) FGCOL#0) ← (byte) 0 [ ]
|
||||
[3] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 [ ]
|
||||
[4] *((const byte*) D018#0) ← (byte) 24 [ ]
|
||||
[5] call initscreen param-assignment [ ]
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
[6] call initplottables param-assignment [ ]
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
[7] call line param-assignment [ ]
|
||||
[5] call init_screen param-assignment [ ]
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2
|
||||
[8] call line param-assignment [ ]
|
||||
main::@3: scope:[main] from main
|
||||
[6] call init_plot_tables param-assignment [ ]
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main::@3 main::@5
|
||||
[7] call lines param-assignment [ ]
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@1
|
||||
[8] if(true) goto main::@1 [ ]
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@3
|
||||
main::@return: scope:[main] from main::@5
|
||||
[9] return [ ]
|
||||
to:@return
|
||||
line: scope:[line] from main::@2 main::@3
|
||||
[10] (byte) line::y#0 ← phi( main::@2/(byte) 0 main::@3/(byte) 20 ) [ line::x1#2 line::x#0 line::y1#2 line::y#0 ]
|
||||
[10] (byte) line::y1#2 ← phi( main::@2/(byte) 100 main::@3/(byte) 140 ) [ line::x1#2 line::x#0 line::y1#2 line::y#0 ]
|
||||
[10] (byte) line::x#0 ← phi( main::@2/(byte) 0 main::@3/(byte) 10 ) [ line::x1#2 line::x#0 line::y1#2 line::y#0 ]
|
||||
[10] (byte) line::x1#2 ← phi( main::@2/(byte) 200 main::@3/(byte) 140 ) [ line::x1#2 line::x#0 line::y1#2 line::y#0 ]
|
||||
[11] (byte) line::xd#0 ← (byte) line::x1#2 - (byte) line::x#0 [ line::x1#2 line::x#0 line::y1#2 line::y#0 line::xd#0 ]
|
||||
[12] (byte) line::yd#0 ← (byte) line::y1#2 - (byte) line::y#0 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 ]
|
||||
[13] (byte) line::e#0 ← (byte) line::yd#0 >> (byte) 1 [ line::x1#2 line::x#0 line::y#0 line::xd#0 line::yd#0 line::e#0 ]
|
||||
to:line::@1
|
||||
line::@1: scope:[line] from line line::@2
|
||||
[14] (byte) line::e#3 ← phi( line/(byte) line::e#0 line::@2/(byte) line::e#6 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ]
|
||||
[14] (byte) line::y#2 ← phi( line/(byte) line::y#0 line::@2/(byte) line::y#4 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ]
|
||||
[14] (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@2/(byte) line::x#1 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ]
|
||||
[15] (byte) plot::x#0 ← (byte) line::x#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 ]
|
||||
[16] (byte) plot::y#0 ← (byte) line::y#2 [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 plot::x#0 plot::y#0 ]
|
||||
[17] call plot param-assignment [ line::x1#2 line::xd#0 line::yd#0 line::x#2 line::y#2 line::e#3 ]
|
||||
to:line::@5
|
||||
line::@5: scope:[line] from line::@1
|
||||
[18] (byte) line::x#1 ← (byte) line::x#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::e#3 line::x#1 ]
|
||||
[19] (byte) line::e#1 ← (byte) line::e#3 + (byte) line::yd#0 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ]
|
||||
[20] if((byte) line::xd#0>=(byte) line::e#1) goto line::@2 [ line::x1#2 line::xd#0 line::yd#0 line::y#2 line::x#1 line::e#1 ]
|
||||
to:line::@3
|
||||
line::@3: scope:[line] from line::@5
|
||||
[21] (byte) line::y#1 ← (byte) line::y#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::e#1 line::y#1 ]
|
||||
[22] (byte) line::e#2 ← (byte) line::e#1 - (byte) line::xd#0 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#1 line::e#2 ]
|
||||
to:line::@2
|
||||
line::@2: scope:[line] from line::@3 line::@5
|
||||
[23] (byte) line::e#6 ← phi( line::@3/(byte) line::e#2 line::@5/(byte) line::e#1 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ]
|
||||
[23] (byte) line::y#4 ← phi( line::@3/(byte) line::y#1 line::@5/(byte) line::y#2 ) [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ]
|
||||
[24] (byte~) line::$10 ← (byte) line::x1#2 + (byte) 1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 line::$10 ]
|
||||
[25] if((byte) line::x#1<(byte~) line::$10) goto line::@1 [ line::x1#2 line::xd#0 line::yd#0 line::x#1 line::y#4 line::e#6 ]
|
||||
to:line::@return
|
||||
line::@return: scope:[line] from line::@2
|
||||
[26] return [ ]
|
||||
lines: scope:[lines] from main::@1
|
||||
[10] phi() [ ]
|
||||
to:lines::@1
|
||||
lines::@1: scope:[lines] from lines lines::@3
|
||||
[11] (byte) lines::l#2 ← phi( lines/(byte) 0 lines::@3/(byte) lines::l#1 ) [ lines::l#2 ]
|
||||
[12] (byte~) lines::$0 ← (const byte[]) lines_x#0 *idx (byte) lines::l#2 [ lines::l#2 lines::$0 ]
|
||||
[13] (byte~) lines::$2 ← (const byte[]) lines_x#0+(byte) 1 *idx (byte) lines::l#2 [ lines::l#2 lines::$0 lines::$2 ]
|
||||
[14] (byte~) lines::$3 ← (const byte[]) lines_y#0 *idx (byte) lines::l#2 [ lines::l#2 lines::$0 lines::$2 lines::$3 ]
|
||||
[15] (byte~) lines::$5 ← (const byte[]) lines_y#0+(byte) 1 *idx (byte) lines::l#2 [ lines::l#2 lines::$0 lines::$2 lines::$3 lines::$5 ]
|
||||
[16] (byte) line::x0#0 ← (byte~) lines::$0 [ lines::l#2 lines::$2 lines::$3 lines::$5 line::x0#0 ]
|
||||
[17] (byte) line::x1#0 ← (byte~) lines::$2 [ lines::l#2 lines::$3 lines::$5 line::x0#0 line::x1#0 ]
|
||||
[18] (byte) line::y0#0 ← (byte~) lines::$3 [ lines::l#2 lines::$5 line::x0#0 line::x1#0 line::y0#0 ]
|
||||
[19] (byte) line::y1#0 ← (byte~) lines::$5 [ lines::l#2 line::x0#0 line::x1#0 line::y0#0 line::y1#0 ]
|
||||
[20] call line param-assignment [ lines::l#2 ]
|
||||
to:lines::@3
|
||||
lines::@3: scope:[lines] from lines::@1
|
||||
[21] (byte) lines::l#1 ← ++ (byte) lines::l#2 [ lines::l#1 ]
|
||||
[22] if((byte) lines::l#1<(const byte) lines_cnt#0) goto lines::@1 [ lines::l#1 ]
|
||||
to:lines::@return
|
||||
lines::@return: scope:[lines] from lines::@3
|
||||
[23] return [ ]
|
||||
to:@return
|
||||
plot: scope:[plot] from line::@1
|
||||
[27] (byte~) plot::$0 ← (const byte[]) plot_xhi#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::$0 ]
|
||||
[28] (byte*) plot::plotter_x#1 ← (byte) 0 hi= (byte~) plot::$0 [ plot::x#0 plot::y#0 plot::plotter_x#1 ]
|
||||
[29] (byte~) plot::$1 ← (const byte[]) plot_xlo#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::plotter_x#1 plot::$1 ]
|
||||
[30] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$1 [ plot::x#0 plot::y#0 plot::plotter_x#2 ]
|
||||
[31] (byte~) plot::$2 ← (const byte[]) plot_yhi#0 *idx (byte) plot::y#0 [ plot::x#0 plot::y#0 plot::plotter_x#2 plot::$2 ]
|
||||
[32] (byte*) plot::plotter_y#1 ← (byte) 0 hi= (byte~) plot::$2 [ plot::x#0 plot::y#0 plot::plotter_x#2 plot::plotter_y#1 ]
|
||||
[33] (byte~) plot::$3 ← (const byte[]) plot_ylo#0 *idx (byte) plot::y#0 [ plot::x#0 plot::plotter_x#2 plot::plotter_y#1 plot::$3 ]
|
||||
[34] (byte*) plot::plotter_y#2 ← (byte*) plot::plotter_y#1 lo= (byte~) plot::$3 [ plot::x#0 plot::plotter_x#2 plot::plotter_y#2 ]
|
||||
[35] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (byte*) plot::plotter_y#2 [ plot::x#0 plot::plotter#0 ]
|
||||
[36] (byte~) plot::$5 ← * (byte*) plot::plotter#0 [ plot::x#0 plot::plotter#0 plot::$5 ]
|
||||
[37] (byte~) plot::$6 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#0 plot::$5 plot::$6 ]
|
||||
[38] (byte~) plot::$7 ← (byte~) plot::$5 | (byte~) plot::$6 [ plot::plotter#0 plot::$7 ]
|
||||
[39] *((byte*) plot::plotter#0) ← (byte~) plot::$7 [ ]
|
||||
line: scope:[line] from lines::@1
|
||||
[24] if((byte) line::x0#0>=(byte) line::x1#0) goto line::@1 [ line::x0#0 line::x1#0 line::y0#0 line::y1#0 ]
|
||||
to:line::@9
|
||||
line::@9: scope:[line] from line
|
||||
[25] (byte) line::xd#1 ← (byte) line::x1#0 - (byte) line::x0#0 [ line::x0#0 line::x1#0 line::y0#0 line::y1#0 line::xd#1 ]
|
||||
[26] if((byte) line::y0#0>=(byte) line::y1#0) goto line::@2 [ line::x0#0 line::x1#0 line::y0#0 line::y1#0 line::xd#1 ]
|
||||
to:line::@10
|
||||
line::@10: scope:[line] from line::@9
|
||||
[27] (byte) line::yd#0 ← (byte) line::y1#0 - (byte) line::y0#0 [ line::x0#0 line::x1#0 line::y0#0 line::y1#0 line::xd#1 line::yd#0 ]
|
||||
[28] if((byte) line::yd#0>=(byte) line::xd#1) goto line::@3 [ line::x0#0 line::x1#0 line::y0#0 line::y1#0 line::xd#1 line::yd#0 ]
|
||||
to:line::@11
|
||||
line::@11: scope:[line] from line::@10
|
||||
[29] (byte) line_xdyi::x#0 ← (byte) line::x0#0 [ line::x1#0 line::y0#0 line::xd#1 line::yd#0 line_xdyi::x#0 ]
|
||||
[30] (byte) line_xdyi::y#0 ← (byte) line::y0#0 [ line::x1#0 line::xd#1 line::yd#0 line_xdyi::x#0 line_xdyi::y#0 ]
|
||||
[31] (byte) line_xdyi::x1#0 ← (byte) line::x1#0 [ line::xd#1 line::yd#0 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 ]
|
||||
[32] (byte) line_xdyi::xd#0 ← (byte) line::xd#1 [ line::yd#0 line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 ]
|
||||
[33] (byte) line_xdyi::yd#0 ← (byte) line::yd#0 [ line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 ]
|
||||
[34] call line_xdyi param-assignment [ ]
|
||||
to:line::@return
|
||||
line::@return: scope:[line] from line::@11 line::@17 line::@19 line::@22 line::@24
|
||||
[35] return [ ]
|
||||
to:@return
|
||||
line::@3: scope:[line] from line::@10
|
||||
[36] (byte) plot::x#2 ← (byte) line::x0#0 [ line::x1#0 line::y0#0 line::y1#0 plot::x#2 ]
|
||||
[37] (byte) plot::y#2 ← (byte) line::y0#0 [ line::x1#0 line::y1#0 plot::x#2 plot::y#2 ]
|
||||
[38] call plot param-assignment [ line::x1#0 line::y1#0 ]
|
||||
to:line::@19
|
||||
line::@19: scope:[line] from line::@3
|
||||
[39] (byte) plot::x#3 ← (byte) line::x1#0 [ line::y1#0 plot::x#3 ]
|
||||
[40] (byte) plot::y#3 ← (byte) line::y1#0 [ plot::x#3 plot::y#3 ]
|
||||
[41] call plot param-assignment [ ]
|
||||
to:line::@return
|
||||
line::@2: scope:[line] from line::@9
|
||||
[42] (byte) plot::x#0 ← (byte) line::x0#0 [ line::x1#0 line::y0#0 line::y1#0 plot::x#0 ]
|
||||
[43] (byte) plot::y#0 ← (byte) line::y0#0 [ line::x1#0 line::y1#0 plot::x#0 plot::y#0 ]
|
||||
[44] call plot param-assignment [ line::x1#0 line::y1#0 ]
|
||||
to:line::@17
|
||||
line::@17: scope:[line] from line::@2
|
||||
[45] (byte) plot::x#1 ← (byte) line::x1#0 [ line::y1#0 plot::x#1 ]
|
||||
[46] (byte) plot::y#1 ← (byte) line::y1#0 [ plot::x#1 plot::y#1 ]
|
||||
[47] call plot param-assignment [ ]
|
||||
to:line::@return
|
||||
line::@1: scope:[line] from line
|
||||
[48] (byte) line::xd#0 ← (byte) line::x1#0 - (byte) line::x0#0 [ line::x0#0 line::x1#0 line::y0#0 line::y1#0 ]
|
||||
[49] if((byte) line::y0#0>=(byte) line::y1#0) goto line::@7 [ line::x0#0 line::x1#0 line::y0#0 line::y1#0 ]
|
||||
to:line::@15
|
||||
line::@15: scope:[line] from line::@1
|
||||
[50] (byte) plot::x#6 ← (byte) line::x0#0 [ line::x1#0 line::y0#0 line::y1#0 plot::x#6 ]
|
||||
[51] (byte) plot::y#6 ← (byte) line::y0#0 [ line::x1#0 line::y1#0 plot::x#6 plot::y#6 ]
|
||||
[52] call plot param-assignment [ line::x1#0 line::y1#0 ]
|
||||
to:line::@24
|
||||
line::@24: scope:[line] from line::@15
|
||||
[53] (byte) plot::x#7 ← (byte) line::x1#0 [ line::y1#0 plot::x#7 ]
|
||||
[54] (byte) plot::y#7 ← (byte) line::y1#0 [ plot::x#7 plot::y#7 ]
|
||||
[55] call plot param-assignment [ ]
|
||||
to:line::@return
|
||||
line::@7: scope:[line] from line::@1
|
||||
[56] (byte) plot::x#4 ← (byte) line::x0#0 [ line::x1#0 line::y0#0 line::y1#0 plot::x#4 ]
|
||||
[57] (byte) plot::y#4 ← (byte) line::y0#0 [ line::x1#0 line::y1#0 plot::x#4 plot::y#4 ]
|
||||
[58] call plot param-assignment [ line::x1#0 line::y1#0 ]
|
||||
to:line::@22
|
||||
line::@22: scope:[line] from line::@7
|
||||
[59] (byte) plot::x#5 ← (byte) line::x1#0 [ line::y1#0 plot::x#5 ]
|
||||
[60] (byte) plot::y#5 ← (byte) line::y1#0 [ plot::x#5 plot::y#5 ]
|
||||
[61] call plot param-assignment [ ]
|
||||
to:line::@return
|
||||
plot: scope:[plot] from line::@15 line::@17 line::@19 line::@2 line::@22 line::@24 line::@3 line::@7 line_xdyi::@1
|
||||
[62] (byte) plot::y#9 ← phi( line::@15/(byte) plot::y#6 line::@17/(byte) plot::y#1 line::@19/(byte) plot::y#3 line::@2/(byte) plot::y#0 line::@22/(byte) plot::y#5 line::@24/(byte) plot::y#7 line::@3/(byte) plot::y#2 line::@7/(byte) plot::y#4 line_xdyi::@1/(byte) plot::y#8 ) [ plot::x#9 plot::y#9 ]
|
||||
[62] (byte) plot::x#9 ← phi( line::@15/(byte) plot::x#6 line::@17/(byte) plot::x#1 line::@19/(byte) plot::x#3 line::@2/(byte) plot::x#0 line::@22/(byte) plot::x#5 line::@24/(byte) plot::x#7 line::@3/(byte) plot::x#2 line::@7/(byte) plot::x#4 line_xdyi::@1/(byte) plot::x#8 ) [ plot::x#9 plot::y#9 ]
|
||||
[63] (byte~) plot::$0 ← (const byte[]) plot_xhi#0 *idx (byte) plot::x#9 [ plot::x#9 plot::y#9 plot::$0 ]
|
||||
[64] (byte*) plot::plotter_x#1 ← (byte) 0 hi= (byte~) plot::$0 [ plot::x#9 plot::y#9 plot::plotter_x#1 ]
|
||||
[65] (byte~) plot::$1 ← (const byte[]) plot_xlo#0 *idx (byte) plot::x#9 [ plot::x#9 plot::y#9 plot::plotter_x#1 plot::$1 ]
|
||||
[66] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$1 [ plot::x#9 plot::y#9 plot::plotter_x#2 ]
|
||||
[67] (byte~) plot::$2 ← (const byte[]) plot_yhi#0 *idx (byte) plot::y#9 [ plot::x#9 plot::y#9 plot::plotter_x#2 plot::$2 ]
|
||||
[68] (byte*) plot::plotter_y#1 ← (byte) 0 hi= (byte~) plot::$2 [ plot::x#9 plot::y#9 plot::plotter_x#2 plot::plotter_y#1 ]
|
||||
[69] (byte~) plot::$3 ← (const byte[]) plot_ylo#0 *idx (byte) plot::y#9 [ plot::x#9 plot::plotter_x#2 plot::plotter_y#1 plot::$3 ]
|
||||
[70] (byte*) plot::plotter_y#2 ← (byte*) plot::plotter_y#1 lo= (byte~) plot::$3 [ plot::x#9 plot::plotter_x#2 plot::plotter_y#2 ]
|
||||
[71] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (byte*) plot::plotter_y#2 [ plot::x#9 plot::plotter#0 ]
|
||||
[72] (byte~) plot::$5 ← * (byte*) plot::plotter#0 [ plot::x#9 plot::plotter#0 plot::$5 ]
|
||||
[73] (byte~) plot::$6 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#9 [ plot::plotter#0 plot::$5 plot::$6 ]
|
||||
[74] (byte~) plot::$7 ← (byte~) plot::$5 | (byte~) plot::$6 [ plot::plotter#0 plot::$7 ]
|
||||
[75] *((byte*) plot::plotter#0) ← (byte~) plot::$7 [ ]
|
||||
to:plot::@return
|
||||
plot::@return: scope:[plot] from plot
|
||||
[40] return [ ]
|
||||
[76] return [ ]
|
||||
to:@return
|
||||
initplottables: scope:[initplottables] from main::@1
|
||||
[41] phi() [ ]
|
||||
to:initplottables::@1
|
||||
initplottables::@1: scope:[initplottables] from initplottables initplottables::@2
|
||||
[42] (byte) initplottables::bit#3 ← phi( initplottables/(byte) 128 initplottables::@2/(byte) initplottables::bit#4 ) [ initplottables::x#2 initplottables::bit#3 ]
|
||||
[42] (byte) initplottables::x#2 ← phi( initplottables/(byte) 0 initplottables::@2/(byte) initplottables::x#1 ) [ initplottables::x#2 initplottables::bit#3 ]
|
||||
[43] (byte~) initplottables::$0 ← (byte) initplottables::x#2 & (byte) 248 [ initplottables::x#2 initplottables::bit#3 initplottables::$0 ]
|
||||
[44] *((const byte[]) plot_xlo#0 + (byte) initplottables::x#2) ← (byte~) initplottables::$0 [ initplottables::x#2 initplottables::bit#3 ]
|
||||
[45] *((const byte[]) plot_xhi#0 + (byte) initplottables::x#2) ← >(const byte*) BITMAP#0 [ initplottables::x#2 initplottables::bit#3 ]
|
||||
[46] *((const byte[]) plot_bit#0 + (byte) initplottables::x#2) ← (byte) initplottables::bit#3 [ initplottables::x#2 initplottables::bit#3 ]
|
||||
[47] (byte) initplottables::bit#1 ← (byte) initplottables::bit#3 >> (byte) 1 [ initplottables::x#2 initplottables::bit#1 ]
|
||||
[48] if((byte) initplottables::bit#1!=(byte) 0) goto initplottables::@10 [ initplottables::x#2 ]
|
||||
to:initplottables::@2
|
||||
initplottables::@2: scope:[initplottables] from initplottables::@1 initplottables::@10
|
||||
[49] (byte) initplottables::bit#4 ← phi( initplottables::@10/(byte) initplottables::bit#1 initplottables::@1/(byte) 128 ) [ initplottables::x#2 initplottables::bit#4 ]
|
||||
[50] (byte) initplottables::x#1 ← ++ (byte) initplottables::x#2 [ initplottables::x#1 initplottables::bit#4 ]
|
||||
[51] if((byte) initplottables::x#1!=(byte) 0) goto initplottables::@1 [ initplottables::x#1 initplottables::bit#4 ]
|
||||
to:initplottables::@3
|
||||
initplottables::@3: scope:[initplottables] from initplottables::@2 initplottables::@4
|
||||
[52] (byte*) initplottables::yoffs#2 ← phi( initplottables::@4/(byte*) initplottables::yoffs#4 initplottables::@2/(byte) 0 ) [ initplottables::y#2 initplottables::yoffs#2 ]
|
||||
[52] (byte) initplottables::y#2 ← phi( initplottables::@4/(byte) initplottables::y#1 initplottables::@2/(byte) 0 ) [ initplottables::y#2 initplottables::yoffs#2 ]
|
||||
[53] (byte~) initplottables::$6 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 ]
|
||||
[54] (byte~) initplottables::$7 ← < (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$6 initplottables::$7 ]
|
||||
[55] (byte~) initplottables::$8 ← (byte~) initplottables::$6 | (byte~) initplottables::$7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$8 ]
|
||||
[56] *((const byte[]) plot_ylo#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$8 [ initplottables::y#2 initplottables::yoffs#2 ]
|
||||
[57] (byte~) initplottables::$9 ← > (byte*) initplottables::yoffs#2 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$9 ]
|
||||
[58] *((const byte[]) plot_yhi#0 + (byte) initplottables::y#2) ← (byte~) initplottables::$9 [ initplottables::y#2 initplottables::yoffs#2 ]
|
||||
[59] (byte~) initplottables::$10 ← (byte) initplottables::y#2 & (byte) 7 [ initplottables::y#2 initplottables::yoffs#2 initplottables::$10 ]
|
||||
[60] if((byte~) initplottables::$10!=(byte) 7) goto initplottables::@4 [ initplottables::y#2 initplottables::yoffs#2 ]
|
||||
to:initplottables::@7
|
||||
initplottables::@7: scope:[initplottables] from initplottables::@3
|
||||
[61] (byte*) initplottables::yoffs#1 ← (byte*) initplottables::yoffs#2 + (word) 320 [ initplottables::y#2 initplottables::yoffs#1 ]
|
||||
to:initplottables::@4
|
||||
initplottables::@4: scope:[initplottables] from initplottables::@3 initplottables::@7
|
||||
[62] (byte*) initplottables::yoffs#4 ← phi( initplottables::@3/(byte*) initplottables::yoffs#2 initplottables::@7/(byte*) initplottables::yoffs#1 ) [ initplottables::y#2 initplottables::yoffs#4 ]
|
||||
[63] (byte) initplottables::y#1 ← ++ (byte) initplottables::y#2 [ initplottables::y#1 initplottables::yoffs#4 ]
|
||||
[64] if((byte) initplottables::y#1!=(byte) 0) goto initplottables::@3 [ initplottables::y#1 initplottables::yoffs#4 ]
|
||||
to:initplottables::@return
|
||||
initplottables::@return: scope:[initplottables] from initplottables::@4
|
||||
[65] return [ ]
|
||||
line_xdyi: scope:[line_xdyi] from line::@11
|
||||
[77] (byte) line_xdyi::e#0 ← (byte) line_xdyi::yd#0 >> (byte) 1 [ line_xdyi::x#0 line_xdyi::y#0 line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 line_xdyi::e#0 ]
|
||||
to:line_xdyi::@1
|
||||
line_xdyi::@1: scope:[line_xdyi] from line_xdyi line_xdyi::@2
|
||||
[78] (byte) line_xdyi::e#3 ← phi( line_xdyi/(byte) line_xdyi::e#0 line_xdyi::@2/(byte) line_xdyi::e#6 ) [ line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 line_xdyi::x#2 line_xdyi::y#2 line_xdyi::e#3 ]
|
||||
[78] (byte) line_xdyi::y#2 ← phi( line_xdyi/(byte) line_xdyi::y#0 line_xdyi::@2/(byte) line_xdyi::y#5 ) [ line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 line_xdyi::x#2 line_xdyi::y#2 line_xdyi::e#3 ]
|
||||
[78] (byte) line_xdyi::x#2 ← phi( line_xdyi/(byte) line_xdyi::x#0 line_xdyi::@2/(byte) line_xdyi::x#1 ) [ line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 line_xdyi::x#2 line_xdyi::y#2 line_xdyi::e#3 ]
|
||||
[79] (byte) plot::x#8 ← (byte) line_xdyi::x#2 [ line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 plot::x#8 line_xdyi::x#2 line_xdyi::y#2 line_xdyi::e#3 ]
|
||||
[80] (byte) plot::y#8 ← (byte) line_xdyi::y#2 [ line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 plot::x#8 plot::y#8 line_xdyi::x#2 line_xdyi::y#2 line_xdyi::e#3 ]
|
||||
[81] call plot param-assignment [ line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 line_xdyi::x#2 line_xdyi::y#2 line_xdyi::e#3 ]
|
||||
to:line_xdyi::@5
|
||||
line_xdyi::@5: scope:[line_xdyi] from line_xdyi::@1
|
||||
[82] (byte) line_xdyi::x#1 ← (byte) line_xdyi::x#2 + (byte) 1 [ line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 line_xdyi::y#2 line_xdyi::e#3 line_xdyi::x#1 ]
|
||||
[83] (byte) line_xdyi::e#1 ← (byte) line_xdyi::e#3 + (byte) line_xdyi::yd#0 [ line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 line_xdyi::y#2 line_xdyi::x#1 line_xdyi::e#1 ]
|
||||
[84] if((byte) line_xdyi::xd#0>=(byte) line_xdyi::e#1) goto line_xdyi::@2 [ line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 line_xdyi::y#2 line_xdyi::x#1 line_xdyi::e#1 ]
|
||||
to:line_xdyi::@3
|
||||
line_xdyi::@3: scope:[line_xdyi] from line_xdyi::@5
|
||||
[85] (byte) line_xdyi::y#1 ← (byte) line_xdyi::y#2 + (byte) 1 [ line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 line_xdyi::x#1 line_xdyi::e#1 line_xdyi::y#1 ]
|
||||
[86] (byte) line_xdyi::e#2 ← (byte) line_xdyi::e#1 - (byte) line_xdyi::xd#0 [ line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 line_xdyi::x#1 line_xdyi::y#1 line_xdyi::e#2 ]
|
||||
to:line_xdyi::@2
|
||||
line_xdyi::@2: scope:[line_xdyi] from line_xdyi::@3 line_xdyi::@5
|
||||
[87] (byte) line_xdyi::e#6 ← phi( line_xdyi::@3/(byte) line_xdyi::e#2 line_xdyi::@5/(byte) line_xdyi::e#1 ) [ line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 line_xdyi::x#1 line_xdyi::y#5 line_xdyi::e#6 ]
|
||||
[87] (byte) line_xdyi::y#5 ← phi( line_xdyi::@3/(byte) line_xdyi::y#1 line_xdyi::@5/(byte) line_xdyi::y#2 ) [ line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 line_xdyi::x#1 line_xdyi::y#5 line_xdyi::e#6 ]
|
||||
[88] (byte~) line_xdyi::$8 ← (byte) line_xdyi::x1#0 + (byte) 1 [ line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 line_xdyi::x#1 line_xdyi::y#5 line_xdyi::e#6 line_xdyi::$8 ]
|
||||
[89] if((byte) line_xdyi::x#1<(byte~) line_xdyi::$8) goto line_xdyi::@1 [ line_xdyi::x1#0 line_xdyi::xd#0 line_xdyi::yd#0 line_xdyi::x#1 line_xdyi::y#5 line_xdyi::e#6 ]
|
||||
to:line_xdyi::@return
|
||||
line_xdyi::@return: scope:[line_xdyi] from line_xdyi::@2
|
||||
[90] return [ ]
|
||||
to:@return
|
||||
initplottables::@10: scope:[initplottables] from initplottables::@1
|
||||
to:initplottables::@2
|
||||
initscreen: scope:[initscreen] from main
|
||||
[66] phi() [ ]
|
||||
to:initscreen::@1
|
||||
initscreen::@1: scope:[initscreen] from initscreen initscreen::@1
|
||||
[67] (byte*) initscreen::b#2 ← phi( initscreen/(const byte*) BITMAP#0 initscreen::@1/(byte*) initscreen::b#1 ) [ initscreen::b#2 ]
|
||||
[68] *((byte*) initscreen::b#2) ← (byte) 0 [ initscreen::b#2 ]
|
||||
[69] (byte*) initscreen::b#1 ← ++ (byte*) initscreen::b#2 [ initscreen::b#1 ]
|
||||
[70] if((byte*) initscreen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto initscreen::@1 [ initscreen::b#1 ]
|
||||
to:initscreen::@2
|
||||
initscreen::@2: scope:[initscreen] from initscreen::@1 initscreen::@2
|
||||
[71] (byte*) initscreen::c#2 ← phi( initscreen::@2/(byte*) initscreen::c#1 initscreen::@1/(const byte*) SCREEN#0 ) [ initscreen::c#2 ]
|
||||
[72] *((byte*) initscreen::c#2) ← (byte) 20 [ initscreen::c#2 ]
|
||||
[73] (byte*) initscreen::c#1 ← ++ (byte*) initscreen::c#2 [ initscreen::c#1 ]
|
||||
[74] if((byte*) initscreen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto initscreen::@2 [ initscreen::c#1 ]
|
||||
to:initscreen::@return
|
||||
initscreen::@return: scope:[initscreen] from initscreen::@2
|
||||
[75] return [ ]
|
||||
init_plot_tables: scope:[init_plot_tables] from main::@3
|
||||
[91] phi() [ ]
|
||||
to:init_plot_tables::@1
|
||||
init_plot_tables::@1: scope:[init_plot_tables] from init_plot_tables init_plot_tables::@2
|
||||
[92] (byte) init_plot_tables::bit#3 ← phi( init_plot_tables/(byte) 128 init_plot_tables::@2/(byte) init_plot_tables::bit#4 ) [ init_plot_tables::x#2 init_plot_tables::bit#3 ]
|
||||
[92] (byte) init_plot_tables::x#2 ← phi( init_plot_tables/(byte) 0 init_plot_tables::@2/(byte) init_plot_tables::x#1 ) [ init_plot_tables::x#2 init_plot_tables::bit#3 ]
|
||||
[93] (byte~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte) 248 [ init_plot_tables::x#2 init_plot_tables::bit#3 init_plot_tables::$0 ]
|
||||
[94] *((const byte[]) plot_xlo#0 + (byte) init_plot_tables::x#2) ← (byte~) init_plot_tables::$0 [ init_plot_tables::x#2 init_plot_tables::bit#3 ]
|
||||
[95] *((const byte[]) plot_xhi#0 + (byte) init_plot_tables::x#2) ← >(const byte*) BITMAP#0 [ init_plot_tables::x#2 init_plot_tables::bit#3 ]
|
||||
[96] *((const byte[]) plot_bit#0 + (byte) init_plot_tables::x#2) ← (byte) init_plot_tables::bit#3 [ init_plot_tables::x#2 init_plot_tables::bit#3 ]
|
||||
[97] (byte) init_plot_tables::bit#1 ← (byte) init_plot_tables::bit#3 >> (byte) 1 [ init_plot_tables::x#2 init_plot_tables::bit#1 ]
|
||||
[98] if((byte) init_plot_tables::bit#1!=(byte) 0) goto init_plot_tables::@10 [ init_plot_tables::x#2 ]
|
||||
to:init_plot_tables::@2
|
||||
init_plot_tables::@2: scope:[init_plot_tables] from init_plot_tables::@1 init_plot_tables::@10
|
||||
[99] (byte) init_plot_tables::bit#4 ← phi( init_plot_tables::@10/(byte) init_plot_tables::bit#1 init_plot_tables::@1/(byte) 128 ) [ init_plot_tables::x#2 init_plot_tables::bit#4 ]
|
||||
[100] (byte) init_plot_tables::x#1 ← ++ (byte) init_plot_tables::x#2 [ init_plot_tables::x#1 init_plot_tables::bit#4 ]
|
||||
[101] if((byte) init_plot_tables::x#1!=(byte) 0) goto init_plot_tables::@1 [ init_plot_tables::x#1 init_plot_tables::bit#4 ]
|
||||
to:init_plot_tables::@3
|
||||
init_plot_tables::@3: scope:[init_plot_tables] from init_plot_tables::@2 init_plot_tables::@4
|
||||
[102] (byte*) init_plot_tables::yoffs#2 ← phi( init_plot_tables::@4/(byte*) init_plot_tables::yoffs#4 init_plot_tables::@2/(byte) 0 ) [ init_plot_tables::y#2 init_plot_tables::yoffs#2 ]
|
||||
[102] (byte) init_plot_tables::y#2 ← phi( init_plot_tables::@4/(byte) init_plot_tables::y#1 init_plot_tables::@2/(byte) 0 ) [ init_plot_tables::y#2 init_plot_tables::yoffs#2 ]
|
||||
[103] (byte~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (byte) 7 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$6 ]
|
||||
[104] (byte~) init_plot_tables::$7 ← < (byte*) init_plot_tables::yoffs#2 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$6 init_plot_tables::$7 ]
|
||||
[105] (byte~) init_plot_tables::$8 ← (byte~) init_plot_tables::$6 | (byte~) init_plot_tables::$7 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$8 ]
|
||||
[106] *((const byte[]) plot_ylo#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$8 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 ]
|
||||
[107] (byte~) init_plot_tables::$9 ← > (byte*) init_plot_tables::yoffs#2 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$9 ]
|
||||
[108] *((const byte[]) plot_yhi#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$9 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 ]
|
||||
[109] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte) 7 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$10 ]
|
||||
[110] if((byte~) init_plot_tables::$10!=(byte) 7) goto init_plot_tables::@4 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 ]
|
||||
to:init_plot_tables::@7
|
||||
init_plot_tables::@7: scope:[init_plot_tables] from init_plot_tables::@3
|
||||
[111] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (word) 320 [ init_plot_tables::y#2 init_plot_tables::yoffs#1 ]
|
||||
to:init_plot_tables::@4
|
||||
init_plot_tables::@4: scope:[init_plot_tables] from init_plot_tables::@3 init_plot_tables::@7
|
||||
[112] (byte*) init_plot_tables::yoffs#4 ← phi( init_plot_tables::@3/(byte*) init_plot_tables::yoffs#2 init_plot_tables::@7/(byte*) init_plot_tables::yoffs#1 ) [ init_plot_tables::y#2 init_plot_tables::yoffs#4 ]
|
||||
[113] (byte) init_plot_tables::y#1 ← ++ (byte) init_plot_tables::y#2 [ init_plot_tables::y#1 init_plot_tables::yoffs#4 ]
|
||||
[114] if((byte) init_plot_tables::y#1!=(byte) 0) goto init_plot_tables::@3 [ init_plot_tables::y#1 init_plot_tables::yoffs#4 ]
|
||||
to:init_plot_tables::@return
|
||||
init_plot_tables::@return: scope:[init_plot_tables] from init_plot_tables::@4
|
||||
[115] return [ ]
|
||||
to:@return
|
||||
init_plot_tables::@10: scope:[init_plot_tables] from init_plot_tables::@1
|
||||
to:init_plot_tables::@2
|
||||
init_screen: scope:[init_screen] from main
|
||||
[116] phi() [ ]
|
||||
to:init_screen::@1
|
||||
init_screen::@1: scope:[init_screen] from init_screen init_screen::@1
|
||||
[117] (byte*) init_screen::b#2 ← phi( init_screen/(const byte*) BITMAP#0 init_screen::@1/(byte*) init_screen::b#1 ) [ init_screen::b#2 ]
|
||||
[118] *((byte*) init_screen::b#2) ← (byte) 0 [ init_screen::b#2 ]
|
||||
[119] (byte*) init_screen::b#1 ← ++ (byte*) init_screen::b#2 [ init_screen::b#1 ]
|
||||
[120] if((byte*) init_screen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto init_screen::@1 [ init_screen::b#1 ]
|
||||
to:init_screen::@2
|
||||
init_screen::@2: scope:[init_screen] from init_screen::@1 init_screen::@2
|
||||
[121] (byte*) init_screen::c#2 ← phi( init_screen::@2/(byte*) init_screen::c#1 init_screen::@1/(const byte*) SCREEN#0 ) [ init_screen::c#2 ]
|
||||
[122] *((byte*) init_screen::c#2) ← (byte) 20 [ init_screen::c#2 ]
|
||||
[123] (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#2 [ init_screen::c#1 ]
|
||||
[124] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto init_screen::@2 [ init_screen::c#1 ]
|
||||
to:init_screen::@return
|
||||
init_screen::@return: scope:[init_screen] from init_screen::@2
|
||||
[125] return [ ]
|
||||
to:@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
(label) @5
|
||||
(label) @7
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -33,87 +33,127 @@
|
||||
(const byte*) SCREEN#0 SCREEN = (word) 1024
|
||||
(byte*) SCROLL
|
||||
(const byte*) SCROLL#0 SCROLL = (word) 53270
|
||||
(void()) initplottables()
|
||||
(byte~) initplottables::$0 reg byte a 22.0
|
||||
(byte~) initplottables::$10 reg byte a 22.0
|
||||
(byte~) initplottables::$6 $6 zp ZP_BYTE:2 11.0
|
||||
(byte~) initplottables::$7 reg byte a 22.0
|
||||
(byte~) initplottables::$8 reg byte a 22.0
|
||||
(byte~) initplottables::$9 reg byte a 22.0
|
||||
(label) initplottables::@1
|
||||
(label) initplottables::@10
|
||||
(label) initplottables::@2
|
||||
(label) initplottables::@3
|
||||
(label) initplottables::@4
|
||||
(label) initplottables::@7
|
||||
(label) initplottables::@return
|
||||
(byte) initplottables::bit
|
||||
(byte) initplottables::bit#1 reg byte y 33.0
|
||||
(byte) initplottables::bit#3 reg byte y 6.6000000000000005
|
||||
(byte) initplottables::bit#4 reg byte y 7.333333333333333
|
||||
(byte) initplottables::x
|
||||
(byte) initplottables::x#1 reg byte x 16.5
|
||||
(byte) initplottables::x#2 reg byte x 8.25
|
||||
(byte) initplottables::y
|
||||
(byte) initplottables::y#1 reg byte x 16.5
|
||||
(byte) initplottables::y#2 reg byte x 6.0
|
||||
(byte*) initplottables::yoffs
|
||||
(byte*) initplottables::yoffs#1 yoffs zp ZP_PTR_BYTE:6 22.0
|
||||
(byte*) initplottables::yoffs#2 yoffs zp ZP_PTR_BYTE:6 6.111111111111112
|
||||
(byte*) initplottables::yoffs#4 yoffs zp ZP_PTR_BYTE:6 11.0
|
||||
(void()) initscreen()
|
||||
(label) initscreen::@1
|
||||
(label) initscreen::@2
|
||||
(label) initscreen::@return
|
||||
(byte*) initscreen::b
|
||||
(byte*) initscreen::b#1 b zp ZP_PTR_BYTE:6 16.5
|
||||
(byte*) initscreen::b#2 b zp ZP_PTR_BYTE:6 16.5
|
||||
(byte*) initscreen::c
|
||||
(byte*) initscreen::c#1 c zp ZP_PTR_BYTE:6 16.5
|
||||
(byte*) initscreen::c#2 c zp ZP_PTR_BYTE:6 16.5
|
||||
(void()) line((byte) line::x0 , (byte) line::y0 , (byte) line::x1 , (byte) line::y1)
|
||||
(byte~) line::$10 reg byte a 22.0
|
||||
(void()) init_plot_tables()
|
||||
(byte~) init_plot_tables::$0 reg byte a 22.0
|
||||
(byte~) init_plot_tables::$10 reg byte a 22.0
|
||||
(byte~) init_plot_tables::$6 $6 zp ZP_BYTE:2 11.0
|
||||
(byte~) init_plot_tables::$7 reg byte a 22.0
|
||||
(byte~) init_plot_tables::$8 reg byte a 22.0
|
||||
(byte~) init_plot_tables::$9 reg byte a 22.0
|
||||
(label) init_plot_tables::@1
|
||||
(label) init_plot_tables::@10
|
||||
(label) init_plot_tables::@2
|
||||
(label) init_plot_tables::@3
|
||||
(label) init_plot_tables::@4
|
||||
(label) init_plot_tables::@7
|
||||
(label) init_plot_tables::@return
|
||||
(byte) init_plot_tables::bit
|
||||
(byte) init_plot_tables::bit#1 reg byte y 33.0
|
||||
(byte) init_plot_tables::bit#3 reg byte y 6.6000000000000005
|
||||
(byte) init_plot_tables::bit#4 reg byte y 7.333333333333333
|
||||
(byte) init_plot_tables::x
|
||||
(byte) init_plot_tables::x#1 reg byte x 16.5
|
||||
(byte) init_plot_tables::x#2 reg byte x 8.25
|
||||
(byte) init_plot_tables::y
|
||||
(byte) init_plot_tables::y#1 reg byte x 16.5
|
||||
(byte) init_plot_tables::y#2 reg byte x 6.0
|
||||
(byte*) init_plot_tables::yoffs
|
||||
(byte*) init_plot_tables::yoffs#1 yoffs zp ZP_PTR_BYTE:6 22.0
|
||||
(byte*) init_plot_tables::yoffs#2 yoffs zp ZP_PTR_BYTE:6 6.111111111111112
|
||||
(byte*) init_plot_tables::yoffs#4 yoffs zp ZP_PTR_BYTE:6 11.0
|
||||
(void()) init_screen()
|
||||
(label) init_screen::@1
|
||||
(label) init_screen::@2
|
||||
(label) init_screen::@return
|
||||
(byte*) init_screen::b
|
||||
(byte*) init_screen::b#1 b zp ZP_PTR_BYTE:6 16.5
|
||||
(byte*) init_screen::b#2 b zp ZP_PTR_BYTE:6 16.5
|
||||
(byte*) init_screen::c
|
||||
(byte*) init_screen::c#1 c zp ZP_PTR_BYTE:6 16.5
|
||||
(byte*) init_screen::c#2 c zp ZP_PTR_BYTE:6 16.5
|
||||
(void()) line((byte) line::x0 , (byte) line::x1 , (byte) line::y0 , (byte) line::y1)
|
||||
(label) line::@1
|
||||
(label) line::@10
|
||||
(label) line::@11
|
||||
(label) line::@15
|
||||
(label) line::@17
|
||||
(label) line::@19
|
||||
(label) line::@2
|
||||
(label) line::@22
|
||||
(label) line::@24
|
||||
(label) line::@3
|
||||
(label) line::@5
|
||||
(label) line::@7
|
||||
(label) line::@9
|
||||
(label) line::@return
|
||||
(byte) line::e
|
||||
(byte) line::e#0 e zp ZP_BYTE:5 4.0
|
||||
(byte) line::e#1 e zp ZP_BYTE:5 14.666666666666666
|
||||
(byte) line::e#2 e zp ZP_BYTE:5 22.0
|
||||
(byte) line::e#3 e zp ZP_BYTE:5 4.800000000000001
|
||||
(byte) line::e#6 e zp ZP_BYTE:5 11.0
|
||||
(byte) line::x
|
||||
(byte) line::x#0 x zp ZP_BYTE:3 1.0
|
||||
(byte) line::x#1 x zp ZP_BYTE:3 4.125
|
||||
(byte) line::x#2 x zp ZP_BYTE:3 8.75
|
||||
(byte) line::x0
|
||||
(byte) line::x0#0 x0 zp ZP_BYTE:5 10.636363636363635
|
||||
(byte) line::x1
|
||||
(byte) line::x1#2 x1 zp ZP_BYTE:2 0.8125
|
||||
(byte) line::x1#0 x1 zp ZP_BYTE:8 4.874999999999997
|
||||
(byte) line::xd
|
||||
(byte) line::xd#0 xd zp ZP_BYTE:8 1.5999999999999999
|
||||
(byte) line::y
|
||||
(byte) line::y#0 y zp ZP_BYTE:4 1.0
|
||||
(byte) line::y#1 y zp ZP_BYTE:4 11.0
|
||||
(byte) line::y#2 y zp ZP_BYTE:4 6.571428571428571
|
||||
(byte) line::y#4 y zp ZP_BYTE:4 11.0
|
||||
(byte) line::xd#0 reg byte a 20.0
|
||||
(byte) line::xd#1 xd zp ZP_BYTE:10 0.8571428571428571
|
||||
(byte) line::y0
|
||||
(byte) line::y0#0 reg byte y 8.357142857142858
|
||||
(byte) line::y1
|
||||
(byte) line::y1#2 reg byte x 1.0
|
||||
(byte) line::y1#0 y1 zp ZP_BYTE:9 4.791666666666664
|
||||
(byte) line::yd
|
||||
(byte) line::yd#0 yd zp ZP_BYTE:9 1.0714285714285714
|
||||
(byte) line::yd#0 reg byte x 1.0
|
||||
(void()) line_xdyi((byte) line_xdyi::x , (byte) line_xdyi::y , (byte) line_xdyi::x1 , (byte) line_xdyi::xd , (byte) line_xdyi::yd)
|
||||
(byte~) line_xdyi::$8 reg byte a 22.0
|
||||
(label) line_xdyi::@1
|
||||
(label) line_xdyi::@2
|
||||
(label) line_xdyi::@3
|
||||
(label) line_xdyi::@5
|
||||
(label) line_xdyi::@return
|
||||
(byte) line_xdyi::e
|
||||
(byte) line_xdyi::e#0 e zp ZP_BYTE:5 4.0
|
||||
(byte) line_xdyi::e#1 e zp ZP_BYTE:5 14.666666666666666
|
||||
(byte) line_xdyi::e#2 e zp ZP_BYTE:5 22.0
|
||||
(byte) line_xdyi::e#3 e zp ZP_BYTE:5 4.800000000000001
|
||||
(byte) line_xdyi::e#6 e zp ZP_BYTE:5 11.0
|
||||
(byte) line_xdyi::x
|
||||
(byte) line_xdyi::x#0 x zp ZP_BYTE:3 0.6666666666666666
|
||||
(byte) line_xdyi::x#1 x zp ZP_BYTE:3 4.125
|
||||
(byte) line_xdyi::x#2 x zp ZP_BYTE:3 8.75
|
||||
(byte) line_xdyi::x1
|
||||
(byte) line_xdyi::x1#0 x1 zp ZP_BYTE:11 0.8125
|
||||
(byte) line_xdyi::xd
|
||||
(byte) line_xdyi::xd#0 xd zp ZP_BYTE:10 1.5999999999999999
|
||||
(byte) line_xdyi::y
|
||||
(byte) line_xdyi::y#0 y zp ZP_BYTE:4 0.8
|
||||
(byte) line_xdyi::y#1 y zp ZP_BYTE:4 11.0
|
||||
(byte) line_xdyi::y#2 y zp ZP_BYTE:4 6.571428571428571
|
||||
(byte) line_xdyi::y#5 y zp ZP_BYTE:4 11.0
|
||||
(byte) line_xdyi::yd
|
||||
(byte) line_xdyi::yd#0 yd zp ZP_BYTE:12 1.0714285714285714
|
||||
(void()) lines()
|
||||
(byte~) lines::$0 reg byte y 50.5
|
||||
(byte~) lines::$2 $2 zp ZP_BYTE:3 50.5
|
||||
(byte~) lines::$3 $3 zp ZP_BYTE:4 50.5
|
||||
(byte~) lines::$5 reg byte x 50.5
|
||||
(label) lines::@1
|
||||
(label) lines::@3
|
||||
(label) lines::@return
|
||||
(byte) lines::l
|
||||
(byte) lines::l#1 l zp ZP_BYTE:2 151.5
|
||||
(byte) lines::l#2 l zp ZP_BYTE:2 60.6
|
||||
(byte) lines_cnt
|
||||
(const byte) lines_cnt#0 lines_cnt = (byte) 8
|
||||
(byte[]) lines_x
|
||||
(const byte[]) lines_x#0 lines_x = { (byte) 60, (byte) 80, (byte) 110, (byte) 80, (byte) 60, (byte) 40, (byte) 10, (byte) 40, (byte) 60 }
|
||||
(byte[]) lines_y
|
||||
(const byte[]) lines_y#0 lines_y = { (byte) 10, (byte) 40, (byte) 60, (byte) 80, (byte) 110, (byte) 80, (byte) 60, (byte) 40, (byte) 10 }
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@5
|
||||
(label) main::@return
|
||||
(void()) plot((byte) plot::x , (byte) plot::y)
|
||||
(byte~) plot::$0 reg byte a 4.0
|
||||
(byte~) plot::$1 reg byte a 4.0
|
||||
(byte~) plot::$2 reg byte a 4.0
|
||||
(byte~) plot::$3 reg byte a 4.0
|
||||
(byte~) plot::$5 $5 zp ZP_BYTE:12 2.0
|
||||
(byte~) plot::$5 $5 zp ZP_BYTE:15 2.0
|
||||
(byte~) plot::$6 reg byte a 4.0
|
||||
(byte~) plot::$7 reg byte a 4.0
|
||||
(label) plot::@return
|
||||
@ -123,12 +163,30 @@
|
||||
(byte*) plot::plotter_x#1 plotter_x zp ZP_PTR_BYTE:6 2.0
|
||||
(byte*) plot::plotter_x#2 plotter_x zp ZP_PTR_BYTE:6 0.8
|
||||
(byte*) plot::plotter_y
|
||||
(byte*) plot::plotter_y#1 plotter_y zp ZP_PTR_BYTE:10 2.0
|
||||
(byte*) plot::plotter_y#2 plotter_y zp ZP_PTR_BYTE:10 4.0
|
||||
(byte*) plot::plotter_y#1 plotter_y zp ZP_PTR_BYTE:13 2.0
|
||||
(byte*) plot::plotter_y#2 plotter_y zp ZP_PTR_BYTE:13 4.0
|
||||
(byte) plot::x
|
||||
(byte) plot::x#0 reg byte x 1.4166666666666667
|
||||
(byte) plot::x#0 reg byte x 2.0
|
||||
(byte) plot::x#1 reg byte x 2.0
|
||||
(byte) plot::x#2 reg byte x 2.0
|
||||
(byte) plot::x#3 reg byte x 2.0
|
||||
(byte) plot::x#4 reg byte x 2.0
|
||||
(byte) plot::x#5 reg byte x 2.0
|
||||
(byte) plot::x#6 reg byte x 2.0
|
||||
(byte) plot::x#7 reg byte x 2.0
|
||||
(byte) plot::x#8 reg byte x 11.0
|
||||
(byte) plot::x#9 reg byte x 3.0
|
||||
(byte) plot::y
|
||||
(byte) plot::y#0 reg byte y 2.142857142857143
|
||||
(byte) plot::y#0 reg byte y 4.0
|
||||
(byte) plot::y#1 reg byte y 4.0
|
||||
(byte) plot::y#2 reg byte y 4.0
|
||||
(byte) plot::y#3 reg byte y 4.0
|
||||
(byte) plot::y#4 reg byte y 4.0
|
||||
(byte) plot::y#5 reg byte y 4.0
|
||||
(byte) plot::y#6 reg byte y 4.0
|
||||
(byte) plot::y#7 reg byte y 4.0
|
||||
(byte) plot::y#8 reg byte y 22.0
|
||||
(byte) plot::y#9 reg byte y 4.428571428571428
|
||||
(byte[]) plot_bit
|
||||
(const byte[]) plot_bit#0 plot_bit = (word) 5120
|
||||
(byte[]) plot_xhi
|
||||
@ -140,30 +198,37 @@
|
||||
(byte[]) plot_ylo
|
||||
(const byte[]) plot_ylo#0 plot_ylo = (word) 4608
|
||||
|
||||
zp ZP_BYTE:2 [ line::x1#2 initplottables::$6 ]
|
||||
reg byte x [ line::y1#2 ]
|
||||
zp ZP_BYTE:3 [ line::x#2 line::x#0 line::x#1 ]
|
||||
zp ZP_BYTE:4 [ line::y#2 line::y#0 line::y#4 line::y#1 ]
|
||||
zp ZP_BYTE:5 [ line::e#3 line::e#0 line::e#6 line::e#2 line::e#1 ]
|
||||
reg byte x [ initplottables::x#2 initplottables::x#1 ]
|
||||
reg byte y [ initplottables::bit#3 initplottables::bit#4 initplottables::bit#1 ]
|
||||
reg byte x [ initplottables::y#2 initplottables::y#1 ]
|
||||
zp ZP_PTR_BYTE:6 [ initplottables::yoffs#2 initplottables::yoffs#4 initplottables::yoffs#1 initscreen::b#2 initscreen::b#1 initscreen::c#2 initscreen::c#1 plot::plotter_x#1 plot::plotter_x#2 plot::plotter#0 ]
|
||||
zp ZP_BYTE:8 [ line::xd#0 ]
|
||||
zp ZP_BYTE:9 [ line::yd#0 ]
|
||||
reg byte x [ plot::x#0 ]
|
||||
reg byte y [ plot::y#0 ]
|
||||
reg byte a [ line::$10 ]
|
||||
zp ZP_BYTE:2 [ lines::l#2 lines::l#1 init_plot_tables::$6 ]
|
||||
reg byte x [ plot::x#9 plot::x#6 plot::x#1 plot::x#3 plot::x#0 plot::x#5 plot::x#7 plot::x#2 plot::x#4 plot::x#8 ]
|
||||
reg byte y [ plot::y#9 plot::y#6 plot::y#1 plot::y#3 plot::y#0 plot::y#5 plot::y#7 plot::y#2 plot::y#4 plot::y#8 ]
|
||||
zp ZP_BYTE:3 [ line_xdyi::x#2 line_xdyi::x#0 line_xdyi::x#1 lines::$2 ]
|
||||
zp ZP_BYTE:4 [ line_xdyi::y#2 line_xdyi::y#0 line_xdyi::y#5 line_xdyi::y#1 lines::$3 ]
|
||||
zp ZP_BYTE:5 [ line_xdyi::e#3 line_xdyi::e#0 line_xdyi::e#6 line_xdyi::e#2 line_xdyi::e#1 line::x0#0 ]
|
||||
reg byte x [ init_plot_tables::x#2 init_plot_tables::x#1 ]
|
||||
reg byte y [ init_plot_tables::bit#3 init_plot_tables::bit#4 init_plot_tables::bit#1 ]
|
||||
reg byte x [ init_plot_tables::y#2 init_plot_tables::y#1 ]
|
||||
zp ZP_PTR_BYTE:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 init_screen::c#2 init_screen::c#1 plot::plotter_x#1 plot::plotter_x#2 plot::plotter#0 ]
|
||||
reg byte y [ lines::$0 ]
|
||||
reg byte x [ lines::$5 ]
|
||||
zp ZP_BYTE:8 [ line::x1#0 ]
|
||||
reg byte y [ line::y0#0 ]
|
||||
zp ZP_BYTE:9 [ line::y1#0 ]
|
||||
zp ZP_BYTE:10 [ line::xd#1 line_xdyi::xd#0 ]
|
||||
reg byte x [ line::yd#0 ]
|
||||
zp ZP_BYTE:11 [ line_xdyi::x1#0 ]
|
||||
zp ZP_BYTE:12 [ line_xdyi::yd#0 ]
|
||||
reg byte a [ line::xd#0 ]
|
||||
reg byte a [ plot::$0 ]
|
||||
reg byte a [ plot::$1 ]
|
||||
reg byte a [ plot::$2 ]
|
||||
zp ZP_PTR_BYTE:10 [ plot::plotter_y#1 plot::plotter_y#2 ]
|
||||
zp ZP_PTR_BYTE:13 [ plot::plotter_y#1 plot::plotter_y#2 ]
|
||||
reg byte a [ plot::$3 ]
|
||||
zp ZP_BYTE:12 [ plot::$5 ]
|
||||
zp ZP_BYTE:15 [ plot::$5 ]
|
||||
reg byte a [ plot::$6 ]
|
||||
reg byte a [ plot::$7 ]
|
||||
reg byte a [ initplottables::$0 ]
|
||||
reg byte a [ initplottables::$7 ]
|
||||
reg byte a [ initplottables::$8 ]
|
||||
reg byte a [ initplottables::$9 ]
|
||||
reg byte a [ initplottables::$10 ]
|
||||
reg byte a [ line_xdyi::$8 ]
|
||||
reg byte a [ init_plot_tables::$0 ]
|
||||
reg byte a [ init_plot_tables::$7 ]
|
||||
reg byte a [ init_plot_tables::$8 ]
|
||||
reg byte a [ init_plot_tables::$9 ]
|
||||
reg byte a [ init_plot_tables::$10 ]
|
||||
|
200
src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.asm
Normal file
200
src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.asm
Normal file
@ -0,0 +1,200 @@
|
||||
.const D011 = $d011
|
||||
.const RST8 = $80
|
||||
.const ECM = $40
|
||||
.const BMM = $20
|
||||
.const DEN = $10
|
||||
.const RSEL = 8
|
||||
.const RASTER = $d012
|
||||
.const D016 = $d016
|
||||
.const MCM = $10
|
||||
.const CSEL = 8
|
||||
.const D018 = $d018
|
||||
.const BGCOL = $d020
|
||||
.const FGCOL = $d021
|
||||
.const COLS = $d800
|
||||
.const SCREEN = $400
|
||||
.const BITMAP = $2000
|
||||
.const plots_cnt = 8
|
||||
.const plot_xlo = $1000
|
||||
.const plot_xhi = $1100
|
||||
.const plot_ylo = $1200
|
||||
.const plot_yhi = $1300
|
||||
.const plot_bit = $1400
|
||||
plots_x: .byte $3c, $50, $6e, $50, $3c, $28, $a, $28
|
||||
plots_y: .byte $a, $28, $3c, $50, $6e, $50, $3c, $28
|
||||
jsr main
|
||||
main: {
|
||||
lda #0
|
||||
sta BGCOL
|
||||
sta FGCOL
|
||||
lda #BMM|DEN|RSEL|3
|
||||
sta D011
|
||||
lda #$18
|
||||
sta D018
|
||||
jsr init_screen
|
||||
jsr init_plot_tables
|
||||
b2:
|
||||
lda RASTER
|
||||
cmp #$ff
|
||||
bne b2
|
||||
ldx BGCOL
|
||||
inx
|
||||
stx BGCOL
|
||||
jsr plots
|
||||
ldx BGCOL
|
||||
dex
|
||||
stx BGCOL
|
||||
jmp b2
|
||||
rts
|
||||
}
|
||||
plots: {
|
||||
.label i = 2
|
||||
lda #0
|
||||
sta i
|
||||
b1:
|
||||
ldx i
|
||||
lda plots_x,x
|
||||
tay
|
||||
ldx i
|
||||
lda plots_y,x
|
||||
sty plot.x
|
||||
tay
|
||||
jsr plot
|
||||
inc i
|
||||
lda i
|
||||
cmp #plots_cnt
|
||||
bcc b1
|
||||
rts
|
||||
}
|
||||
plot: {
|
||||
.label _5 = 8
|
||||
.label x = 5
|
||||
.label plotter_x = 3
|
||||
.label plotter_y = 6
|
||||
.label plotter = 3
|
||||
ldx x
|
||||
lda plot_xhi,x
|
||||
sta plotter_x+1
|
||||
lda #<0
|
||||
sta plotter_x
|
||||
ldx x
|
||||
lda plot_xlo,x
|
||||
sta plotter_x
|
||||
lda plot_yhi,y
|
||||
sta plotter_y+1
|
||||
lda #<0
|
||||
sta plotter_y
|
||||
lda plot_ylo,y
|
||||
sta plotter_y
|
||||
lda plotter
|
||||
clc
|
||||
adc plotter_y
|
||||
sta plotter
|
||||
lda plotter+1
|
||||
adc plotter_y+1
|
||||
sta plotter+1
|
||||
ldy #0
|
||||
lda (plotter),y
|
||||
sta _5
|
||||
ldx x
|
||||
lda plot_bit,x
|
||||
ora _5
|
||||
sta (plotter),y
|
||||
rts
|
||||
}
|
||||
init_plot_tables: {
|
||||
.label _6 = 2
|
||||
.label yoffs = 3
|
||||
ldy #$80
|
||||
ldx #0
|
||||
b1:
|
||||
txa
|
||||
and #$f8
|
||||
sta plot_xlo,x
|
||||
lda #>BITMAP
|
||||
sta plot_xhi,x
|
||||
tya
|
||||
sta plot_bit,x
|
||||
tya
|
||||
lsr
|
||||
tay
|
||||
cpy #0
|
||||
bne b10
|
||||
ldy #$80
|
||||
b2:
|
||||
inx
|
||||
cpx #0
|
||||
bne b1
|
||||
lda #0
|
||||
sta yoffs
|
||||
sta yoffs+1
|
||||
ldx #0
|
||||
b3:
|
||||
txa
|
||||
and #7
|
||||
sta _6
|
||||
lda yoffs
|
||||
ora _6
|
||||
sta plot_ylo,x
|
||||
lda yoffs+1
|
||||
sta plot_yhi,x
|
||||
txa
|
||||
and #7
|
||||
cmp #7
|
||||
bne b4
|
||||
lda yoffs
|
||||
clc
|
||||
adc #<$140
|
||||
sta yoffs
|
||||
lda yoffs+1
|
||||
adc #>$140
|
||||
sta yoffs+1
|
||||
b4:
|
||||
inx
|
||||
cpx #0
|
||||
bne b3
|
||||
rts
|
||||
b10:
|
||||
jmp b2
|
||||
}
|
||||
init_screen: {
|
||||
.label b = 3
|
||||
.label c = 3
|
||||
lda #<BITMAP
|
||||
sta b
|
||||
lda #>BITMAP
|
||||
sta b+1
|
||||
b1:
|
||||
ldy #0
|
||||
lda #0
|
||||
sta (b),y
|
||||
inc b
|
||||
bne !+
|
||||
inc b+1
|
||||
!:
|
||||
lda b+1
|
||||
cmp #>BITMAP+$2000
|
||||
bne b1
|
||||
lda b
|
||||
cmp #<BITMAP+$2000
|
||||
bne b1
|
||||
lda #<SCREEN
|
||||
sta c
|
||||
lda #>SCREEN
|
||||
sta c+1
|
||||
b2:
|
||||
ldy #0
|
||||
lda #$14
|
||||
sta (c),y
|
||||
inc c
|
||||
bne !+
|
||||
inc c+1
|
||||
!:
|
||||
lda c+1
|
||||
cmp #>SCREEN+$400
|
||||
bne b2
|
||||
lda c
|
||||
cmp #<SCREEN+$400
|
||||
bne b2
|
||||
rts
|
||||
}
|
132
src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.cfg
Normal file
132
src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.cfg
Normal file
@ -0,0 +1,132 @@
|
||||
@begin: scope:[] from
|
||||
to:@5
|
||||
@5: scope:[] from @begin
|
||||
[0] call main param-assignment [ ]
|
||||
to:@end
|
||||
@end: scope:[] from @5
|
||||
main: scope:[main] from @5
|
||||
[1] *((const byte*) BGCOL#0) ← (byte) 0 [ ]
|
||||
[2] *((const byte*) FGCOL#0) ← (byte) 0 [ ]
|
||||
[3] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte) 3 [ ]
|
||||
[4] *((const byte*) D018#0) ← (byte) 24 [ ]
|
||||
[5] call init_screen param-assignment [ ]
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main
|
||||
[6] call init_plot_tables param-assignment [ ]
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@2 main::@5 main::@7
|
||||
[7] (byte~) main::$5 ← * (const byte*) RASTER#0 [ main::$5 ]
|
||||
[8] if((byte~) main::$5!=(byte) 255) goto main::@2 [ ]
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2
|
||||
[9] (byte~) main::$7 ← * (const byte*) BGCOL#0 [ main::$7 ]
|
||||
[10] (byte~) main::$8 ← (byte~) main::$7 + (byte) 1 [ main::$8 ]
|
||||
[11] *((const byte*) BGCOL#0) ← (byte~) main::$8 [ ]
|
||||
[12] call plots param-assignment [ ]
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::@3
|
||||
[13] (byte~) main::$10 ← * (const byte*) BGCOL#0 [ main::$10 ]
|
||||
[14] (byte~) main::$11 ← (byte~) main::$10 - (byte) 1 [ main::$11 ]
|
||||
[15] *((const byte*) BGCOL#0) ← (byte~) main::$11 [ ]
|
||||
[16] if(true) goto main::@2 [ ]
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@7
|
||||
[17] return [ ]
|
||||
to:@return
|
||||
plots: scope:[plots] from main::@3
|
||||
[18] phi() [ ]
|
||||
to:plots::@1
|
||||
plots::@1: scope:[plots] from plots plots::@3
|
||||
[19] (byte) plots::i#2 ← phi( plots/(byte) 0 plots::@3/(byte) plots::i#1 ) [ plots::i#2 ]
|
||||
[20] (byte~) plots::$0 ← (const byte[]) plots_x#0 *idx (byte) plots::i#2 [ plots::i#2 plots::$0 ]
|
||||
[21] (byte~) plots::$1 ← (const byte[]) plots_y#0 *idx (byte) plots::i#2 [ plots::i#2 plots::$0 plots::$1 ]
|
||||
[22] (byte) plot::x#0 ← (byte~) plots::$0 [ plots::i#2 plots::$1 plot::x#0 ]
|
||||
[23] (byte) plot::y#0 ← (byte~) plots::$1 [ plots::i#2 plot::x#0 plot::y#0 ]
|
||||
[24] call plot param-assignment [ plots::i#2 ]
|
||||
to:plots::@3
|
||||
plots::@3: scope:[plots] from plots::@1
|
||||
[25] (byte) plots::i#1 ← ++ (byte) plots::i#2 [ plots::i#1 ]
|
||||
[26] if((byte) plots::i#1<(const byte) plots_cnt#0) goto plots::@1 [ plots::i#1 ]
|
||||
to:plots::@return
|
||||
plots::@return: scope:[plots] from plots::@3
|
||||
[27] return [ ]
|
||||
to:@return
|
||||
plot: scope:[plot] from plots::@1
|
||||
[28] (byte~) plot::$0 ← (const byte[]) plot_xhi#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::$0 ]
|
||||
[29] (byte*) plot::plotter_x#1 ← (byte) 0 hi= (byte~) plot::$0 [ plot::x#0 plot::y#0 plot::plotter_x#1 ]
|
||||
[30] (byte~) plot::$1 ← (const byte[]) plot_xlo#0 *idx (byte) plot::x#0 [ plot::x#0 plot::y#0 plot::plotter_x#1 plot::$1 ]
|
||||
[31] (byte*) plot::plotter_x#2 ← (byte*) plot::plotter_x#1 lo= (byte~) plot::$1 [ plot::x#0 plot::y#0 plot::plotter_x#2 ]
|
||||
[32] (byte~) plot::$2 ← (const byte[]) plot_yhi#0 *idx (byte) plot::y#0 [ plot::x#0 plot::y#0 plot::plotter_x#2 plot::$2 ]
|
||||
[33] (byte*) plot::plotter_y#1 ← (byte) 0 hi= (byte~) plot::$2 [ plot::x#0 plot::y#0 plot::plotter_x#2 plot::plotter_y#1 ]
|
||||
[34] (byte~) plot::$3 ← (const byte[]) plot_ylo#0 *idx (byte) plot::y#0 [ plot::x#0 plot::plotter_x#2 plot::plotter_y#1 plot::$3 ]
|
||||
[35] (byte*) plot::plotter_y#2 ← (byte*) plot::plotter_y#1 lo= (byte~) plot::$3 [ plot::x#0 plot::plotter_x#2 plot::plotter_y#2 ]
|
||||
[36] (byte*) plot::plotter#0 ← (byte*) plot::plotter_x#2 + (byte*) plot::plotter_y#2 [ plot::x#0 plot::plotter#0 ]
|
||||
[37] (byte~) plot::$5 ← * (byte*) plot::plotter#0 [ plot::x#0 plot::plotter#0 plot::$5 ]
|
||||
[38] (byte~) plot::$6 ← (const byte[]) plot_bit#0 *idx (byte) plot::x#0 [ plot::plotter#0 plot::$5 plot::$6 ]
|
||||
[39] (byte~) plot::$7 ← (byte~) plot::$5 | (byte~) plot::$6 [ plot::plotter#0 plot::$7 ]
|
||||
[40] *((byte*) plot::plotter#0) ← (byte~) plot::$7 [ ]
|
||||
to:plot::@return
|
||||
plot::@return: scope:[plot] from plot
|
||||
[41] return [ ]
|
||||
to:@return
|
||||
init_plot_tables: scope:[init_plot_tables] from main::@5
|
||||
[42] phi() [ ]
|
||||
to:init_plot_tables::@1
|
||||
init_plot_tables::@1: scope:[init_plot_tables] from init_plot_tables init_plot_tables::@2
|
||||
[43] (byte) init_plot_tables::bit#3 ← phi( init_plot_tables/(byte) 128 init_plot_tables::@2/(byte) init_plot_tables::bit#4 ) [ init_plot_tables::x#2 init_plot_tables::bit#3 ]
|
||||
[43] (byte) init_plot_tables::x#2 ← phi( init_plot_tables/(byte) 0 init_plot_tables::@2/(byte) init_plot_tables::x#1 ) [ init_plot_tables::x#2 init_plot_tables::bit#3 ]
|
||||
[44] (byte~) init_plot_tables::$0 ← (byte) init_plot_tables::x#2 & (byte) 248 [ init_plot_tables::x#2 init_plot_tables::bit#3 init_plot_tables::$0 ]
|
||||
[45] *((const byte[]) plot_xlo#0 + (byte) init_plot_tables::x#2) ← (byte~) init_plot_tables::$0 [ init_plot_tables::x#2 init_plot_tables::bit#3 ]
|
||||
[46] *((const byte[]) plot_xhi#0 + (byte) init_plot_tables::x#2) ← >(const byte*) BITMAP#0 [ init_plot_tables::x#2 init_plot_tables::bit#3 ]
|
||||
[47] *((const byte[]) plot_bit#0 + (byte) init_plot_tables::x#2) ← (byte) init_plot_tables::bit#3 [ init_plot_tables::x#2 init_plot_tables::bit#3 ]
|
||||
[48] (byte) init_plot_tables::bit#1 ← (byte) init_plot_tables::bit#3 >> (byte) 1 [ init_plot_tables::x#2 init_plot_tables::bit#1 ]
|
||||
[49] if((byte) init_plot_tables::bit#1!=(byte) 0) goto init_plot_tables::@10 [ init_plot_tables::x#2 ]
|
||||
to:init_plot_tables::@2
|
||||
init_plot_tables::@2: scope:[init_plot_tables] from init_plot_tables::@1 init_plot_tables::@10
|
||||
[50] (byte) init_plot_tables::bit#4 ← phi( init_plot_tables::@10/(byte) init_plot_tables::bit#1 init_plot_tables::@1/(byte) 128 ) [ init_plot_tables::x#2 init_plot_tables::bit#4 ]
|
||||
[51] (byte) init_plot_tables::x#1 ← ++ (byte) init_plot_tables::x#2 [ init_plot_tables::x#1 init_plot_tables::bit#4 ]
|
||||
[52] if((byte) init_plot_tables::x#1!=(byte) 0) goto init_plot_tables::@1 [ init_plot_tables::x#1 init_plot_tables::bit#4 ]
|
||||
to:init_plot_tables::@3
|
||||
init_plot_tables::@3: scope:[init_plot_tables] from init_plot_tables::@2 init_plot_tables::@4
|
||||
[53] (byte*) init_plot_tables::yoffs#2 ← phi( init_plot_tables::@4/(byte*) init_plot_tables::yoffs#4 init_plot_tables::@2/(byte) 0 ) [ init_plot_tables::y#2 init_plot_tables::yoffs#2 ]
|
||||
[53] (byte) init_plot_tables::y#2 ← phi( init_plot_tables::@4/(byte) init_plot_tables::y#1 init_plot_tables::@2/(byte) 0 ) [ init_plot_tables::y#2 init_plot_tables::yoffs#2 ]
|
||||
[54] (byte~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (byte) 7 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$6 ]
|
||||
[55] (byte~) init_plot_tables::$7 ← < (byte*) init_plot_tables::yoffs#2 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$6 init_plot_tables::$7 ]
|
||||
[56] (byte~) init_plot_tables::$8 ← (byte~) init_plot_tables::$6 | (byte~) init_plot_tables::$7 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$8 ]
|
||||
[57] *((const byte[]) plot_ylo#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$8 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 ]
|
||||
[58] (byte~) init_plot_tables::$9 ← > (byte*) init_plot_tables::yoffs#2 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$9 ]
|
||||
[59] *((const byte[]) plot_yhi#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$9 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 ]
|
||||
[60] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte) 7 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 init_plot_tables::$10 ]
|
||||
[61] if((byte~) init_plot_tables::$10!=(byte) 7) goto init_plot_tables::@4 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 ]
|
||||
to:init_plot_tables::@7
|
||||
init_plot_tables::@7: scope:[init_plot_tables] from init_plot_tables::@3
|
||||
[62] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (word) 320 [ init_plot_tables::y#2 init_plot_tables::yoffs#1 ]
|
||||
to:init_plot_tables::@4
|
||||
init_plot_tables::@4: scope:[init_plot_tables] from init_plot_tables::@3 init_plot_tables::@7
|
||||
[63] (byte*) init_plot_tables::yoffs#4 ← phi( init_plot_tables::@3/(byte*) init_plot_tables::yoffs#2 init_plot_tables::@7/(byte*) init_plot_tables::yoffs#1 ) [ init_plot_tables::y#2 init_plot_tables::yoffs#4 ]
|
||||
[64] (byte) init_plot_tables::y#1 ← ++ (byte) init_plot_tables::y#2 [ init_plot_tables::y#1 init_plot_tables::yoffs#4 ]
|
||||
[65] if((byte) init_plot_tables::y#1!=(byte) 0) goto init_plot_tables::@3 [ init_plot_tables::y#1 init_plot_tables::yoffs#4 ]
|
||||
to:init_plot_tables::@return
|
||||
init_plot_tables::@return: scope:[init_plot_tables] from init_plot_tables::@4
|
||||
[66] return [ ]
|
||||
to:@return
|
||||
init_plot_tables::@10: scope:[init_plot_tables] from init_plot_tables::@1
|
||||
to:init_plot_tables::@2
|
||||
init_screen: scope:[init_screen] from main
|
||||
[67] phi() [ ]
|
||||
to:init_screen::@1
|
||||
init_screen::@1: scope:[init_screen] from init_screen init_screen::@1
|
||||
[68] (byte*) init_screen::b#2 ← phi( init_screen/(const byte*) BITMAP#0 init_screen::@1/(byte*) init_screen::b#1 ) [ init_screen::b#2 ]
|
||||
[69] *((byte*) init_screen::b#2) ← (byte) 0 [ init_screen::b#2 ]
|
||||
[70] (byte*) init_screen::b#1 ← ++ (byte*) init_screen::b#2 [ init_screen::b#1 ]
|
||||
[71] if((byte*) init_screen::b#1!=(const byte*) BITMAP#0+(word) 8192) goto init_screen::@1 [ init_screen::b#1 ]
|
||||
to:init_screen::@2
|
||||
init_screen::@2: scope:[init_screen] from init_screen::@1 init_screen::@2
|
||||
[72] (byte*) init_screen::c#2 ← phi( init_screen::@2/(byte*) init_screen::c#1 init_screen::@1/(const byte*) SCREEN#0 ) [ init_screen::c#2 ]
|
||||
[73] *((byte*) init_screen::c#2) ← (byte) 20 [ init_screen::c#2 ]
|
||||
[74] (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#2 [ init_screen::c#1 ]
|
||||
[75] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word) 1024) goto init_screen::@2 [ init_screen::c#1 ]
|
||||
to:init_screen::@return
|
||||
init_screen::@return: scope:[init_screen] from init_screen::@2
|
||||
[76] return [ ]
|
||||
to:@return
|
8869
src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log
Normal file
8869
src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log
Normal file
File diff suppressed because it is too large
Load Diff
158
src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.sym
Normal file
158
src/main/java/dk/camelot64/kickc/test/ref/bitmap-plotter.sym
Normal file
@ -0,0 +1,158 @@
|
||||
(label) @5
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
(const byte*) BGCOL#0 BGCOL = (word) 53280
|
||||
(byte*) BITMAP
|
||||
(const byte*) BITMAP#0 BITMAP = (word) 8192
|
||||
(byte) BMM
|
||||
(const byte) BMM#0 BMM = (byte) 32
|
||||
(byte*) COLS
|
||||
(const byte*) COLS#0 COLS = (word) 55296
|
||||
(byte) CSEL
|
||||
(const byte) CSEL#0 CSEL = (byte) 8
|
||||
(byte*) D011
|
||||
(const byte*) D011#0 D011 = (word) 53265
|
||||
(byte*) D016
|
||||
(const byte*) D016#0 D016 = (word) 53270
|
||||
(byte*) D018
|
||||
(const byte*) D018#0 D018 = (word) 53272
|
||||
(byte) DEN
|
||||
(const byte) DEN#0 DEN = (byte) 16
|
||||
(byte) ECM
|
||||
(const byte) ECM#0 ECM = (byte) 64
|
||||
(byte*) FGCOL
|
||||
(const byte*) FGCOL#0 FGCOL = (word) 53281
|
||||
(byte) MCM
|
||||
(const byte) MCM#0 MCM = (byte) 16
|
||||
(byte*) RASTER
|
||||
(const byte*) RASTER#0 RASTER = (word) 53266
|
||||
(byte) RSEL
|
||||
(const byte) RSEL#0 RSEL = (byte) 8
|
||||
(byte) RST8
|
||||
(const byte) RST8#0 RST8 = (byte) 128
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = (word) 1024
|
||||
(void()) init_plot_tables()
|
||||
(byte~) init_plot_tables::$0 reg byte a 22.0
|
||||
(byte~) init_plot_tables::$10 reg byte a 22.0
|
||||
(byte~) init_plot_tables::$6 $6 zp ZP_BYTE:2 11.0
|
||||
(byte~) init_plot_tables::$7 reg byte a 22.0
|
||||
(byte~) init_plot_tables::$8 reg byte a 22.0
|
||||
(byte~) init_plot_tables::$9 reg byte a 22.0
|
||||
(label) init_plot_tables::@1
|
||||
(label) init_plot_tables::@10
|
||||
(label) init_plot_tables::@2
|
||||
(label) init_plot_tables::@3
|
||||
(label) init_plot_tables::@4
|
||||
(label) init_plot_tables::@7
|
||||
(label) init_plot_tables::@return
|
||||
(byte) init_plot_tables::bit
|
||||
(byte) init_plot_tables::bit#1 reg byte y 33.0
|
||||
(byte) init_plot_tables::bit#3 reg byte y 6.6000000000000005
|
||||
(byte) init_plot_tables::bit#4 reg byte y 7.333333333333333
|
||||
(byte) init_plot_tables::x
|
||||
(byte) init_plot_tables::x#1 reg byte x 16.5
|
||||
(byte) init_plot_tables::x#2 reg byte x 8.25
|
||||
(byte) init_plot_tables::y
|
||||
(byte) init_plot_tables::y#1 reg byte x 16.5
|
||||
(byte) init_plot_tables::y#2 reg byte x 6.0
|
||||
(byte*) init_plot_tables::yoffs
|
||||
(byte*) init_plot_tables::yoffs#1 yoffs zp ZP_PTR_BYTE:3 22.0
|
||||
(byte*) init_plot_tables::yoffs#2 yoffs zp ZP_PTR_BYTE:3 6.111111111111112
|
||||
(byte*) init_plot_tables::yoffs#4 yoffs zp ZP_PTR_BYTE:3 11.0
|
||||
(void()) init_screen()
|
||||
(label) init_screen::@1
|
||||
(label) init_screen::@2
|
||||
(label) init_screen::@return
|
||||
(byte*) init_screen::b
|
||||
(byte*) init_screen::b#1 b zp ZP_PTR_BYTE:3 16.5
|
||||
(byte*) init_screen::b#2 b zp ZP_PTR_BYTE:3 16.5
|
||||
(byte*) init_screen::c
|
||||
(byte*) init_screen::c#1 c zp ZP_PTR_BYTE:3 16.5
|
||||
(byte*) init_screen::c#2 c zp ZP_PTR_BYTE:3 16.5
|
||||
(void()) main()
|
||||
(byte~) main::$10 reg byte x 22.0
|
||||
(byte~) main::$11 reg byte x 22.0
|
||||
(byte~) main::$5 reg byte a 202.0
|
||||
(byte~) main::$7 reg byte x 22.0
|
||||
(byte~) main::$8 reg byte x 22.0
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@5
|
||||
(label) main::@7
|
||||
(label) main::@return
|
||||
(void()) plot((byte) plot::x , (byte) plot::y)
|
||||
(byte~) plot::$0 reg byte a 4.0
|
||||
(byte~) plot::$1 reg byte a 4.0
|
||||
(byte~) plot::$2 reg byte a 4.0
|
||||
(byte~) plot::$3 reg byte a 4.0
|
||||
(byte~) plot::$5 $5 zp ZP_BYTE:8 2.0
|
||||
(byte~) plot::$6 reg byte a 4.0
|
||||
(byte~) plot::$7 reg byte a 4.0
|
||||
(label) plot::@return
|
||||
(byte*) plot::plotter
|
||||
(byte*) plot::plotter#0 plotter zp ZP_PTR_BYTE:3 1.5
|
||||
(byte*) plot::plotter_x
|
||||
(byte*) plot::plotter_x#1 plotter_x zp ZP_PTR_BYTE:3 2.0
|
||||
(byte*) plot::plotter_x#2 plotter_x zp ZP_PTR_BYTE:3 0.8
|
||||
(byte*) plot::plotter_y
|
||||
(byte*) plot::plotter_y#1 plotter_y zp ZP_PTR_BYTE:6 2.0
|
||||
(byte*) plot::plotter_y#2 plotter_y zp ZP_PTR_BYTE:6 4.0
|
||||
(byte) plot::x
|
||||
(byte) plot::x#0 x zp ZP_BYTE:5 8.916666666666664
|
||||
(byte) plot::y
|
||||
(byte) plot::y#0 reg byte y 15.000000000000002
|
||||
(byte[]) plot_bit
|
||||
(const byte[]) plot_bit#0 plot_bit = (word) 5120
|
||||
(byte[]) plot_xhi
|
||||
(const byte[]) plot_xhi#0 plot_xhi = (word) 4352
|
||||
(byte[]) plot_xlo
|
||||
(const byte[]) plot_xlo#0 plot_xlo = (word) 4096
|
||||
(byte[]) plot_yhi
|
||||
(const byte[]) plot_yhi#0 plot_yhi = (word) 4864
|
||||
(byte[]) plot_ylo
|
||||
(const byte[]) plot_ylo#0 plot_ylo = (word) 4608
|
||||
(void()) plots()
|
||||
(byte~) plots::$0 reg byte y 101.0
|
||||
(byte~) plots::$1 reg byte a 101.0
|
||||
(label) plots::@1
|
||||
(label) plots::@3
|
||||
(label) plots::@return
|
||||
(byte) plots::i
|
||||
(byte) plots::i#1 i zp ZP_BYTE:2 151.5
|
||||
(byte) plots::i#2 i zp ZP_BYTE:2 67.33333333333333
|
||||
(byte) plots_cnt
|
||||
(const byte) plots_cnt#0 plots_cnt = (byte) 8
|
||||
(byte[]) plots_x
|
||||
(const byte[]) plots_x#0 plots_x = { (byte) 60, (byte) 80, (byte) 110, (byte) 80, (byte) 60, (byte) 40, (byte) 10, (byte) 40 }
|
||||
(byte[]) plots_y
|
||||
(const byte[]) plots_y#0 plots_y = { (byte) 10, (byte) 40, (byte) 60, (byte) 80, (byte) 110, (byte) 80, (byte) 60, (byte) 40 }
|
||||
|
||||
zp ZP_BYTE:2 [ plots::i#2 plots::i#1 init_plot_tables::$6 ]
|
||||
reg byte x [ init_plot_tables::x#2 init_plot_tables::x#1 ]
|
||||
reg byte y [ init_plot_tables::bit#3 init_plot_tables::bit#4 init_plot_tables::bit#1 ]
|
||||
reg byte x [ init_plot_tables::y#2 init_plot_tables::y#1 ]
|
||||
zp ZP_PTR_BYTE:3 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 init_screen::b#2 init_screen::b#1 init_screen::c#2 init_screen::c#1 plot::plotter_x#1 plot::plotter_x#2 plot::plotter#0 ]
|
||||
reg byte a [ main::$5 ]
|
||||
reg byte x [ main::$7 ]
|
||||
reg byte x [ main::$8 ]
|
||||
reg byte x [ main::$10 ]
|
||||
reg byte x [ main::$11 ]
|
||||
reg byte y [ plots::$0 ]
|
||||
reg byte a [ plots::$1 ]
|
||||
zp ZP_BYTE:5 [ plot::x#0 ]
|
||||
reg byte y [ plot::y#0 ]
|
||||
reg byte a [ plot::$0 ]
|
||||
reg byte a [ plot::$1 ]
|
||||
reg byte a [ plot::$2 ]
|
||||
zp ZP_PTR_BYTE:6 [ plot::plotter_y#1 plot::plotter_y#2 ]
|
||||
reg byte a [ plot::$3 ]
|
||||
zp ZP_BYTE:8 [ plot::$5 ]
|
||||
reg byte a [ plot::$6 ]
|
||||
reg byte a [ plot::$7 ]
|
||||
reg byte a [ init_plot_tables::$0 ]
|
||||
reg byte a [ init_plot_tables::$7 ]
|
||||
reg byte a [ init_plot_tables::$8 ]
|
||||
reg byte a [ init_plot_tables::$9 ]
|
||||
reg byte a [ init_plot_tables::$10 ]
|
@ -768,12 +768,12 @@ main::@return: scope:[main] from main::@2
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Redundant Phi (byte) main::x1#1 (byte) main::x1#2
|
||||
Redundant Phi (byte) main::x#3 (byte) main::x#1
|
||||
Redundant Phi (byte) STAR#3 (byte) STAR#1
|
||||
Redundant Phi (byte) main::yd#2 (byte) main::yd#1
|
||||
Redundant Phi (byte) main::xd#3 (byte) main::xd#1
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
Alias (byte) main::x1#1 = (byte) main::x1#2
|
||||
Alias (byte) main::x#1 = (byte) main::x#3
|
||||
Alias (byte) STAR#1 = (byte) STAR#3
|
||||
Alias (byte) main::yd#1 = (byte) main::yd#2
|
||||
Alias (byte) main::xd#1 = (byte) main::xd#3
|
||||
Succesful SSA optimization Pass2AliasElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte) STAR#0 ← (byte) 81
|
||||
@ -794,7 +794,7 @@ main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::y#2 ← phi( main/(byte) main::y#0 main::@2/(byte) main::y#4 )
|
||||
(byte) main::x1#2 ← phi( main/(byte) main::x1#0 main::@2/(byte) main::x1#2 )
|
||||
(byte) main::x1#1 ← phi( main/(byte) main::x1#0 main::@2/(byte) main::x1#1 )
|
||||
(byte) main::xd#1 ← phi( main/(byte) main::xd#0 main::@2/(byte) main::xd#1 )
|
||||
(byte) main::yd#1 ← phi( main/(byte) main::yd#0 main::@2/(byte) main::yd#1 )
|
||||
(byte) main::e#3 ← phi( main/(byte) main::e#0 main::@2/(byte) main::e#5 )
|
||||
@ -812,7 +812,7 @@ main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::y#4 ← phi( main::@1/(byte) main::y#2 main::@3/(byte) main::y#1 )
|
||||
(byte) main::e#5 ← phi( main::@1/(byte) main::e#1 main::@3/(byte) main::e#2 )
|
||||
(byte*) main::cursor#5 ← phi( main::@1/(byte*) main::cursor#1 main::@3/(byte*) main::cursor#2 )
|
||||
(byte~) main::$14 ← (byte) main::x1#2 + (byte) 1
|
||||
(byte~) main::$14 ← (byte) main::x1#1 + (byte) 1
|
||||
(boolean~) main::$15 ← (byte) main::x#1 < (byte~) main::$14
|
||||
if((boolean~) main::$15) goto main::@1
|
||||
to:main::@return
|
||||
@ -829,7 +829,7 @@ main::@return: scope:[main] from main::@2
|
||||
Self Phi Eliminated (byte) STAR#1
|
||||
Self Phi Eliminated (byte) main::yd#1
|
||||
Self Phi Eliminated (byte) main::xd#1
|
||||
Self Phi Eliminated (byte) main::x1#2
|
||||
Self Phi Eliminated (byte) main::x1#1
|
||||
Succesful SSA optimization Pass2SelfPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
@ -851,7 +851,7 @@ main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::y#2 ← phi( main/(byte) main::y#0 main::@2/(byte) main::y#4 )
|
||||
(byte) main::x1#2 ← phi( main/(byte) main::x1#0 )
|
||||
(byte) main::x1#1 ← phi( main/(byte) main::x1#0 )
|
||||
(byte) main::xd#1 ← phi( main/(byte) main::xd#0 )
|
||||
(byte) main::yd#1 ← phi( main/(byte) main::yd#0 )
|
||||
(byte) main::e#3 ← phi( main/(byte) main::e#0 main::@2/(byte) main::e#5 )
|
||||
@ -869,7 +869,7 @@ main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::y#4 ← phi( main::@1/(byte) main::y#2 main::@3/(byte) main::y#1 )
|
||||
(byte) main::e#5 ← phi( main::@1/(byte) main::e#1 main::@3/(byte) main::e#2 )
|
||||
(byte*) main::cursor#5 ← phi( main::@1/(byte*) main::cursor#1 main::@3/(byte*) main::cursor#2 )
|
||||
(byte~) main::$14 ← (byte) main::x1#2 + (byte) 1
|
||||
(byte~) main::$14 ← (byte) main::x1#1 + (byte) 1
|
||||
(boolean~) main::$15 ← (byte) main::x#1 < (byte~) main::$14
|
||||
if((boolean~) main::$15) goto main::@1
|
||||
to:main::@return
|
||||
@ -883,7 +883,60 @@ main::@return: scope:[main] from main::@2
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Simple Condition (boolean~) main::$10 if((byte) main::xd#1>=(byte) main::e#1) goto main::@2
|
||||
Redundant Phi (byte) STAR#1 (byte) STAR#0
|
||||
Redundant Phi (byte) main::yd#1 (byte) main::yd#0
|
||||
Redundant Phi (byte) main::xd#1 (byte) main::xd#0
|
||||
Redundant Phi (byte) main::x1#1 (byte) main::x1#0
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte) STAR#0 ← (byte) 81
|
||||
(byte[1000]) SCREEN#0 ← (word) 1024
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
(byte) main::x#0 ← (byte) 4
|
||||
(byte) main::y#0 ← (byte) 4
|
||||
(byte) main::x1#0 ← (byte) 39
|
||||
(byte) main::y1#0 ← (byte) 24
|
||||
(byte) main::xd#0 ← (byte) main::x1#0 - (byte) main::x#0
|
||||
(byte) main::yd#0 ← (byte) main::y1#0 - (byte) main::y#0
|
||||
(byte) main::e#0 ← (byte) main::yd#0 / (byte) 2
|
||||
(byte~) main::$3 ← (byte) main::y#0 * (byte) 40
|
||||
(byte*~) main::$4 ← (byte[1000]) SCREEN#0 + (byte~) main::$3
|
||||
(byte*) main::cursor#0 ← (byte*~) main::$4 + (byte) main::x#0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::y#2 ← phi( main/(byte) main::y#0 main::@2/(byte) main::y#4 )
|
||||
(byte) main::e#3 ← phi( main/(byte) main::e#0 main::@2/(byte) main::e#5 )
|
||||
(byte) main::x#2 ← phi( main/(byte) main::x#0 main::@2/(byte) main::x#1 )
|
||||
(byte*) main::cursor#3 ← phi( main/(byte*) main::cursor#0 main::@2/(byte*) main::cursor#5 )
|
||||
*((byte*) main::cursor#3) ← (byte) STAR#0
|
||||
(byte) main::x#1 ← (byte) main::x#2 + (byte) 1
|
||||
(byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1
|
||||
(byte) main::e#1 ← (byte) main::e#3 + (byte) main::yd#0
|
||||
(boolean~) main::$10 ← (byte) main::xd#0 >= (byte) main::e#1
|
||||
if((boolean~) main::$10) goto main::@2
|
||||
to:main::@3
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::y#4 ← phi( main::@1/(byte) main::y#2 main::@3/(byte) main::y#1 )
|
||||
(byte) main::e#5 ← phi( main::@1/(byte) main::e#1 main::@3/(byte) main::e#2 )
|
||||
(byte*) main::cursor#5 ← phi( main::@1/(byte*) main::cursor#1 main::@3/(byte*) main::cursor#2 )
|
||||
(byte~) main::$14 ← (byte) main::x1#0 + (byte) 1
|
||||
(boolean~) main::$15 ← (byte) main::x#1 < (byte~) main::$14
|
||||
if((boolean~) main::$15) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte) main::y#1 ← (byte) main::y#2 + (byte) 1
|
||||
(byte*) main::cursor#2 ← (byte*) main::cursor#1 + (byte) 40
|
||||
(byte) main::e#2 ← (byte) main::e#1 - (byte) main::xd#0
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Simple Condition (boolean~) main::$10 if((byte) main::xd#0>=(byte) main::e#1) goto main::@2
|
||||
Simple Condition (boolean~) main::$15 if((byte) main::x#1<(byte~) main::$14) goto main::@1
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
CONTROL FLOW GRAPH
|
||||
@ -906,30 +959,26 @@ main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::y#2 ← phi( main/(byte) main::y#0 main::@2/(byte) main::y#4 )
|
||||
(byte) main::x1#2 ← phi( main/(byte) main::x1#0 )
|
||||
(byte) main::xd#1 ← phi( main/(byte) main::xd#0 )
|
||||
(byte) main::yd#1 ← phi( main/(byte) main::yd#0 )
|
||||
(byte) main::e#3 ← phi( main/(byte) main::e#0 main::@2/(byte) main::e#5 )
|
||||
(byte) main::x#2 ← phi( main/(byte) main::x#0 main::@2/(byte) main::x#1 )
|
||||
(byte*) main::cursor#3 ← phi( main/(byte*) main::cursor#0 main::@2/(byte*) main::cursor#5 )
|
||||
(byte) STAR#1 ← phi( main/(byte) STAR#0 )
|
||||
*((byte*) main::cursor#3) ← (byte) STAR#1
|
||||
*((byte*) main::cursor#3) ← (byte) STAR#0
|
||||
(byte) main::x#1 ← (byte) main::x#2 + (byte) 1
|
||||
(byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1
|
||||
(byte) main::e#1 ← (byte) main::e#3 + (byte) main::yd#1
|
||||
if((byte) main::xd#1>=(byte) main::e#1) goto main::@2
|
||||
(byte) main::e#1 ← (byte) main::e#3 + (byte) main::yd#0
|
||||
if((byte) main::xd#0>=(byte) main::e#1) goto main::@2
|
||||
to:main::@3
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::y#4 ← phi( main::@1/(byte) main::y#2 main::@3/(byte) main::y#1 )
|
||||
(byte) main::e#5 ← phi( main::@1/(byte) main::e#1 main::@3/(byte) main::e#2 )
|
||||
(byte*) main::cursor#5 ← phi( main::@1/(byte*) main::cursor#1 main::@3/(byte*) main::cursor#2 )
|
||||
(byte~) main::$14 ← (byte) main::x1#2 + (byte) 1
|
||||
(byte~) main::$14 ← (byte) main::x1#0 + (byte) 1
|
||||
if((byte) main::x#1<(byte~) main::$14) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte) main::y#1 ← (byte) main::y#2 + (byte) 1
|
||||
(byte*) main::cursor#2 ← (byte*) main::cursor#1 + (byte) 40
|
||||
(byte) main::e#2 ← (byte) main::e#1 - (byte) main::xd#1
|
||||
(byte) main::e#2 ← (byte) main::e#1 - (byte) main::xd#0
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
@ -957,30 +1006,26 @@ main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::y#2 ← phi( main/(const byte) main::y#0 main::@2/(byte) main::y#4 )
|
||||
(byte) main::x1#2 ← phi( main/(const byte) main::x1#0 )
|
||||
(byte) main::xd#1 ← phi( main/(byte) main::xd#0 )
|
||||
(byte) main::yd#1 ← phi( main/(byte) main::yd#0 )
|
||||
(byte) main::e#3 ← phi( main/(byte) main::e#0 main::@2/(byte) main::e#5 )
|
||||
(byte) main::x#2 ← phi( main/(const byte) main::x#0 main::@2/(byte) main::x#1 )
|
||||
(byte*) main::cursor#3 ← phi( main/(byte*) main::cursor#0 main::@2/(byte*) main::cursor#5 )
|
||||
(byte) STAR#1 ← phi( main/(const byte) STAR#0 )
|
||||
*((byte*) main::cursor#3) ← (byte) STAR#1
|
||||
*((byte*) main::cursor#3) ← (const byte) STAR#0
|
||||
(byte) main::x#1 ← (byte) main::x#2 + (byte) 1
|
||||
(byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1
|
||||
(byte) main::e#1 ← (byte) main::e#3 + (byte) main::yd#1
|
||||
if((byte) main::xd#1>=(byte) main::e#1) goto main::@2
|
||||
(byte) main::e#1 ← (byte) main::e#3 + (byte) main::yd#0
|
||||
if((byte) main::xd#0>=(byte) main::e#1) goto main::@2
|
||||
to:main::@3
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::y#4 ← phi( main::@1/(byte) main::y#2 main::@3/(byte) main::y#1 )
|
||||
(byte) main::e#5 ← phi( main::@1/(byte) main::e#1 main::@3/(byte) main::e#2 )
|
||||
(byte*) main::cursor#5 ← phi( main::@1/(byte*) main::cursor#1 main::@3/(byte*) main::cursor#2 )
|
||||
(byte~) main::$14 ← (byte) main::x1#2 + (byte) 1
|
||||
(byte~) main::$14 ← (const byte) main::x1#0 + (byte) 1
|
||||
if((byte) main::x#1<(byte~) main::$14) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte) main::y#1 ← (byte) main::y#2 + (byte) 1
|
||||
(byte*) main::cursor#2 ← (byte*) main::cursor#1 + (byte) 40
|
||||
(byte) main::e#2 ← (byte) main::e#1 - (byte) main::xd#1
|
||||
(byte) main::e#2 ← (byte) main::e#1 - (byte) main::xd#0
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
@ -990,8 +1035,7 @@ main::@return: scope:[main] from main::@2
|
||||
Constant (const byte) main::xd#0 = main::x1#0-main::x#0
|
||||
Constant (const byte) main::yd#0 = main::y1#0-main::y#0
|
||||
Constant (const byte) main::$3 = main::y#0*40
|
||||
Constant (const byte) STAR#1 = STAR#0
|
||||
Constant (const byte) main::x1#2 = main::x1#0
|
||||
Constant (const byte) main::$14 = main::x1#0+1
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
@ -1004,28 +1048,25 @@ main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::y#2 ← phi( main/(const byte) main::y#0 main::@2/(byte) main::y#4 )
|
||||
(byte) main::xd#1 ← phi( main/(const byte) main::xd#0 )
|
||||
(byte) main::yd#1 ← phi( main/(const byte) main::yd#0 )
|
||||
(byte) main::e#3 ← phi( main/(byte) main::e#0 main::@2/(byte) main::e#5 )
|
||||
(byte) main::x#2 ← phi( main/(const byte) main::x#0 main::@2/(byte) main::x#1 )
|
||||
(byte*) main::cursor#3 ← phi( main/(byte*) main::cursor#0 main::@2/(byte*) main::cursor#5 )
|
||||
*((byte*) main::cursor#3) ← (const byte) STAR#1
|
||||
*((byte*) main::cursor#3) ← (const byte) STAR#0
|
||||
(byte) main::x#1 ← (byte) main::x#2 + (byte) 1
|
||||
(byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1
|
||||
(byte) main::e#1 ← (byte) main::e#3 + (byte) main::yd#1
|
||||
if((byte) main::xd#1>=(byte) main::e#1) goto main::@2
|
||||
(byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#0
|
||||
if((const byte) main::xd#0>=(byte) main::e#1) goto main::@2
|
||||
to:main::@3
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::y#4 ← phi( main::@1/(byte) main::y#2 main::@3/(byte) main::y#1 )
|
||||
(byte) main::e#5 ← phi( main::@1/(byte) main::e#1 main::@3/(byte) main::e#2 )
|
||||
(byte*) main::cursor#5 ← phi( main::@1/(byte*) main::cursor#1 main::@3/(byte*) main::cursor#2 )
|
||||
(byte~) main::$14 ← (const byte) main::x1#2 + (byte) 1
|
||||
if((byte) main::x#1<(byte~) main::$14) goto main::@1
|
||||
if((byte) main::x#1<(const byte) main::$14) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte) main::y#1 ← (byte) main::y#2 + (byte) 1
|
||||
(byte*) main::cursor#2 ← (byte*) main::cursor#1 + (byte) 40
|
||||
(byte) main::e#2 ← (byte) main::e#1 - (byte) main::xd#1
|
||||
(byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
@ -1034,9 +1075,6 @@ main::@return: scope:[main] from main::@2
|
||||
|
||||
Constant (const byte) main::e#0 = main::yd#0/2
|
||||
Constant (const byte*) main::$4 = SCREEN#0+main::$3
|
||||
Constant (const byte) main::yd#1 = main::yd#0
|
||||
Constant (const byte) main::xd#1 = main::xd#0
|
||||
Constant (const byte) main::$14 = main::x1#2+1
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
@ -1050,11 +1088,11 @@ main::@1: scope:[main] from main main::@2
|
||||
(byte) main::e#3 ← phi( main/(const byte) main::e#0 main::@2/(byte) main::e#5 )
|
||||
(byte) main::x#2 ← phi( main/(const byte) main::x#0 main::@2/(byte) main::x#1 )
|
||||
(byte*) main::cursor#3 ← phi( main/(byte*) main::cursor#0 main::@2/(byte*) main::cursor#5 )
|
||||
*((byte*) main::cursor#3) ← (const byte) STAR#1
|
||||
*((byte*) main::cursor#3) ← (const byte) STAR#0
|
||||
(byte) main::x#1 ← (byte) main::x#2 + (byte) 1
|
||||
(byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1
|
||||
(byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#1
|
||||
if((const byte) main::xd#1>=(byte) main::e#1) goto main::@2
|
||||
(byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#0
|
||||
if((const byte) main::xd#0>=(byte) main::e#1) goto main::@2
|
||||
to:main::@3
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::y#4 ← phi( main::@1/(byte) main::y#2 main::@3/(byte) main::y#1 )
|
||||
@ -1065,7 +1103,7 @@ main::@2: scope:[main] from main::@1 main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte) main::y#1 ← (byte) main::y#2 + (byte) 1
|
||||
(byte*) main::cursor#2 ← (byte*) main::cursor#1 + (byte) 40
|
||||
(byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#1
|
||||
(byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
@ -1085,11 +1123,11 @@ main::@1: scope:[main] from main main::@2
|
||||
(byte) main::e#3 ← phi( main/(const byte) main::e#0 main::@2/(byte) main::e#5 )
|
||||
(byte) main::x#2 ← phi( main/(const byte) main::x#0 main::@2/(byte) main::x#1 )
|
||||
(byte*) main::cursor#3 ← phi( main/(const byte*) main::cursor#0 main::@2/(byte*) main::cursor#5 )
|
||||
*((byte*) main::cursor#3) ← (const byte) STAR#1
|
||||
*((byte*) main::cursor#3) ← (const byte) STAR#0
|
||||
(byte) main::x#1 ← (byte) main::x#2 + (byte) 1
|
||||
(byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1
|
||||
(byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#1
|
||||
if((const byte) main::xd#1>=(byte) main::e#1) goto main::@2
|
||||
(byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#0
|
||||
if((const byte) main::xd#0>=(byte) main::e#1) goto main::@2
|
||||
to:main::@3
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::y#4 ← phi( main::@1/(byte) main::y#2 main::@3/(byte) main::y#1 )
|
||||
@ -1100,7 +1138,7 @@ main::@2: scope:[main] from main::@1 main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte) main::y#1 ← (byte) main::y#2 + (byte) 1
|
||||
(byte*) main::cursor#2 ← (byte*) main::cursor#1 + (byte) 40
|
||||
(byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#1
|
||||
(byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
@ -1111,17 +1149,26 @@ Multiple usages for variable. Not optimizing sub-constant (byte) main::y#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte*) main::cursor#1
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::y#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte*) main::cursor#1
|
||||
Inlining constant with var siblings (const byte) main::x#0
|
||||
Inlining constant with var siblings (const byte) main::x#0
|
||||
Inlining constant with var siblings (const byte) main::y#0
|
||||
Inlining constant with var siblings (const byte) main::y#0
|
||||
Inlining constant with var siblings (const byte) main::y#0
|
||||
Inlining constant with var siblings (const byte) main::e#0
|
||||
Inlining constant with var siblings (const byte) main::e#0
|
||||
Inlining constant with var siblings (const byte) main::e#0
|
||||
Inlining constant with var siblings (const byte) main::e#0
|
||||
Inlining constant with var siblings (const byte*) main::cursor#0
|
||||
Inlining constant with var siblings (const byte*) main::cursor#0
|
||||
Inlining constant with var siblings (const byte*) main::cursor#0
|
||||
Inlining constant with var siblings (const byte*) main::cursor#0
|
||||
Constant inlined main::$3 = (byte) 4*(byte) 40
|
||||
Constant inlined main::$4 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40
|
||||
Constant inlined main::xd#1 = (const byte) main::xd#0
|
||||
Constant inlined main::x#0 = (byte) 4
|
||||
Constant inlined STAR#1 = (const byte) STAR#0
|
||||
Constant inlined main::x1#2 = (const byte) main::x1#0
|
||||
Constant inlined main::cursor#0 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4
|
||||
Constant inlined main::$14 = (const byte) main::x1#0+(byte) 1
|
||||
Constant inlined main::y#0 = (byte) 4
|
||||
Constant inlined main::e#0 = (const byte) main::yd#0/(byte) 2
|
||||
Constant inlined main::yd#1 = (const byte) main::yd#0
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
|
@ -615,13 +615,13 @@ CONTROL FLOW GRAPH
|
||||
to:@2
|
||||
@end: scope:[] from @2
|
||||
|
||||
Redundant Phi (byte) x1#1 (byte) x1#2
|
||||
Redundant Phi (byte) x#3 (byte) x#1
|
||||
Redundant Phi (byte) STAR#2 (byte) STAR#1
|
||||
Redundant Phi (byte[1000]) screen#2 (byte[1000]) screen#1
|
||||
Redundant Phi (byte) yd#2 (byte) yd#1
|
||||
Redundant Phi (byte) xd#3 (byte) xd#1
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
Alias (byte) x1#1 = (byte) x1#2
|
||||
Alias (byte) x#1 = (byte) x#3
|
||||
Alias (byte) STAR#1 = (byte) STAR#2
|
||||
Alias (byte[1000]) screen#1 = (byte[1000]) screen#2
|
||||
Alias (byte) yd#1 = (byte) yd#2
|
||||
Alias (byte) xd#1 = (byte) xd#3
|
||||
Succesful SSA optimization Pass2AliasElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte) STAR#0 ← (byte) 81
|
||||
@ -638,7 +638,7 @@ CONTROL FLOW GRAPH
|
||||
to:@1
|
||||
@1: scope:[] from @2 @begin
|
||||
(byte) y#2 ← phi( @2/(byte) y#4 @begin/(byte) y#0 )
|
||||
(byte) x1#2 ← phi( @2/(byte) x1#2 @begin/(byte) x1#0 )
|
||||
(byte) x1#1 ← phi( @2/(byte) x1#1 @begin/(byte) x1#0 )
|
||||
(byte) xd#1 ← phi( @2/(byte) xd#1 @begin/(byte) xd#0 )
|
||||
(byte) yd#1 ← phi( @2/(byte) yd#1 @begin/(byte) yd#0 )
|
||||
(byte) e#3 ← phi( @2/(byte) e#5 @begin/(byte) e#0 )
|
||||
@ -657,7 +657,7 @@ CONTROL FLOW GRAPH
|
||||
(byte) y#4 ← phi( @1/(byte) y#2 @3/(byte) y#1 )
|
||||
(byte) e#5 ← phi( @1/(byte) e#1 @3/(byte) e#2 )
|
||||
(word) idx#5 ← phi( @1/(word) idx#1 @3/(word) idx#2 )
|
||||
(byte~) $13 ← (byte) x1#2 + (byte) 1
|
||||
(byte~) $13 ← (byte) x1#1 + (byte) 1
|
||||
(boolean~) $14 ← (byte) x#1 < (byte~) $13
|
||||
if((boolean~) $14) goto @1
|
||||
to:@end
|
||||
@ -668,11 +668,16 @@ CONTROL FLOW GRAPH
|
||||
to:@2
|
||||
@end: scope:[] from @2
|
||||
|
||||
Not aliassing identity: STAR#1 STAR#1
|
||||
Not aliassing identity: screen#1 screen#1
|
||||
Not aliassing identity: yd#1 yd#1
|
||||
Not aliassing identity: xd#1 xd#1
|
||||
Not aliassing identity: x1#1 x1#1
|
||||
Self Phi Eliminated (byte) STAR#1
|
||||
Self Phi Eliminated (byte[1000]) screen#1
|
||||
Self Phi Eliminated (byte) yd#1
|
||||
Self Phi Eliminated (byte) xd#1
|
||||
Self Phi Eliminated (byte) x1#2
|
||||
Self Phi Eliminated (byte) x1#1
|
||||
Succesful SSA optimization Pass2SelfPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
@ -690,7 +695,7 @@ CONTROL FLOW GRAPH
|
||||
to:@1
|
||||
@1: scope:[] from @2 @begin
|
||||
(byte) y#2 ← phi( @2/(byte) y#4 @begin/(byte) y#0 )
|
||||
(byte) x1#2 ← phi( @begin/(byte) x1#0 )
|
||||
(byte) x1#1 ← phi( @begin/(byte) x1#0 )
|
||||
(byte) xd#1 ← phi( @begin/(byte) xd#0 )
|
||||
(byte) yd#1 ← phi( @begin/(byte) yd#0 )
|
||||
(byte) e#3 ← phi( @2/(byte) e#5 @begin/(byte) e#0 )
|
||||
@ -709,7 +714,7 @@ CONTROL FLOW GRAPH
|
||||
(byte) y#4 ← phi( @1/(byte) y#2 @3/(byte) y#1 )
|
||||
(byte) e#5 ← phi( @1/(byte) e#1 @3/(byte) e#2 )
|
||||
(word) idx#5 ← phi( @1/(word) idx#1 @3/(word) idx#2 )
|
||||
(byte~) $13 ← (byte) x1#2 + (byte) 1
|
||||
(byte~) $13 ← (byte) x1#1 + (byte) 1
|
||||
(boolean~) $14 ← (byte) x#1 < (byte~) $13
|
||||
if((boolean~) $14) goto @1
|
||||
to:@end
|
||||
@ -720,7 +725,54 @@ CONTROL FLOW GRAPH
|
||||
to:@2
|
||||
@end: scope:[] from @2
|
||||
|
||||
Simple Condition (boolean~) $9 if((byte) xd#1>=(byte) e#1) goto @2
|
||||
Redundant Phi (byte) STAR#1 (byte) STAR#0
|
||||
Redundant Phi (byte[1000]) screen#1 (byte[1000]) screen#0
|
||||
Redundant Phi (byte) yd#1 (byte) yd#0
|
||||
Redundant Phi (byte) xd#1 (byte) xd#0
|
||||
Redundant Phi (byte) x1#1 (byte) x1#0
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte) STAR#0 ← (byte) 81
|
||||
(byte[1000]) screen#0 ← (word) 1024
|
||||
(byte) x#0 ← (byte) 0
|
||||
(byte) y#0 ← (byte) 0
|
||||
(byte) x1#0 ← (byte) 39
|
||||
(byte) y1#0 ← (byte) 24
|
||||
(byte) xd#0 ← (byte) x1#0 - (byte) x#0
|
||||
(byte) yd#0 ← (byte) y1#0 - (byte) y#0
|
||||
(byte) e#0 ← (byte) yd#0 / (byte) 2
|
||||
(byte~) $3 ← (byte) y#0 * (byte) 40
|
||||
(word) idx#0 ← (byte) x#0 + (byte~) $3
|
||||
to:@1
|
||||
@1: scope:[] from @2 @begin
|
||||
(byte) y#2 ← phi( @2/(byte) y#4 @begin/(byte) y#0 )
|
||||
(byte) e#3 ← phi( @2/(byte) e#5 @begin/(byte) e#0 )
|
||||
(byte) x#2 ← phi( @2/(byte) x#1 @begin/(byte) x#0 )
|
||||
(word) idx#3 ← phi( @2/(word) idx#5 @begin/(word) idx#0 )
|
||||
*((byte[1000]) screen#0 + (word) idx#3) ← (byte) STAR#0
|
||||
(byte) x#1 ← (byte) x#2 + (byte) 1
|
||||
(word) idx#1 ← (word) idx#3 + (byte) 1
|
||||
(byte) e#1 ← (byte) e#3 + (byte) yd#0
|
||||
(boolean~) $9 ← (byte) xd#0 >= (byte) e#1
|
||||
if((boolean~) $9) goto @2
|
||||
to:@3
|
||||
@2: scope:[] from @1 @3
|
||||
(byte) y#4 ← phi( @1/(byte) y#2 @3/(byte) y#1 )
|
||||
(byte) e#5 ← phi( @1/(byte) e#1 @3/(byte) e#2 )
|
||||
(word) idx#5 ← phi( @1/(word) idx#1 @3/(word) idx#2 )
|
||||
(byte~) $13 ← (byte) x1#0 + (byte) 1
|
||||
(boolean~) $14 ← (byte) x#1 < (byte~) $13
|
||||
if((boolean~) $14) goto @1
|
||||
to:@end
|
||||
@3: scope:[] from @1
|
||||
(byte) y#1 ← (byte) y#2 + (byte) 1
|
||||
(word) idx#2 ← (word) idx#1 + (byte) 40
|
||||
(byte) e#2 ← (byte) e#1 - (byte) xd#0
|
||||
to:@2
|
||||
@end: scope:[] from @2
|
||||
|
||||
Simple Condition (boolean~) $9 if((byte) xd#0>=(byte) e#1) goto @2
|
||||
Simple Condition (boolean~) $14 if((byte) x#1<(byte~) $13) goto @1
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
CONTROL FLOW GRAPH
|
||||
@ -739,31 +791,26 @@ CONTROL FLOW GRAPH
|
||||
to:@1
|
||||
@1: scope:[] from @2 @begin
|
||||
(byte) y#2 ← phi( @2/(byte) y#4 @begin/(byte) y#0 )
|
||||
(byte) x1#2 ← phi( @begin/(byte) x1#0 )
|
||||
(byte) xd#1 ← phi( @begin/(byte) xd#0 )
|
||||
(byte) yd#1 ← phi( @begin/(byte) yd#0 )
|
||||
(byte) e#3 ← phi( @2/(byte) e#5 @begin/(byte) e#0 )
|
||||
(byte) x#2 ← phi( @2/(byte) x#1 @begin/(byte) x#0 )
|
||||
(word) idx#3 ← phi( @2/(word) idx#5 @begin/(word) idx#0 )
|
||||
(byte[1000]) screen#1 ← phi( @begin/(byte[1000]) screen#0 )
|
||||
(byte) STAR#1 ← phi( @begin/(byte) STAR#0 )
|
||||
*((byte[1000]) screen#1 + (word) idx#3) ← (byte) STAR#1
|
||||
*((byte[1000]) screen#0 + (word) idx#3) ← (byte) STAR#0
|
||||
(byte) x#1 ← (byte) x#2 + (byte) 1
|
||||
(word) idx#1 ← (word) idx#3 + (byte) 1
|
||||
(byte) e#1 ← (byte) e#3 + (byte) yd#1
|
||||
if((byte) xd#1>=(byte) e#1) goto @2
|
||||
(byte) e#1 ← (byte) e#3 + (byte) yd#0
|
||||
if((byte) xd#0>=(byte) e#1) goto @2
|
||||
to:@3
|
||||
@2: scope:[] from @1 @3
|
||||
(byte) y#4 ← phi( @1/(byte) y#2 @3/(byte) y#1 )
|
||||
(byte) e#5 ← phi( @1/(byte) e#1 @3/(byte) e#2 )
|
||||
(word) idx#5 ← phi( @1/(word) idx#1 @3/(word) idx#2 )
|
||||
(byte~) $13 ← (byte) x1#2 + (byte) 1
|
||||
(byte~) $13 ← (byte) x1#0 + (byte) 1
|
||||
if((byte) x#1<(byte~) $13) goto @1
|
||||
to:@end
|
||||
@3: scope:[] from @1
|
||||
(byte) y#1 ← (byte) y#2 + (byte) 1
|
||||
(word) idx#2 ← (word) idx#1 + (byte) 40
|
||||
(byte) e#2 ← (byte) e#1 - (byte) xd#1
|
||||
(byte) e#2 ← (byte) e#1 - (byte) xd#0
|
||||
to:@2
|
||||
@end: scope:[] from @2
|
||||
|
||||
@ -784,40 +831,33 @@ CONTROL FLOW GRAPH
|
||||
to:@1
|
||||
@1: scope:[] from @2 @begin
|
||||
(byte) y#2 ← phi( @2/(byte) y#4 @begin/(const byte) y#0 )
|
||||
(byte) x1#2 ← phi( @begin/(const byte) x1#0 )
|
||||
(byte) xd#1 ← phi( @begin/(byte) xd#0 )
|
||||
(byte) yd#1 ← phi( @begin/(byte) yd#0 )
|
||||
(byte) e#3 ← phi( @2/(byte) e#5 @begin/(byte) e#0 )
|
||||
(byte) x#2 ← phi( @2/(byte) x#1 @begin/(const byte) x#0 )
|
||||
(word) idx#3 ← phi( @2/(word) idx#5 @begin/(word) idx#0 )
|
||||
(byte[1000]) screen#1 ← phi( @begin/(const byte[1000]) screen#0 )
|
||||
(byte) STAR#1 ← phi( @begin/(const byte) STAR#0 )
|
||||
*((byte[1000]) screen#1 + (word) idx#3) ← (byte) STAR#1
|
||||
*((const byte[1000]) screen#0 + (word) idx#3) ← (const byte) STAR#0
|
||||
(byte) x#1 ← (byte) x#2 + (byte) 1
|
||||
(word) idx#1 ← (word) idx#3 + (byte) 1
|
||||
(byte) e#1 ← (byte) e#3 + (byte) yd#1
|
||||
if((byte) xd#1>=(byte) e#1) goto @2
|
||||
(byte) e#1 ← (byte) e#3 + (byte) yd#0
|
||||
if((byte) xd#0>=(byte) e#1) goto @2
|
||||
to:@3
|
||||
@2: scope:[] from @1 @3
|
||||
(byte) y#4 ← phi( @1/(byte) y#2 @3/(byte) y#1 )
|
||||
(byte) e#5 ← phi( @1/(byte) e#1 @3/(byte) e#2 )
|
||||
(word) idx#5 ← phi( @1/(word) idx#1 @3/(word) idx#2 )
|
||||
(byte~) $13 ← (byte) x1#2 + (byte) 1
|
||||
(byte~) $13 ← (const byte) x1#0 + (byte) 1
|
||||
if((byte) x#1<(byte~) $13) goto @1
|
||||
to:@end
|
||||
@3: scope:[] from @1
|
||||
(byte) y#1 ← (byte) y#2 + (byte) 1
|
||||
(word) idx#2 ← (word) idx#1 + (byte) 40
|
||||
(byte) e#2 ← (byte) e#1 - (byte) xd#1
|
||||
(byte) e#2 ← (byte) e#1 - (byte) xd#0
|
||||
to:@2
|
||||
@end: scope:[] from @2
|
||||
|
||||
Constant (const byte) xd#0 = x1#0-x#0
|
||||
Constant (const byte) yd#0 = y1#0-y#0
|
||||
Constant (const byte) $3 = y#0*40
|
||||
Constant (const byte) STAR#1 = STAR#0
|
||||
Constant (const byte[1000]) screen#1 = screen#0
|
||||
Constant (const byte) x1#2 = x1#0
|
||||
Constant (const byte) $13 = x1#0+1
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
@ -826,50 +866,14 @@ CONTROL FLOW GRAPH
|
||||
to:@1
|
||||
@1: scope:[] from @2 @begin
|
||||
(byte) y#2 ← phi( @2/(byte) y#4 @begin/(const byte) y#0 )
|
||||
(byte) xd#1 ← phi( @begin/(const byte) xd#0 )
|
||||
(byte) yd#1 ← phi( @begin/(const byte) yd#0 )
|
||||
(byte) e#3 ← phi( @2/(byte) e#5 @begin/(byte) e#0 )
|
||||
(byte) x#2 ← phi( @2/(byte) x#1 @begin/(const byte) x#0 )
|
||||
(word) idx#3 ← phi( @2/(word) idx#5 @begin/(word) idx#0 )
|
||||
*((const byte[1000]) screen#1 + (word) idx#3) ← (const byte) STAR#1
|
||||
*((const byte[1000]) screen#0 + (word) idx#3) ← (const byte) STAR#0
|
||||
(byte) x#1 ← (byte) x#2 + (byte) 1
|
||||
(word) idx#1 ← (word) idx#3 + (byte) 1
|
||||
(byte) e#1 ← (byte) e#3 + (byte) yd#1
|
||||
if((byte) xd#1>=(byte) e#1) goto @2
|
||||
to:@3
|
||||
@2: scope:[] from @1 @3
|
||||
(byte) y#4 ← phi( @1/(byte) y#2 @3/(byte) y#1 )
|
||||
(byte) e#5 ← phi( @1/(byte) e#1 @3/(byte) e#2 )
|
||||
(word) idx#5 ← phi( @1/(word) idx#1 @3/(word) idx#2 )
|
||||
(byte~) $13 ← (const byte) x1#2 + (byte) 1
|
||||
if((byte) x#1<(byte~) $13) goto @1
|
||||
to:@end
|
||||
@3: scope:[] from @1
|
||||
(byte) y#1 ← (byte) y#2 + (byte) 1
|
||||
(word) idx#2 ← (word) idx#1 + (byte) 40
|
||||
(byte) e#2 ← (byte) e#1 - (byte) xd#1
|
||||
to:@2
|
||||
@end: scope:[] from @2
|
||||
|
||||
Constant (const byte) e#0 = yd#0/2
|
||||
Constant (const word) idx#0 = x#0+$3
|
||||
Constant (const byte) yd#1 = yd#0
|
||||
Constant (const byte) xd#1 = xd#0
|
||||
Constant (const byte) $13 = x1#2+1
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
to:@1
|
||||
@1: scope:[] from @2 @begin
|
||||
(byte) y#2 ← phi( @2/(byte) y#4 @begin/(const byte) y#0 )
|
||||
(byte) e#3 ← phi( @2/(byte) e#5 @begin/(const byte) e#0 )
|
||||
(byte) x#2 ← phi( @2/(byte) x#1 @begin/(const byte) x#0 )
|
||||
(word) idx#3 ← phi( @2/(word) idx#5 @begin/(const word) idx#0 )
|
||||
*((const byte[1000]) screen#1 + (word) idx#3) ← (const byte) STAR#1
|
||||
(byte) x#1 ← (byte) x#2 + (byte) 1
|
||||
(word) idx#1 ← (word) idx#3 + (byte) 1
|
||||
(byte) e#1 ← (byte) e#3 + (const byte) yd#1
|
||||
if((const byte) xd#1>=(byte) e#1) goto @2
|
||||
(byte) e#1 ← (byte) e#3 + (const byte) yd#0
|
||||
if((const byte) xd#0>=(byte) e#1) goto @2
|
||||
to:@3
|
||||
@2: scope:[] from @1 @3
|
||||
(byte) y#4 ← phi( @1/(byte) y#2 @3/(byte) y#1 )
|
||||
@ -880,7 +884,37 @@ CONTROL FLOW GRAPH
|
||||
@3: scope:[] from @1
|
||||
(byte) y#1 ← (byte) y#2 + (byte) 1
|
||||
(word) idx#2 ← (word) idx#1 + (byte) 40
|
||||
(byte) e#2 ← (byte) e#1 - (const byte) xd#1
|
||||
(byte) e#2 ← (byte) e#1 - (const byte) xd#0
|
||||
to:@2
|
||||
@end: scope:[] from @2
|
||||
|
||||
Constant (const byte) e#0 = yd#0/2
|
||||
Constant (const word) idx#0 = x#0+$3
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
to:@1
|
||||
@1: scope:[] from @2 @begin
|
||||
(byte) y#2 ← phi( @2/(byte) y#4 @begin/(const byte) y#0 )
|
||||
(byte) e#3 ← phi( @2/(byte) e#5 @begin/(const byte) e#0 )
|
||||
(byte) x#2 ← phi( @2/(byte) x#1 @begin/(const byte) x#0 )
|
||||
(word) idx#3 ← phi( @2/(word) idx#5 @begin/(const word) idx#0 )
|
||||
*((const byte[1000]) screen#0 + (word) idx#3) ← (const byte) STAR#0
|
||||
(byte) x#1 ← (byte) x#2 + (byte) 1
|
||||
(word) idx#1 ← (word) idx#3 + (byte) 1
|
||||
(byte) e#1 ← (byte) e#3 + (const byte) yd#0
|
||||
if((const byte) xd#0>=(byte) e#1) goto @2
|
||||
to:@3
|
||||
@2: scope:[] from @1 @3
|
||||
(byte) y#4 ← phi( @1/(byte) y#2 @3/(byte) y#1 )
|
||||
(byte) e#5 ← phi( @1/(byte) e#1 @3/(byte) e#2 )
|
||||
(word) idx#5 ← phi( @1/(word) idx#1 @3/(word) idx#2 )
|
||||
if((byte) x#1<(const byte) $13) goto @1
|
||||
to:@end
|
||||
@3: scope:[] from @1
|
||||
(byte) y#1 ← (byte) y#2 + (byte) 1
|
||||
(word) idx#2 ← (word) idx#1 + (byte) 40
|
||||
(byte) e#2 ← (byte) e#1 - (const byte) xd#0
|
||||
to:@2
|
||||
@end: scope:[] from @2
|
||||
|
||||
@ -888,15 +922,23 @@ Multiple usages for variable. Not optimizing sub-constant (byte) y#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (word) idx#1
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) y#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (word) idx#1
|
||||
Constant inlined yd#1 = (const byte) yd#0
|
||||
Inlining constant with var siblings (const byte) x#0
|
||||
Inlining constant with var siblings (const byte) x#0
|
||||
Inlining constant with var siblings (const byte) y#0
|
||||
Inlining constant with var siblings (const byte) y#0
|
||||
Inlining constant with var siblings (const byte) y#0
|
||||
Inlining constant with var siblings (const byte) e#0
|
||||
Inlining constant with var siblings (const byte) e#0
|
||||
Inlining constant with var siblings (const byte) e#0
|
||||
Inlining constant with var siblings (const byte) e#0
|
||||
Inlining constant with var siblings (const word) idx#0
|
||||
Inlining constant with var siblings (const word) idx#0
|
||||
Inlining constant with var siblings (const word) idx#0
|
||||
Inlining constant with var siblings (const word) idx#0
|
||||
Constant inlined $13 = (const byte) x1#0+(byte) 1
|
||||
Constant inlined x1#2 = (const byte) x1#0
|
||||
Constant inlined e#0 = (const byte) yd#0/(byte) 2
|
||||
Constant inlined xd#1 = (const byte) xd#0
|
||||
Constant inlined y#0 = (byte) 0
|
||||
Constant inlined idx#0 = (byte) 0+(byte) 0*(byte) 40
|
||||
Constant inlined screen#1 = (const byte[1000]) screen#0
|
||||
Constant inlined STAR#1 = (const byte) STAR#0
|
||||
Constant inlined x#0 = (byte) 0
|
||||
Constant inlined $3 = (byte) 0*(byte) 40
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
|
@ -13,17 +13,17 @@ main::@return: scope:[main] from main::@1
|
||||
[4] return [ ]
|
||||
to:@return
|
||||
line: scope:[line] from main main::@1
|
||||
[5] (byte) line::x1#2 ← phi( main/(byte) 2 main::@1/(byte) 5 ) [ line::x#0 screen#14 line::x1#2 ]
|
||||
[5] (byte*) screen#14 ← phi( main/(word) 1024 main::@1/(byte*) screen#1 ) [ line::x#0 screen#14 line::x1#2 ]
|
||||
[5] (byte) line::x#0 ← phi( main/(byte) 1 main::@1/(byte) 3 ) [ line::x#0 screen#14 line::x1#2 ]
|
||||
[5] (byte) line::x1#3 ← phi( main/(byte) 2 main::@1/(byte) 5 ) [ line::x#0 screen#14 line::x1#3 ]
|
||||
[5] (byte*) screen#14 ← phi( main/(word) 1024 main::@1/(byte*) screen#1 ) [ line::x#0 screen#14 line::x1#3 ]
|
||||
[5] (byte) line::x#0 ← phi( main/(byte) 1 main::@1/(byte) 3 ) [ line::x#0 screen#14 line::x1#3 ]
|
||||
to:line::@1
|
||||
line::@1: scope:[line] from line line::@1
|
||||
[6] (byte*) screen#11 ← phi( line/(byte*) screen#14 line::@1/(byte*) screen#1 ) [ line::x1#2 line::x#2 screen#11 ]
|
||||
[6] (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@1/(byte) line::x#1 ) [ line::x1#2 line::x#2 screen#11 ]
|
||||
[7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#2 line::x#2 screen#11 ]
|
||||
[8] (byte*) screen#1 ← ++ (byte*) screen#11 [ line::x1#2 line::x#2 screen#1 ]
|
||||
[9] (byte) line::x#1 ← ++ (byte) line::x#2 [ line::x1#2 line::x#1 screen#1 ]
|
||||
[10] if((byte) line::x#1<(byte) line::x1#2) goto line::@1 [ line::x1#2 line::x#1 screen#1 ]
|
||||
[6] (byte*) screen#11 ← phi( line/(byte*) screen#14 line::@1/(byte*) screen#1 ) [ line::x1#3 line::x#2 screen#11 ]
|
||||
[6] (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@1/(byte) line::x#1 ) [ line::x1#3 line::x#2 screen#11 ]
|
||||
[7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#3 line::x#2 screen#11 ]
|
||||
[8] (byte*) screen#1 ← ++ (byte*) screen#11 [ line::x1#3 line::x#2 screen#1 ]
|
||||
[9] (byte) line::x#1 ← ++ (byte) line::x#2 [ line::x1#3 line::x#1 screen#1 ]
|
||||
[10] if((byte) line::x#1<(byte) line::x1#3) goto line::@1 [ line::x1#3 line::x#1 screen#1 ]
|
||||
to:line::@return
|
||||
line::@return: scope:[line] from line::@1
|
||||
[11] return [ ]
|
||||
|
@ -407,7 +407,50 @@ line::@return: scope:[line] from line::@1
|
||||
to:@return
|
||||
@end: scope:[] from @3
|
||||
|
||||
Simple Condition (boolean~) line::$0 if((byte) line::x#1<(byte) line::x1#2) goto line::@1
|
||||
Redundant Phi (byte) line::x1#2 (byte) line::x1#3
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) screen#0 ← (word) 1024
|
||||
call main param-assignment
|
||||
to:@3
|
||||
@3: scope:[] from @begin
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
(byte) line::x0#0 ← (byte) 1
|
||||
(byte) line::x1#0 ← (byte) 2
|
||||
call line param-assignment
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
(byte) line::x0#1 ← (byte) 3
|
||||
(byte) line::x1#1 ← (byte) 5
|
||||
call line param-assignment
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
to:@return
|
||||
line: scope:[line] from main main::@1
|
||||
(byte) line::x1#3 ← phi( main/(byte) line::x1#0 main::@1/(byte) line::x1#1 )
|
||||
(byte*) screen#14 ← phi( main/(byte*) screen#0 main::@1/(byte*) screen#1 )
|
||||
(byte) line::x#0 ← phi( main/(byte) line::x0#0 main::@1/(byte) line::x0#1 )
|
||||
to:line::@1
|
||||
line::@1: scope:[line] from line line::@1
|
||||
(byte*) screen#11 ← phi( line/(byte*) screen#14 line::@1/(byte*) screen#1 )
|
||||
(byte) line::x#2 ← phi( line/(byte) line::x#0 line::@1/(byte) line::x#1 )
|
||||
*((byte*) screen#11) ← (byte) line::x#2
|
||||
(byte*) screen#1 ← ++ (byte*) screen#11
|
||||
(byte) line::x#1 ← ++ (byte) line::x#2
|
||||
(boolean~) line::$0 ← (byte) line::x#1 < (byte) line::x1#3
|
||||
if((boolean~) line::$0) goto line::@1
|
||||
to:line::@return
|
||||
line::@return: scope:[line] from line::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @3
|
||||
|
||||
Simple Condition (boolean~) line::$0 if((byte) line::x#1<(byte) line::x1#3) goto line::@1
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
@ -437,13 +480,12 @@ line: scope:[line] from main main::@1
|
||||
(byte) line::x#0 ← phi( main/(byte) line::x0#0 main::@1/(byte) line::x0#1 )
|
||||
to:line::@1
|
||||
line::@1: scope:[line] from line line::@1
|
||||
(byte) line::x1#2 ← phi( line/(byte) line::x1#3 )
|
||||
(byte*) screen#11 ← phi( line/(byte*) screen#14 line::@1/(byte*) screen#1 )
|
||||
(byte) line::x#2 ← phi( line/(byte) line::x#0 line::@1/(byte) line::x#1 )
|
||||
*((byte*) screen#11) ← (byte) line::x#2
|
||||
(byte*) screen#1 ← ++ (byte*) screen#11
|
||||
(byte) line::x#1 ← ++ (byte) line::x#2
|
||||
if((byte) line::x#1<(byte) line::x1#2) goto line::@1
|
||||
if((byte) line::x#1<(byte) line::x1#3) goto line::@1
|
||||
to:line::@return
|
||||
line::@return: scope:[line] from line::@1
|
||||
return
|
||||
@ -479,13 +521,12 @@ line: scope:[line] from main main::@1
|
||||
(byte) line::x#0 ← phi( main/(const byte) line::x0#0 main::@1/(const byte) line::x0#1 )
|
||||
to:line::@1
|
||||
line::@1: scope:[line] from line line::@1
|
||||
(byte) line::x1#2 ← phi( line/(byte) line::x1#3 )
|
||||
(byte*) screen#11 ← phi( line/(byte*) screen#14 line::@1/(byte*) screen#1 )
|
||||
(byte) line::x#2 ← phi( line/(byte) line::x#0 line::@1/(byte) line::x#1 )
|
||||
*((byte*) screen#11) ← (byte) line::x#2
|
||||
(byte*) screen#1 ← ++ (byte*) screen#11
|
||||
(byte) line::x#1 ← ++ (byte) line::x#2
|
||||
if((byte) line::x#1<(byte) line::x1#2) goto line::@1
|
||||
if((byte) line::x#1<(byte) line::x1#3) goto line::@1
|
||||
to:line::@return
|
||||
line::@return: scope:[line] from line::@1
|
||||
return
|
||||
@ -514,52 +555,27 @@ line: scope:[line] from main main::@1
|
||||
(byte) line::x#0 ← phi( main/(const byte) line::x0#0 main::@1/(const byte) line::x0#1 )
|
||||
to:line::@1
|
||||
line::@1: scope:[line] from line line::@1
|
||||
(byte) line::x1#2 ← phi( line/(byte) line::x1#3 )
|
||||
(byte*) screen#11 ← phi( line/(byte*) screen#14 line::@1/(byte*) screen#1 )
|
||||
(byte) line::x#2 ← phi( line/(byte) line::x#0 line::@1/(byte) line::x#1 )
|
||||
*((byte*) screen#11) ← (byte) line::x#2
|
||||
(byte*) screen#1 ← ++ (byte*) screen#11
|
||||
(byte) line::x#1 ← ++ (byte) line::x#2
|
||||
if((byte) line::x#1<(byte) line::x1#2) goto line::@1
|
||||
to:line::@return
|
||||
line::@return: scope:[line] from line::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Alias (byte) line::x1#2 = (byte) line::x1#3
|
||||
Succesful SSA optimization Pass2AliasElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
call line param-assignment
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
call line param-assignment
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
return
|
||||
to:@return
|
||||
line: scope:[line] from main main::@1
|
||||
(byte) line::x1#2 ← phi( main/(const byte) line::x1#0 main::@1/(const byte) line::x1#1 )
|
||||
(byte*) screen#14 ← phi( main/(const byte*) screen#0 main::@1/(byte*) screen#1 )
|
||||
(byte) line::x#0 ← phi( main/(const byte) line::x0#0 main::@1/(const byte) line::x0#1 )
|
||||
to:line::@1
|
||||
line::@1: scope:[line] from line line::@1
|
||||
(byte*) screen#11 ← phi( line/(byte*) screen#14 line::@1/(byte*) screen#1 )
|
||||
(byte) line::x#2 ← phi( line/(byte) line::x#0 line::@1/(byte) line::x#1 )
|
||||
*((byte*) screen#11) ← (byte) line::x#2
|
||||
(byte*) screen#1 ← ++ (byte*) screen#11
|
||||
(byte) line::x#1 ← ++ (byte) line::x#2
|
||||
if((byte) line::x#1<(byte) line::x1#2) goto line::@1
|
||||
if((byte) line::x#1<(byte) line::x1#3) goto line::@1
|
||||
to:line::@return
|
||||
line::@return: scope:[line] from line::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Inlining constant with different constant siblings (const byte) line::x0#0
|
||||
Inlining constant with var siblings (const byte) line::x1#0
|
||||
Inlining constant with different constant siblings (const byte) line::x1#0
|
||||
Inlining constant with different constant siblings (const byte) line::x0#1
|
||||
Inlining constant with var siblings (const byte) line::x1#1
|
||||
Inlining constant with different constant siblings (const byte) line::x1#1
|
||||
Inlining constant with var siblings (const byte*) screen#0
|
||||
Inlining constant with var siblings (const byte*) screen#0
|
||||
Inlining constant with var siblings (const byte*) screen#0
|
||||
Constant inlined line::x0#0 = (byte) 1
|
||||
Constant inlined line::x0#1 = (byte) 3
|
||||
Constant inlined screen#0 = (word) 1024
|
||||
@ -580,7 +596,7 @@ main::@return: scope:[main] from main::@1
|
||||
return
|
||||
to:@return
|
||||
line: scope:[line] from main main::@1
|
||||
(byte) line::x1#2 ← phi( main/(byte) 2 main::@1/(byte) 5 )
|
||||
(byte) line::x1#3 ← phi( main/(byte) 2 main::@1/(byte) 5 )
|
||||
(byte*) screen#14 ← phi( main/(word) 1024 main::@1/(byte*) screen#1 )
|
||||
(byte) line::x#0 ← phi( main/(byte) 1 main::@1/(byte) 3 )
|
||||
to:line::@1
|
||||
@ -590,7 +606,7 @@ line::@1: scope:[line] from line line::@1
|
||||
*((byte*) screen#11) ← (byte) line::x#2
|
||||
(byte*) screen#1 ← ++ (byte*) screen#11
|
||||
(byte) line::x#1 ← ++ (byte) line::x#2
|
||||
if((byte) line::x#1<(byte) line::x1#2) goto line::@1
|
||||
if((byte) line::x#1<(byte) line::x1#3) goto line::@1
|
||||
to:line::@return
|
||||
line::@return: scope:[line] from line::@1
|
||||
return
|
||||
@ -609,7 +625,7 @@ FINAL SYMBOL TABLE
|
||||
(byte) line::x#2
|
||||
(byte) line::x0
|
||||
(byte) line::x1
|
||||
(byte) line::x1#2
|
||||
(byte) line::x1#3
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
@ -637,7 +653,7 @@ main::@return: scope:[main] from main::@1
|
||||
return
|
||||
to:@return
|
||||
line: scope:[line] from main main::@1
|
||||
(byte) line::x1#2 ← phi( main/(byte) 2 main::@1/(byte) 5 )
|
||||
(byte) line::x1#3 ← phi( main/(byte) 2 main::@1/(byte) 5 )
|
||||
(byte*) screen#14 ← phi( main/(word) 1024 main::@1/(byte*~) screen#15 )
|
||||
(byte) line::x#0 ← phi( main/(byte) 1 main::@1/(byte) 3 )
|
||||
(byte~) line::x#3 ← (byte) line::x#0
|
||||
@ -649,7 +665,7 @@ line::@1: scope:[line] from line line::@3
|
||||
*((byte*) screen#11) ← (byte) line::x#2
|
||||
(byte*) screen#1 ← ++ (byte*) screen#11
|
||||
(byte) line::x#1 ← ++ (byte) line::x#2
|
||||
if((byte) line::x#1<(byte) line::x1#2) goto line::@3
|
||||
if((byte) line::x#1<(byte) line::x1#3) goto line::@3
|
||||
to:line::@return
|
||||
line::@return: scope:[line] from line::@1
|
||||
return
|
||||
@ -689,26 +705,26 @@ main::@return: scope:[main] from main::@1
|
||||
[5] return [ ]
|
||||
to:@return
|
||||
line: scope:[line] from main main::@1
|
||||
[6] (byte) line::x1#2 ← phi( main/(byte) 2 main::@1/(byte) 5 ) [ line::x#0 screen#14 line::x1#2 ]
|
||||
[6] (byte*) screen#14 ← phi( main/(word) 1024 main::@1/(byte*~) screen#15 ) [ line::x#0 screen#14 line::x1#2 ]
|
||||
[6] (byte) line::x#0 ← phi( main/(byte) 1 main::@1/(byte) 3 ) [ line::x#0 screen#14 line::x1#2 ]
|
||||
[7] (byte~) line::x#3 ← (byte) line::x#0 [ screen#14 line::x1#2 line::x#3 ]
|
||||
[8] (byte*~) screen#16 ← (byte*) screen#14 [ line::x1#2 line::x#3 screen#16 ]
|
||||
[6] (byte) line::x1#3 ← phi( main/(byte) 2 main::@1/(byte) 5 ) [ line::x#0 screen#14 line::x1#3 ]
|
||||
[6] (byte*) screen#14 ← phi( main/(word) 1024 main::@1/(byte*~) screen#15 ) [ line::x#0 screen#14 line::x1#3 ]
|
||||
[6] (byte) line::x#0 ← phi( main/(byte) 1 main::@1/(byte) 3 ) [ line::x#0 screen#14 line::x1#3 ]
|
||||
[7] (byte~) line::x#3 ← (byte) line::x#0 [ screen#14 line::x1#3 line::x#3 ]
|
||||
[8] (byte*~) screen#16 ← (byte*) screen#14 [ line::x1#3 line::x#3 screen#16 ]
|
||||
to:line::@1
|
||||
line::@1: scope:[line] from line line::@3
|
||||
[9] (byte*) screen#11 ← phi( line/(byte*~) screen#16 line::@3/(byte*~) screen#17 ) [ line::x1#2 line::x#2 screen#11 ]
|
||||
[9] (byte) line::x#2 ← phi( line/(byte~) line::x#3 line::@3/(byte~) line::x#4 ) [ line::x1#2 line::x#2 screen#11 ]
|
||||
[10] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#2 line::x#2 screen#11 ]
|
||||
[11] (byte*) screen#1 ← ++ (byte*) screen#11 [ screen#1 line::x1#2 line::x#2 ]
|
||||
[12] (byte) line::x#1 ← ++ (byte) line::x#2 [ screen#1 line::x1#2 line::x#1 ]
|
||||
[13] if((byte) line::x#1<(byte) line::x1#2) goto line::@3 [ screen#1 line::x1#2 line::x#1 ]
|
||||
[9] (byte*) screen#11 ← phi( line/(byte*~) screen#16 line::@3/(byte*~) screen#17 ) [ line::x1#3 line::x#2 screen#11 ]
|
||||
[9] (byte) line::x#2 ← phi( line/(byte~) line::x#3 line::@3/(byte~) line::x#4 ) [ line::x1#3 line::x#2 screen#11 ]
|
||||
[10] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#3 line::x#2 screen#11 ]
|
||||
[11] (byte*) screen#1 ← ++ (byte*) screen#11 [ screen#1 line::x1#3 line::x#2 ]
|
||||
[12] (byte) line::x#1 ← ++ (byte) line::x#2 [ screen#1 line::x1#3 line::x#1 ]
|
||||
[13] if((byte) line::x#1<(byte) line::x1#3) goto line::@3 [ screen#1 line::x1#3 line::x#1 ]
|
||||
to:line::@return
|
||||
line::@return: scope:[line] from line::@1
|
||||
[14] return [ screen#1 ]
|
||||
to:@return
|
||||
line::@3: scope:[line] from line::@1
|
||||
[15] (byte~) line::x#4 ← (byte) line::x#1 [ screen#1 line::x1#2 line::x#4 ]
|
||||
[16] (byte*~) screen#17 ← (byte*) screen#1 [ line::x1#2 line::x#4 screen#17 ]
|
||||
[15] (byte~) line::x#4 ← (byte) line::x#1 [ screen#1 line::x1#3 line::x#4 ]
|
||||
[16] (byte*~) screen#17 ← (byte*) screen#1 [ line::x1#3 line::x#4 screen#17 ]
|
||||
to:line::@1
|
||||
|
||||
Created 5 initial phi equivalence classes
|
||||
@ -743,17 +759,17 @@ main::@return: scope:[main] from main::@1
|
||||
[4] return [ ]
|
||||
to:@return
|
||||
line: scope:[line] from main main::@1
|
||||
[5] (byte) line::x1#2 ← phi( main/(byte) 2 main::@1/(byte) 5 ) [ line::x#0 screen#14 line::x1#2 ]
|
||||
[5] (byte*) screen#14 ← phi( main/(word) 1024 main::@1/(byte*) screen#1 ) [ line::x#0 screen#14 line::x1#2 ]
|
||||
[5] (byte) line::x#0 ← phi( main/(byte) 1 main::@1/(byte) 3 ) [ line::x#0 screen#14 line::x1#2 ]
|
||||
[5] (byte) line::x1#3 ← phi( main/(byte) 2 main::@1/(byte) 5 ) [ line::x#0 screen#14 line::x1#3 ]
|
||||
[5] (byte*) screen#14 ← phi( main/(word) 1024 main::@1/(byte*) screen#1 ) [ line::x#0 screen#14 line::x1#3 ]
|
||||
[5] (byte) line::x#0 ← phi( main/(byte) 1 main::@1/(byte) 3 ) [ line::x#0 screen#14 line::x1#3 ]
|
||||
to:line::@1
|
||||
line::@1: scope:[line] from line line::@1
|
||||
[6] (byte*) screen#11 ← phi( line/(byte*) screen#14 line::@1/(byte*) screen#1 ) [ line::x1#2 line::x#2 screen#11 ]
|
||||
[6] (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@1/(byte) line::x#1 ) [ line::x1#2 line::x#2 screen#11 ]
|
||||
[7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#2 line::x#2 screen#11 ]
|
||||
[8] (byte*) screen#1 ← ++ (byte*) screen#11 [ line::x1#2 line::x#2 screen#1 ]
|
||||
[9] (byte) line::x#1 ← ++ (byte) line::x#2 [ line::x1#2 line::x#1 screen#1 ]
|
||||
[10] if((byte) line::x#1<(byte) line::x1#2) goto line::@1 [ line::x1#2 line::x#1 screen#1 ]
|
||||
[6] (byte*) screen#11 ← phi( line/(byte*) screen#14 line::@1/(byte*) screen#1 ) [ line::x1#3 line::x#2 screen#11 ]
|
||||
[6] (byte) line::x#2 ← phi( line/(byte) line::x#0 line::@1/(byte) line::x#1 ) [ line::x1#3 line::x#2 screen#11 ]
|
||||
[7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#3 line::x#2 screen#11 ]
|
||||
[8] (byte*) screen#1 ← ++ (byte*) screen#11 [ line::x1#3 line::x#2 screen#1 ]
|
||||
[9] (byte) line::x#1 ← ++ (byte) line::x#2 [ line::x1#3 line::x#1 screen#1 ]
|
||||
[10] if((byte) line::x#1<(byte) line::x1#3) goto line::@1 [ line::x1#3 line::x#1 screen#1 ]
|
||||
to:line::@return
|
||||
line::@return: scope:[line] from line::@1
|
||||
[11] return [ ]
|
||||
@ -790,7 +806,7 @@ VARIABLE REGISTER WEIGHTS
|
||||
(byte) line::x#2 11.666666666666666
|
||||
(byte) line::x0
|
||||
(byte) line::x1
|
||||
(byte) line::x1#2 1.8333333333333333
|
||||
(byte) line::x1#3 1.8333333333333333
|
||||
(void()) main()
|
||||
(byte*) screen
|
||||
(byte*) screen#1 8.0
|
||||
@ -798,14 +814,14 @@ VARIABLE REGISTER WEIGHTS
|
||||
(byte*) screen#14 4.0
|
||||
|
||||
Initial phi equivalence classes
|
||||
[ line::x1#2 ]
|
||||
[ line::x1#3 ]
|
||||
[ line::x#2 line::x#0 line::x#1 ]
|
||||
[ screen#11 screen#14 screen#1 ]
|
||||
Complete equivalence classes
|
||||
[ line::x1#2 ]
|
||||
[ line::x1#3 ]
|
||||
[ line::x#2 line::x#0 line::x#1 ]
|
||||
[ screen#11 screen#14 screen#1 ]
|
||||
Allocated zp ZP_BYTE:2 [ line::x1#2 ]
|
||||
Allocated zp ZP_BYTE:2 [ line::x1#3 ]
|
||||
Allocated zp ZP_BYTE:3 [ line::x#2 line::x#0 line::x#1 ]
|
||||
Allocated zp ZP_PTR_BYTE:4 [ screen#11 screen#14 screen#1 ]
|
||||
INITIAL ASM
|
||||
@ -825,7 +841,7 @@ main: {
|
||||
//SEG6 [2] call line param-assignment [ ]
|
||||
//SEG7 [5] phi from main to line [phi:main->line]
|
||||
line_from_main:
|
||||
//SEG8 [5] phi (byte) line::x1#2 = (byte) 2 [phi:main->line#0] -- zpby1=coby1
|
||||
//SEG8 [5] phi (byte) line::x1#3 = (byte) 2 [phi:main->line#0] -- zpby1=coby1
|
||||
lda #2
|
||||
sta line.x1
|
||||
//SEG9 [5] phi (byte*) screen#14 = (word) 1024 [phi:main->line#1] -- zpptrby1=cowo1
|
||||
@ -843,7 +859,7 @@ main: {
|
||||
//SEG12 [3] call line param-assignment [ ]
|
||||
//SEG13 [5] phi from main::@1 to line [phi:main::@1->line]
|
||||
line_from_b1:
|
||||
//SEG14 [5] phi (byte) line::x1#2 = (byte) 5 [phi:main::@1->line#0] -- zpby1=coby1
|
||||
//SEG14 [5] phi (byte) line::x1#3 = (byte) 5 [phi:main::@1->line#0] -- zpby1=coby1
|
||||
lda #5
|
||||
sta line.x1
|
||||
//SEG15 [5] phi (byte*) screen#14 = (byte*) screen#1 [phi:main::@1->line#1] -- register_copy
|
||||
@ -869,18 +885,18 @@ line: {
|
||||
jmp b1
|
||||
//SEG23 line::@1
|
||||
b1:
|
||||
//SEG24 [7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#2 line::x#2 screen#11 ] -- _star_zpptrby1=zpby1
|
||||
//SEG24 [7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#3 line::x#2 screen#11 ] -- _star_zpptrby1=zpby1
|
||||
ldy #0
|
||||
lda x
|
||||
sta (screen),y
|
||||
//SEG25 [8] (byte*) screen#1 ← ++ (byte*) screen#11 [ line::x1#2 line::x#2 screen#1 ] -- zpptrby1=_inc_zpptrby1
|
||||
//SEG25 [8] (byte*) screen#1 ← ++ (byte*) screen#11 [ line::x1#3 line::x#2 screen#1 ] -- zpptrby1=_inc_zpptrby1
|
||||
inc screen
|
||||
bne !+
|
||||
inc screen+1
|
||||
!:
|
||||
//SEG26 [9] (byte) line::x#1 ← ++ (byte) line::x#2 [ line::x1#2 line::x#1 screen#1 ] -- zpby1=_inc_zpby1
|
||||
//SEG26 [9] (byte) line::x#1 ← ++ (byte) line::x#2 [ line::x1#3 line::x#1 screen#1 ] -- zpby1=_inc_zpby1
|
||||
inc x
|
||||
//SEG27 [10] if((byte) line::x#1<(byte) line::x1#2) goto line::@1 [ line::x1#2 line::x#1 screen#1 ] -- zpby1_lt_zpby2_then_la1
|
||||
//SEG27 [10] if((byte) line::x#1<(byte) line::x1#3) goto line::@1 [ line::x1#3 line::x#1 screen#1 ] -- zpby1_lt_zpby2_then_la1
|
||||
lda x
|
||||
cmp x1
|
||||
bcc b1_from_b1
|
||||
@ -892,24 +908,24 @@ line: {
|
||||
}
|
||||
|
||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
Statement [7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#2 line::x#2 screen#11 ] always clobbers reg byte y
|
||||
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ line::x1#2 ]
|
||||
Statement [7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#3 line::x#2 screen#11 ] always clobbers reg byte y
|
||||
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ line::x1#3 ]
|
||||
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ line::x#2 line::x#0 line::x#1 ]
|
||||
Statement [7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#2 line::x#2 screen#11 ] always clobbers reg byte y
|
||||
Potential registers zp ZP_BYTE:2 [ line::x1#2 ] : zp ZP_BYTE:2 , reg byte a , reg byte x ,
|
||||
Statement [7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#3 line::x#2 screen#11 ] always clobbers reg byte y
|
||||
Potential registers zp ZP_BYTE:2 [ line::x1#3 ] : zp ZP_BYTE:2 , reg byte a , reg byte x ,
|
||||
Potential registers zp ZP_BYTE:3 [ line::x#2 line::x#0 line::x#1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x ,
|
||||
Potential registers zp ZP_PTR_BYTE:4 [ screen#11 screen#14 screen#1 ] : zp ZP_PTR_BYTE:4 ,
|
||||
|
||||
REGISTER UPLIFT SCOPES
|
||||
Uplift Scope [line] 30.17: zp ZP_BYTE:3 [ line::x#2 line::x#0 line::x#1 ] 1.83: zp ZP_BYTE:2 [ line::x1#2 ]
|
||||
Uplift Scope [line] 30.17: zp ZP_BYTE:3 [ line::x#2 line::x#0 line::x#1 ] 1.83: zp ZP_BYTE:2 [ line::x1#3 ]
|
||||
Uplift Scope [] 29.5: zp ZP_PTR_BYTE:4 [ screen#11 screen#14 screen#1 ]
|
||||
Uplift Scope [main]
|
||||
|
||||
Uplifting [line] best 423 combination reg byte x [ line::x#2 line::x#0 line::x#1 ] zp ZP_BYTE:2 [ line::x1#2 ]
|
||||
Uplifting [line] best 423 combination reg byte x [ line::x#2 line::x#0 line::x#1 ] zp ZP_BYTE:2 [ line::x1#3 ]
|
||||
Uplifting [] best 423 combination zp ZP_PTR_BYTE:4 [ screen#11 screen#14 screen#1 ]
|
||||
Uplifting [main] best 423 combination
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ line::x1#2 ]
|
||||
Uplifting [line] best 423 combination zp ZP_BYTE:2 [ line::x1#2 ]
|
||||
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ line::x1#3 ]
|
||||
Uplifting [line] best 423 combination zp ZP_BYTE:2 [ line::x1#3 ]
|
||||
Allocated (was zp ZP_PTR_BYTE:4) zp ZP_PTR_BYTE:3 [ screen#11 screen#14 screen#1 ]
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
@ -933,7 +949,7 @@ main: {
|
||||
//SEG6 [2] call line param-assignment [ ]
|
||||
//SEG7 [5] phi from main to line [phi:main->line]
|
||||
line_from_main:
|
||||
//SEG8 [5] phi (byte) line::x1#2 = (byte) 2 [phi:main->line#0] -- zpby1=coby1
|
||||
//SEG8 [5] phi (byte) line::x1#3 = (byte) 2 [phi:main->line#0] -- zpby1=coby1
|
||||
lda #2
|
||||
sta line.x1
|
||||
//SEG9 [5] phi (byte*) screen#14 = (word) 1024 [phi:main->line#1] -- zpptrby1=cowo1
|
||||
@ -949,7 +965,7 @@ main: {
|
||||
//SEG12 [3] call line param-assignment [ ]
|
||||
//SEG13 [5] phi from main::@1 to line [phi:main::@1->line]
|
||||
line_from_b1:
|
||||
//SEG14 [5] phi (byte) line::x1#2 = (byte) 5 [phi:main::@1->line#0] -- zpby1=coby1
|
||||
//SEG14 [5] phi (byte) line::x1#3 = (byte) 5 [phi:main::@1->line#0] -- zpby1=coby1
|
||||
lda #5
|
||||
sta line.x1
|
||||
//SEG15 [5] phi (byte*) screen#14 = (byte*) screen#1 [phi:main::@1->line#1] -- register_copy
|
||||
@ -971,18 +987,18 @@ line: {
|
||||
//SEG22 [6] phi (byte) line::x#2 = (byte) line::x#0 [phi:line/line::@1->line::@1#1] -- register_copy
|
||||
//SEG23 line::@1
|
||||
b1:
|
||||
//SEG24 [7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#2 line::x#2 screen#11 ] -- _star_zpptrby1=xby
|
||||
//SEG24 [7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#3 line::x#2 screen#11 ] -- _star_zpptrby1=xby
|
||||
txa
|
||||
ldy #0
|
||||
sta (screen),y
|
||||
//SEG25 [8] (byte*) screen#1 ← ++ (byte*) screen#11 [ line::x1#2 line::x#2 screen#1 ] -- zpptrby1=_inc_zpptrby1
|
||||
//SEG25 [8] (byte*) screen#1 ← ++ (byte*) screen#11 [ line::x1#3 line::x#2 screen#1 ] -- zpptrby1=_inc_zpptrby1
|
||||
inc screen
|
||||
bne !+
|
||||
inc screen+1
|
||||
!:
|
||||
//SEG26 [9] (byte) line::x#1 ← ++ (byte) line::x#2 [ line::x1#2 line::x#1 screen#1 ] -- xby=_inc_xby
|
||||
//SEG26 [9] (byte) line::x#1 ← ++ (byte) line::x#2 [ line::x1#3 line::x#1 screen#1 ] -- xby=_inc_xby
|
||||
inx
|
||||
//SEG27 [10] if((byte) line::x#1<(byte) line::x1#2) goto line::@1 [ line::x1#2 line::x#1 screen#1 ] -- xby_lt_zpby1_then_la1
|
||||
//SEG27 [10] if((byte) line::x#1<(byte) line::x1#3) goto line::@1 [ line::x1#3 line::x#1 screen#1 ] -- xby_lt_zpby1_then_la1
|
||||
cpx x1
|
||||
bcc b1_from_b1
|
||||
//SEG28 line::@return
|
||||
@ -1012,7 +1028,7 @@ main: {
|
||||
//SEG6 [2] call line param-assignment [ ]
|
||||
//SEG7 [5] phi from main to line [phi:main->line]
|
||||
line_from_main:
|
||||
//SEG8 [5] phi (byte) line::x1#2 = (byte) 2 [phi:main->line#0] -- zpby1=coby1
|
||||
//SEG8 [5] phi (byte) line::x1#3 = (byte) 2 [phi:main->line#0] -- zpby1=coby1
|
||||
lda #2
|
||||
sta line.x1
|
||||
//SEG9 [5] phi (byte*) screen#14 = (word) 1024 [phi:main->line#1] -- zpptrby1=cowo1
|
||||
@ -1027,7 +1043,7 @@ main: {
|
||||
b1:
|
||||
//SEG12 [3] call line param-assignment [ ]
|
||||
//SEG13 [5] phi from main::@1 to line [phi:main::@1->line]
|
||||
//SEG14 [5] phi (byte) line::x1#2 = (byte) 5 [phi:main::@1->line#0] -- zpby1=coby1
|
||||
//SEG14 [5] phi (byte) line::x1#3 = (byte) 5 [phi:main::@1->line#0] -- zpby1=coby1
|
||||
lda #5
|
||||
sta line.x1
|
||||
//SEG15 [5] phi (byte*) screen#14 = (byte*) screen#1 [phi:main::@1->line#1] -- register_copy
|
||||
@ -1047,18 +1063,18 @@ line: {
|
||||
//SEG22 [6] phi (byte) line::x#2 = (byte) line::x#0 [phi:line/line::@1->line::@1#1] -- register_copy
|
||||
//SEG23 line::@1
|
||||
b1:
|
||||
//SEG24 [7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#2 line::x#2 screen#11 ] -- _star_zpptrby1=xby
|
||||
//SEG24 [7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#3 line::x#2 screen#11 ] -- _star_zpptrby1=xby
|
||||
txa
|
||||
ldy #0
|
||||
sta (screen),y
|
||||
//SEG25 [8] (byte*) screen#1 ← ++ (byte*) screen#11 [ line::x1#2 line::x#2 screen#1 ] -- zpptrby1=_inc_zpptrby1
|
||||
//SEG25 [8] (byte*) screen#1 ← ++ (byte*) screen#11 [ line::x1#3 line::x#2 screen#1 ] -- zpptrby1=_inc_zpptrby1
|
||||
inc screen
|
||||
bne !+
|
||||
inc screen+1
|
||||
!:
|
||||
//SEG26 [9] (byte) line::x#1 ← ++ (byte) line::x#2 [ line::x1#2 line::x#1 screen#1 ] -- xby=_inc_xby
|
||||
//SEG26 [9] (byte) line::x#1 ← ++ (byte) line::x#2 [ line::x1#3 line::x#1 screen#1 ] -- xby=_inc_xby
|
||||
inx
|
||||
//SEG27 [10] if((byte) line::x#1<(byte) line::x1#2) goto line::@1 [ line::x1#2 line::x#1 screen#1 ] -- xby_lt_zpby1_then_la1
|
||||
//SEG27 [10] if((byte) line::x#1<(byte) line::x1#3) goto line::@1 [ line::x1#3 line::x#1 screen#1 ] -- xby_lt_zpby1_then_la1
|
||||
cpx x1
|
||||
bcc b1
|
||||
//SEG28 line::@return
|
||||
@ -1086,7 +1102,7 @@ ASSEMBLER
|
||||
main: {
|
||||
//SEG6 [2] call line param-assignment [ ]
|
||||
//SEG7 [5] phi from main to line [phi:main->line]
|
||||
//SEG8 [5] phi (byte) line::x1#2 = (byte) 2 [phi:main->line#0] -- zpby1=coby1
|
||||
//SEG8 [5] phi (byte) line::x1#3 = (byte) 2 [phi:main->line#0] -- zpby1=coby1
|
||||
lda #2
|
||||
sta line.x1
|
||||
//SEG9 [5] phi (byte*) screen#14 = (word) 1024 [phi:main->line#1] -- zpptrby1=cowo1
|
||||
@ -1100,7 +1116,7 @@ main: {
|
||||
//SEG11 main::@1
|
||||
//SEG12 [3] call line param-assignment [ ]
|
||||
//SEG13 [5] phi from main::@1 to line [phi:main::@1->line]
|
||||
//SEG14 [5] phi (byte) line::x1#2 = (byte) 5 [phi:main::@1->line#0] -- zpby1=coby1
|
||||
//SEG14 [5] phi (byte) line::x1#3 = (byte) 5 [phi:main::@1->line#0] -- zpby1=coby1
|
||||
lda #5
|
||||
sta line.x1
|
||||
//SEG15 [5] phi (byte*) screen#14 = (byte*) screen#1 [phi:main::@1->line#1] -- register_copy
|
||||
@ -1119,18 +1135,18 @@ line: {
|
||||
//SEG22 [6] phi (byte) line::x#2 = (byte) line::x#0 [phi:line/line::@1->line::@1#1] -- register_copy
|
||||
//SEG23 line::@1
|
||||
b1:
|
||||
//SEG24 [7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#2 line::x#2 screen#11 ] -- _star_zpptrby1=xby
|
||||
//SEG24 [7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#3 line::x#2 screen#11 ] -- _star_zpptrby1=xby
|
||||
txa
|
||||
ldy #0
|
||||
sta (screen),y
|
||||
//SEG25 [8] (byte*) screen#1 ← ++ (byte*) screen#11 [ line::x1#2 line::x#2 screen#1 ] -- zpptrby1=_inc_zpptrby1
|
||||
//SEG25 [8] (byte*) screen#1 ← ++ (byte*) screen#11 [ line::x1#3 line::x#2 screen#1 ] -- zpptrby1=_inc_zpptrby1
|
||||
inc screen
|
||||
bne !+
|
||||
inc screen+1
|
||||
!:
|
||||
//SEG26 [9] (byte) line::x#1 ← ++ (byte) line::x#2 [ line::x1#2 line::x#1 screen#1 ] -- xby=_inc_xby
|
||||
//SEG26 [9] (byte) line::x#1 ← ++ (byte) line::x#2 [ line::x1#3 line::x#1 screen#1 ] -- xby=_inc_xby
|
||||
inx
|
||||
//SEG27 [10] if((byte) line::x#1<(byte) line::x1#2) goto line::@1 [ line::x1#2 line::x#1 screen#1 ] -- xby_lt_zpby1_then_la1
|
||||
//SEG27 [10] if((byte) line::x#1<(byte) line::x1#3) goto line::@1 [ line::x1#3 line::x#1 screen#1 ] -- xby_lt_zpby1_then_la1
|
||||
cpx x1
|
||||
bcc b1
|
||||
//SEG28 line::@return
|
||||
@ -1150,7 +1166,7 @@ FINAL SYMBOL TABLE
|
||||
(byte) line::x#2 reg byte x 11.666666666666666
|
||||
(byte) line::x0
|
||||
(byte) line::x1
|
||||
(byte) line::x1#2 x1 zp ZP_BYTE:2 1.8333333333333333
|
||||
(byte) line::x1#3 x1 zp ZP_BYTE:2 1.8333333333333333
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
@ -1159,7 +1175,7 @@ FINAL SYMBOL TABLE
|
||||
(byte*) screen#11 screen zp ZP_PTR_BYTE:3 17.5
|
||||
(byte*) screen#14 screen zp ZP_PTR_BYTE:3 4.0
|
||||
|
||||
zp ZP_BYTE:2 [ line::x1#2 ]
|
||||
zp ZP_BYTE:2 [ line::x1#3 ]
|
||||
reg byte x [ line::x#2 line::x#0 line::x#1 ]
|
||||
zp ZP_PTR_BYTE:3 [ screen#11 screen#14 screen#1 ]
|
||||
|
||||
@ -1175,7 +1191,7 @@ FINAL CODE
|
||||
main: {
|
||||
//SEG6 [2] call line param-assignment [ ]
|
||||
//SEG7 [5] phi from main to line [phi:main->line]
|
||||
//SEG8 [5] phi (byte) line::x1#2 = (byte) 2 [phi:main->line#0] -- zpby1=coby1
|
||||
//SEG8 [5] phi (byte) line::x1#3 = (byte) 2 [phi:main->line#0] -- zpby1=coby1
|
||||
lda #2
|
||||
sta line.x1
|
||||
//SEG9 [5] phi (byte*) screen#14 = (word) 1024 [phi:main->line#1] -- zpptrby1=cowo1
|
||||
@ -1189,7 +1205,7 @@ main: {
|
||||
//SEG11 main::@1
|
||||
//SEG12 [3] call line param-assignment [ ]
|
||||
//SEG13 [5] phi from main::@1 to line [phi:main::@1->line]
|
||||
//SEG14 [5] phi (byte) line::x1#2 = (byte) 5 [phi:main::@1->line#0] -- zpby1=coby1
|
||||
//SEG14 [5] phi (byte) line::x1#3 = (byte) 5 [phi:main::@1->line#0] -- zpby1=coby1
|
||||
lda #5
|
||||
sta line.x1
|
||||
//SEG15 [5] phi (byte*) screen#14 = (byte*) screen#1 [phi:main::@1->line#1] -- register_copy
|
||||
@ -1208,18 +1224,18 @@ line: {
|
||||
//SEG22 [6] phi (byte) line::x#2 = (byte) line::x#0 [phi:line/line::@1->line::@1#1] -- register_copy
|
||||
//SEG23 line::@1
|
||||
b1:
|
||||
//SEG24 [7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#2 line::x#2 screen#11 ] -- _star_zpptrby1=xby
|
||||
//SEG24 [7] *((byte*) screen#11) ← (byte) line::x#2 [ line::x1#3 line::x#2 screen#11 ] -- _star_zpptrby1=xby
|
||||
txa
|
||||
ldy #0
|
||||
sta (screen),y
|
||||
//SEG25 [8] (byte*) screen#1 ← ++ (byte*) screen#11 [ line::x1#2 line::x#2 screen#1 ] -- zpptrby1=_inc_zpptrby1
|
||||
//SEG25 [8] (byte*) screen#1 ← ++ (byte*) screen#11 [ line::x1#3 line::x#2 screen#1 ] -- zpptrby1=_inc_zpptrby1
|
||||
inc screen
|
||||
bne !+
|
||||
inc screen+1
|
||||
!:
|
||||
//SEG26 [9] (byte) line::x#1 ← ++ (byte) line::x#2 [ line::x1#2 line::x#1 screen#1 ] -- xby=_inc_xby
|
||||
//SEG26 [9] (byte) line::x#1 ← ++ (byte) line::x#2 [ line::x1#3 line::x#1 screen#1 ] -- xby=_inc_xby
|
||||
inx
|
||||
//SEG27 [10] if((byte) line::x#1<(byte) line::x1#2) goto line::@1 [ line::x1#2 line::x#1 screen#1 ] -- xby_lt_zpby1_then_la1
|
||||
//SEG27 [10] if((byte) line::x#1<(byte) line::x1#3) goto line::@1 [ line::x1#3 line::x#1 screen#1 ] -- xby_lt_zpby1_then_la1
|
||||
cpx x1
|
||||
bcc b1
|
||||
//SEG28 line::@return
|
||||
|
@ -9,7 +9,7 @@
|
||||
(byte) line::x#2 reg byte x 11.666666666666666
|
||||
(byte) line::x0
|
||||
(byte) line::x1
|
||||
(byte) line::x1#2 x1 zp ZP_BYTE:2 1.8333333333333333
|
||||
(byte) line::x1#3 x1 zp ZP_BYTE:2 1.8333333333333333
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
@ -18,6 +18,6 @@
|
||||
(byte*) screen#11 screen zp ZP_PTR_BYTE:3 17.5
|
||||
(byte*) screen#14 screen zp ZP_PTR_BYTE:3 4.0
|
||||
|
||||
zp ZP_BYTE:2 [ line::x1#2 ]
|
||||
zp ZP_BYTE:2 [ line::x1#3 ]
|
||||
reg byte x [ line::x#2 line::x#0 line::x#1 ]
|
||||
zp ZP_PTR_BYTE:3 [ screen#11 screen#14 screen#1 ]
|
||||
|
@ -0,0 +1,48 @@
|
||||
.const plots = $1000
|
||||
.const SCREEN = $400
|
||||
jsr main
|
||||
main: {
|
||||
ldx #0
|
||||
b1:
|
||||
txa
|
||||
sta plots,x
|
||||
lda #0
|
||||
sta SCREEN,x
|
||||
inx
|
||||
cpx #$28
|
||||
bne b1
|
||||
b2:
|
||||
jsr line
|
||||
jmp b2
|
||||
rts
|
||||
}
|
||||
line: {
|
||||
.const x1 = $a
|
||||
.label x = 2
|
||||
lda #0
|
||||
cmp #x1
|
||||
bcs b1
|
||||
sta x
|
||||
b2:
|
||||
ldy x
|
||||
jsr plot
|
||||
inc x
|
||||
lda x
|
||||
cmp #x1
|
||||
bcc b2
|
||||
beq b2
|
||||
breturn:
|
||||
rts
|
||||
b1:
|
||||
ldy #0
|
||||
jsr plot
|
||||
jmp breturn
|
||||
}
|
||||
plot: {
|
||||
ldx plots,y
|
||||
lda SCREEN,x
|
||||
clc
|
||||
adc #1
|
||||
sta SCREEN,x
|
||||
rts
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
@begin: scope:[] from
|
||||
to:@3
|
||||
@3: scope:[] from @begin
|
||||
[0] call main param-assignment [ ]
|
||||
to:@end
|
||||
@end: scope:[] from @3
|
||||
main: scope:[main] from @3
|
||||
[1] phi() [ ]
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
[2] (byte) main::i#2 ← phi( main/(byte) 0 main::@1/(byte) main::i#1 ) [ main::i#2 ]
|
||||
[3] *((const byte[]) plots#0 + (byte) main::i#2) ← (byte) main::i#2 [ main::i#2 ]
|
||||
[4] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) 0 [ main::i#2 ]
|
||||
[5] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ]
|
||||
[6] if((byte) main::i#1!=(byte) 40) goto main::@1 [ main::i#1 ]
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@5
|
||||
[7] call line param-assignment [ ]
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@2
|
||||
[8] if(true) goto main::@2 [ ]
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@5
|
||||
[9] return [ ]
|
||||
to:@return
|
||||
line: scope:[line] from main::@2
|
||||
[10] if((byte) 0>=(const byte) line::x1#0) goto line::@1 [ ]
|
||||
to:line::@2
|
||||
line::@2: scope:[line] from line line::@8
|
||||
[11] (byte) line::x#2 ← phi( line/(byte) 0 line::@8/(byte) line::x#1 ) [ line::x#2 ]
|
||||
[12] (byte) plot::x#1 ← (byte) line::x#2 [ line::x#2 plot::x#1 ]
|
||||
[13] call plot param-assignment [ line::x#2 ]
|
||||
to:line::@8
|
||||
line::@8: scope:[line] from line::@2
|
||||
[14] (byte) line::x#1 ← ++ (byte) line::x#2 [ line::x#1 ]
|
||||
[15] if((byte) line::x#1<=(const byte) line::x1#0) goto line::@2 [ line::x#1 ]
|
||||
to:line::@return
|
||||
line::@return: scope:[line] from line::@1 line::@8
|
||||
[16] return [ ]
|
||||
to:@return
|
||||
line::@1: scope:[line] from line
|
||||
[17] call plot param-assignment [ ]
|
||||
to:line::@return
|
||||
plot: scope:[plot] from line::@1 line::@2
|
||||
[18] (byte) plot::x#2 ← phi( line::@1/(byte) 0 line::@2/(byte) plot::x#1 ) [ plot::x#2 ]
|
||||
[19] (byte) plot::idx#0 ← (const byte[]) plots#0 *idx (byte) plot::x#2 [ plot::idx#0 ]
|
||||
[20] (byte~) plot::$1 ← (const byte*) SCREEN#0 *idx (byte) plot::idx#0 [ plot::idx#0 plot::$1 ]
|
||||
[21] (byte~) plot::$2 ← (byte~) plot::$1 + (byte) 1 [ plot::idx#0 plot::$2 ]
|
||||
[22] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte~) plot::$2 [ ]
|
||||
to:plot::@return
|
||||
plot::@return: scope:[plot] from plot
|
||||
[23] return [ ]
|
||||
to:@return
|
2635
src/main/java/dk/camelot64/kickc/test/ref/const-identification.log
Normal file
2635
src/main/java/dk/camelot64/kickc/test/ref/const-identification.log
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,42 @@
|
||||
(label) @3
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = (word) 1024
|
||||
(void()) line((byte) line::x0 , (byte) line::x1)
|
||||
(label) line::@1
|
||||
(label) line::@2
|
||||
(label) line::@8
|
||||
(label) line::@return
|
||||
(byte) line::x
|
||||
(byte) line::x#1 x zp ZP_BYTE:2 151.5
|
||||
(byte) line::x#2 x zp ZP_BYTE:2 101.0
|
||||
(byte) line::x0
|
||||
(byte) line::x1
|
||||
(const byte) line::x1#0 x1 = (byte) 10
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@5
|
||||
(label) main::@return
|
||||
(byte) main::i
|
||||
(byte) main::i#1 reg byte x 16.5
|
||||
(byte) main::i#2 reg byte x 18.333333333333332
|
||||
(void()) plot((byte) plot::x)
|
||||
(byte~) plot::$1 reg byte a 4.0
|
||||
(byte~) plot::$2 reg byte a 4.0
|
||||
(label) plot::@return
|
||||
(byte) plot::idx
|
||||
(byte) plot::idx#0 reg byte x 2.0
|
||||
(byte) plot::x
|
||||
(byte) plot::x#1 reg byte y 202.0
|
||||
(byte) plot::x#2 reg byte y 103.0
|
||||
(byte[]) plots
|
||||
(const byte[]) plots#0 plots = (word) 4096
|
||||
|
||||
reg byte x [ main::i#2 main::i#1 ]
|
||||
zp ZP_BYTE:2 [ line::x#2 line::x#1 ]
|
||||
reg byte y [ plot::x#2 plot::x#1 ]
|
||||
reg byte x [ plot::idx#0 ]
|
||||
reg byte a [ plot::$1 ]
|
||||
reg byte a [ plot::$2 ]
|
@ -370,6 +370,38 @@ main::@return: scope:[main] from main::@1
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Redundant Phi (byte) STAR#2 (byte) STAR#0
|
||||
Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#0
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN#0 ← (word) 1024
|
||||
(byte) STAR#0 ← (byte) 81
|
||||
(byte*) VIC#0 ← (word) 53248
|
||||
(byte~) $0 ← (byte) 16 * (byte) 2
|
||||
(byte*~) $1 ← (byte*) VIC#0 + (byte~) $0
|
||||
(byte*) BGCOL#0 ← (byte*~) $1 + (byte) 1
|
||||
(byte) RED#0 ← (byte) 2
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
*((byte*) SCREEN#0) ← (byte) STAR#0
|
||||
*((byte*) BGCOL#0) ← (byte) RED#0
|
||||
(byte) main::i#0 ← (byte) 40
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) STAR#0 + (byte) 1
|
||||
*((byte*) SCREEN#0 + (byte) main::i#2) ← (byte~) main::$0
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
(boolean~) main::$1 ← (byte) main::i#1 != (byte) 80
|
||||
if((boolean~) main::$1) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Simple Condition (boolean~) main::$1 if((byte) main::i#1!=(byte) 80) goto main::@1
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
CONTROL FLOW GRAPH
|
||||
@ -390,10 +422,8 @@ main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte*) SCREEN#2 ← phi( main/(byte*) SCREEN#0 )
|
||||
(byte) STAR#2 ← phi( main/(byte) STAR#0 )
|
||||
(byte~) main::$0 ← (byte) STAR#2 + (byte) 1
|
||||
*((byte*) SCREEN#2 + (byte) main::i#2) ← (byte~) main::$0
|
||||
(byte~) main::$0 ← (byte) STAR#0 + (byte) 1
|
||||
*((byte*) SCREEN#0 + (byte) main::i#2) ← (byte~) main::$0
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 80) goto main::@1
|
||||
to:main::@return
|
||||
@ -421,10 +451,8 @@ main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte*) SCREEN#2 ← phi( main/(const byte*) SCREEN#0 )
|
||||
(byte) STAR#2 ← phi( main/(const byte) STAR#0 )
|
||||
(byte~) main::$0 ← (byte) STAR#2 + (byte) 1
|
||||
*((byte*) SCREEN#2 + (byte) main::i#2) ← (byte~) main::$0
|
||||
(byte~) main::$0 ← (const byte) STAR#0 + (byte) 1
|
||||
*((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte~) main::$0
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 80) goto main::@1
|
||||
to:main::@return
|
||||
@ -434,8 +462,7 @@ main::@return: scope:[main] from main::@1
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte*) $1 = VIC#0+$0
|
||||
Constant (const byte) STAR#2 = STAR#0
|
||||
Constant (const byte*) SCREEN#2 = SCREEN#0
|
||||
Constant (const byte) main::$0 = STAR#0+1
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
@ -448,8 +475,7 @@ main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (const byte) STAR#2 + (byte) 1
|
||||
*((const byte*) SCREEN#2 + (byte) main::i#2) ← (byte~) main::$0
|
||||
*((const byte*) SCREEN#0 + (byte) main::i#2) ← (const byte) main::$0
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 80) goto main::@1
|
||||
to:main::@return
|
||||
@ -459,7 +485,6 @@ main::@return: scope:[main] from main::@1
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte*) BGCOL#0 = $1+1
|
||||
Constant (const byte) main::$0 = STAR#2+1
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
@ -471,7 +496,7 @@ main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
*((const byte*) SCREEN#2 + (byte) main::i#2) ← (const byte) main::$0
|
||||
*((const byte*) SCREEN#0 + (byte) main::i#2) ← (const byte) main::$0
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 80) goto main::@1
|
||||
to:main::@return
|
||||
@ -480,8 +505,8 @@ main::@return: scope:[main] from main::@1
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant inlined SCREEN#2 = (const byte*) SCREEN#0
|
||||
Constant inlined STAR#2 = (const byte) STAR#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Constant inlined $1 = (const byte*) VIC#0+(byte) 16*(byte) 2
|
||||
Constant inlined $0 = (byte) 16*(byte) 2
|
||||
Constant inlined main::i#0 = (byte) 40
|
||||
|
@ -310,6 +310,35 @@ main::@return: scope:[main] from main::@1
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Redundant Phi (byte[15]) fibs#2 (byte[15]) fibs#0
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte[15]) fibs#0 ← (word) 4352
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
*((byte[15]) fibs#0 + (byte) 0) ← (byte) 0
|
||||
*((byte[15]) fibs#0 + (byte) 1) ← (byte) 1
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) main::i#2 + (byte) 2
|
||||
(byte~) main::$1 ← (byte[15]) fibs#0 *idx (byte) main::i#2
|
||||
(byte~) main::$2 ← (byte) main::i#2 + (byte) 1
|
||||
(byte~) main::$3 ← (byte[15]) fibs#0 *idx (byte~) main::$2
|
||||
(byte~) main::$4 ← (byte~) main::$1 + (byte~) main::$3
|
||||
*((byte[15]) fibs#0 + (byte~) main::$0) ← (byte~) main::$4
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
(boolean~) main::$5 ← (byte) main::i#1 < (byte) 15
|
||||
if((boolean~) main::$5) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Simple Condition (boolean~) main::$5 if((byte) main::i#1<(byte) 15) goto main::@1
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
CONTROL FLOW GRAPH
|
||||
@ -323,14 +352,13 @@ main: scope:[main] from @begin
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte[15]) fibs#2 ← phi( main/(byte[15]) fibs#0 )
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) main::i#2 + (byte) 2
|
||||
(byte~) main::$1 ← (byte[15]) fibs#2 *idx (byte) main::i#2
|
||||
(byte~) main::$1 ← (byte[15]) fibs#0 *idx (byte) main::i#2
|
||||
(byte~) main::$2 ← (byte) main::i#2 + (byte) 1
|
||||
(byte~) main::$3 ← (byte[15]) fibs#2 *idx (byte~) main::$2
|
||||
(byte~) main::$3 ← (byte[15]) fibs#0 *idx (byte~) main::$2
|
||||
(byte~) main::$4 ← (byte~) main::$1 + (byte~) main::$3
|
||||
*((byte[15]) fibs#2 + (byte~) main::$0) ← (byte~) main::$4
|
||||
*((byte[15]) fibs#0 + (byte~) main::$0) ← (byte~) main::$4
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1<(byte) 15) goto main::@1
|
||||
to:main::@return
|
||||
@ -351,40 +379,13 @@ main: scope:[main] from @begin
|
||||
*((const byte[15]) fibs#0 + (byte) 1) ← (byte) 1
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte[15]) fibs#2 ← phi( main/(const byte[15]) fibs#0 )
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) main::i#2 + (byte) 2
|
||||
(byte~) main::$1 ← (byte[15]) fibs#2 *idx (byte) main::i#2
|
||||
(byte~) main::$1 ← (const byte[15]) fibs#0 *idx (byte) main::i#2
|
||||
(byte~) main::$2 ← (byte) main::i#2 + (byte) 1
|
||||
(byte~) main::$3 ← (byte[15]) fibs#2 *idx (byte~) main::$2
|
||||
(byte~) main::$3 ← (const byte[15]) fibs#0 *idx (byte~) main::$2
|
||||
(byte~) main::$4 ← (byte~) main::$1 + (byte~) main::$3
|
||||
*((byte[15]) fibs#2 + (byte~) main::$0) ← (byte~) main::$4
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1<(byte) 15) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte[15]) fibs#2 = fibs#0
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
*((const byte[15]) fibs#0 + (byte) 0) ← (byte) 0
|
||||
*((const byte[15]) fibs#0 + (byte) 1) ← (byte) 1
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) main::i#2 + (byte) 2
|
||||
(byte~) main::$1 ← (const byte[15]) fibs#2 *idx (byte) main::i#2
|
||||
(byte~) main::$2 ← (byte) main::i#2 + (byte) 1
|
||||
(byte~) main::$3 ← (const byte[15]) fibs#2 *idx (byte~) main::$2
|
||||
(byte~) main::$4 ← (byte~) main::$1 + (byte~) main::$3
|
||||
*((const byte[15]) fibs#2 + (byte~) main::$0) ← (byte~) main::$4
|
||||
*((const byte[15]) fibs#0 + (byte~) main::$0) ← (byte~) main::$4
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1<(byte) 15) goto main::@1
|
||||
to:main::@return
|
||||
@ -399,7 +400,7 @@ Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Consolidated referenced array index constant in assignment main::$3
|
||||
Consolidated assigned array index constant in assignment *(fibs#2+2 + main::$0)
|
||||
Consolidated assigned array index constant in assignment *(fibs#0+2 + main::$0)
|
||||
Succesful SSA optimization Pass2ConstantAdditionElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
@ -412,11 +413,11 @@ main: scope:[main] from @begin
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) main::i#2
|
||||
(byte~) main::$1 ← (const byte[15]) fibs#2 *idx (byte) main::i#2
|
||||
(byte~) main::$1 ← (const byte[15]) fibs#0 *idx (byte) main::i#2
|
||||
(byte~) main::$2 ← (byte) main::i#2
|
||||
(byte~) main::$3 ← (const byte[15]) fibs#2+(byte) 1 *idx (byte~) main::$2
|
||||
(byte~) main::$3 ← (const byte[15]) fibs#0+(byte) 1 *idx (byte~) main::$2
|
||||
(byte~) main::$4 ← (byte~) main::$1 + (byte~) main::$3
|
||||
*((const byte[15]) fibs#2+(byte) 2 + (byte~) main::$0) ← (byte~) main::$4
|
||||
*((const byte[15]) fibs#0+(byte) 2 + (byte~) main::$0) ← (byte~) main::$4
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1<(byte) 15) goto main::@1
|
||||
to:main::@return
|
||||
@ -438,10 +439,10 @@ main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$1 ← (const byte[15]) fibs#2 *idx (byte) main::i#2
|
||||
(byte~) main::$3 ← (const byte[15]) fibs#2+(byte) 1 *idx (byte) main::i#2
|
||||
(byte~) main::$1 ← (const byte[15]) fibs#0 *idx (byte) main::i#2
|
||||
(byte~) main::$3 ← (const byte[15]) fibs#0+(byte) 1 *idx (byte) main::i#2
|
||||
(byte~) main::$4 ← (byte~) main::$1 + (byte~) main::$3
|
||||
*((const byte[15]) fibs#2+(byte) 2 + (byte) main::i#2) ← (byte~) main::$4
|
||||
*((const byte[15]) fibs#0+(byte) 2 + (byte) main::i#2) ← (byte~) main::$4
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1<(byte) 15) goto main::@1
|
||||
to:main::@return
|
||||
@ -456,7 +457,8 @@ Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Constant inlined fibs#2 = (const byte[15]) fibs#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Constant inlined main::i#0 = (byte) 0
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
CONTROL FLOW GRAPH
|
||||
|
@ -7,16 +7,16 @@ main: scope:[main] from @begin
|
||||
[2] call prepare param-assignment [ ]
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main main::@11 main::@3 main::@6
|
||||
[3] (byte) main::c#2 ← phi( main/(byte) 25 main::@6/(byte) main::c#1 main::@11/(byte) 25 ) [ main::c#2 ]
|
||||
[4] (byte~) main::$1 ← * (const byte*) RASTER#0 [ main::c#2 main::$1 ]
|
||||
[5] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#2 ]
|
||||
[3] (byte) main::c#4 ← phi( main/(byte) 25 main::@6/(byte) main::c#1 main::@11/(byte) 25 ) [ main::c#4 ]
|
||||
[4] (byte~) main::$1 ← * (const byte*) RASTER#0 [ main::c#4 main::$1 ]
|
||||
[5] if((byte~) main::$1!=(byte) 254) goto main::@3 [ main::c#4 ]
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@3 main::@4
|
||||
[6] (byte~) main::$3 ← * (const byte*) RASTER#0 [ main::c#2 main::$3 ]
|
||||
[7] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#2 ]
|
||||
[6] (byte~) main::$3 ← * (const byte*) RASTER#0 [ main::c#4 main::$3 ]
|
||||
[7] if((byte~) main::$3!=(byte) 255) goto main::@4 [ main::c#4 ]
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@4
|
||||
[8] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ]
|
||||
[8] (byte) main::c#1 ← -- (byte) main::c#4 [ main::c#1 ]
|
||||
[9] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ]
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::@6
|
||||
@ -35,22 +35,22 @@ plot: scope:[plot] from main::@10
|
||||
[14] phi() [ ]
|
||||
to:plot::@1
|
||||
plot::@1: scope:[plot] from plot plot::@3
|
||||
[15] (byte) plot::y#2 ← phi( plot/(byte) 16 plot::@3/(byte) plot::y#1 ) [ plot::i#3 plot::line#2 plot::y#2 ]
|
||||
[15] (byte*) plot::line#2 ← phi( plot/(const byte[1000]) SCREEN#0+(byte) 5*(byte) 40+(byte) 12 plot::@3/(byte*) plot::line#1 ) [ plot::i#3 plot::line#2 plot::y#2 ]
|
||||
[15] (byte) plot::i#3 ← phi( plot/(byte) 0 plot::@3/(byte) plot::i#1 ) [ plot::i#3 plot::line#2 plot::y#2 ]
|
||||
[15] (byte) plot::y#4 ← phi( plot/(byte) 16 plot::@3/(byte) plot::y#1 ) [ plot::i#3 plot::line#4 plot::y#4 ]
|
||||
[15] (byte*) plot::line#4 ← phi( plot/(const byte[1000]) SCREEN#0+(byte) 5*(byte) 40+(byte) 12 plot::@3/(byte*) plot::line#1 ) [ plot::i#3 plot::line#4 plot::y#4 ]
|
||||
[15] (byte) plot::i#3 ← phi( plot/(byte) 0 plot::@3/(byte) plot::i#1 ) [ plot::i#3 plot::line#4 plot::y#4 ]
|
||||
to:plot::@2
|
||||
plot::@2: scope:[plot] from plot::@1 plot::@2
|
||||
[16] (byte) plot::x#2 ← phi( plot::@1/(byte) 0 plot::@2/(byte) plot::x#1 ) [ plot::line#2 plot::y#2 plot::i#2 plot::x#2 ]
|
||||
[16] (byte) plot::i#2 ← phi( plot::@1/(byte) plot::i#3 plot::@2/(byte) plot::i#1 ) [ plot::line#2 plot::y#2 plot::i#2 plot::x#2 ]
|
||||
[17] (byte~) plot::$3 ← (const byte[256]) buffer1#0 *idx (byte) plot::i#2 [ plot::line#2 plot::y#2 plot::i#2 plot::x#2 plot::$3 ]
|
||||
[18] *((byte*) plot::line#2 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::line#2 plot::y#2 plot::i#2 plot::x#2 ]
|
||||
[19] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::line#2 plot::y#2 plot::i#1 plot::x#2 ]
|
||||
[20] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::line#2 plot::y#2 plot::i#1 plot::x#1 ]
|
||||
[21] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::line#2 plot::y#2 plot::i#1 plot::x#1 ]
|
||||
[16] (byte) plot::x#2 ← phi( plot::@1/(byte) 0 plot::@2/(byte) plot::x#1 ) [ plot::line#4 plot::y#4 plot::i#2 plot::x#2 ]
|
||||
[16] (byte) plot::i#2 ← phi( plot::@1/(byte) plot::i#3 plot::@2/(byte) plot::i#1 ) [ plot::line#4 plot::y#4 plot::i#2 plot::x#2 ]
|
||||
[17] (byte~) plot::$3 ← (const byte[256]) buffer1#0 *idx (byte) plot::i#2 [ plot::line#4 plot::y#4 plot::i#2 plot::x#2 plot::$3 ]
|
||||
[18] *((byte*) plot::line#4 + (byte) plot::x#2) ← (byte~) plot::$3 [ plot::line#4 plot::y#4 plot::i#2 plot::x#2 ]
|
||||
[19] (byte) plot::i#1 ← ++ (byte) plot::i#2 [ plot::line#4 plot::y#4 plot::i#1 plot::x#2 ]
|
||||
[20] (byte) plot::x#1 ← ++ (byte) plot::x#2 [ plot::line#4 plot::y#4 plot::i#1 plot::x#1 ]
|
||||
[21] if((byte) plot::x#1<(byte) 16) goto plot::@2 [ plot::line#4 plot::y#4 plot::i#1 plot::x#1 ]
|
||||
to:plot::@3
|
||||
plot::@3: scope:[plot] from plot::@2
|
||||
[22] (byte*) plot::line#1 ← (byte*) plot::line#2 + (byte) 40 [ plot::y#2 plot::i#1 plot::line#1 ]
|
||||
[23] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ]
|
||||
[22] (byte*) plot::line#1 ← (byte*) plot::line#4 + (byte) 40 [ plot::y#4 plot::i#1 plot::line#1 ]
|
||||
[23] (byte) plot::y#1 ← -- (byte) plot::y#4 [ plot::i#1 plot::line#1 plot::y#1 ]
|
||||
[24] if((byte) plot::y#1!=(byte) 0) goto plot::@1 [ plot::i#1 plot::line#1 plot::y#1 ]
|
||||
to:plot::@return
|
||||
plot::@return: scope:[plot] from plot::@3
|
||||
@ -60,24 +60,24 @@ flip: scope:[flip] from main::@7
|
||||
[26] phi() [ ]
|
||||
to:flip::@1
|
||||
flip::@1: scope:[flip] from flip flip::@4
|
||||
[27] (byte) flip::r#2 ← phi( flip/(byte) 16 flip::@4/(byte) flip::r#1 ) [ flip::srcIdx#3 flip::dstIdx#5 flip::r#2 ]
|
||||
[27] (byte) flip::dstIdx#5 ← phi( flip/(byte) 15 flip::@4/(byte) flip::dstIdx#2 ) [ flip::srcIdx#3 flip::dstIdx#5 flip::r#2 ]
|
||||
[27] (byte) flip::srcIdx#3 ← phi( flip/(byte) 0 flip::@4/(byte) flip::srcIdx#1 ) [ flip::srcIdx#3 flip::dstIdx#5 flip::r#2 ]
|
||||
[27] (byte) flip::r#4 ← phi( flip/(byte) 16 flip::@4/(byte) flip::r#1 ) [ flip::srcIdx#3 flip::dstIdx#5 flip::r#4 ]
|
||||
[27] (byte) flip::dstIdx#5 ← phi( flip/(byte) 15 flip::@4/(byte) flip::dstIdx#2 ) [ flip::srcIdx#3 flip::dstIdx#5 flip::r#4 ]
|
||||
[27] (byte) flip::srcIdx#3 ← phi( flip/(byte) 0 flip::@4/(byte) flip::srcIdx#1 ) [ flip::srcIdx#3 flip::dstIdx#5 flip::r#4 ]
|
||||
to:flip::@2
|
||||
flip::@2: scope:[flip] from flip::@1 flip::@2
|
||||
[28] (byte) flip::c#2 ← phi( flip::@1/(byte) 16 flip::@2/(byte) flip::c#1 ) [ flip::r#2 flip::srcIdx#2 flip::dstIdx#3 flip::c#2 ]
|
||||
[28] (byte) flip::dstIdx#3 ← phi( flip::@1/(byte) flip::dstIdx#5 flip::@2/(byte) flip::dstIdx#1 ) [ flip::r#2 flip::srcIdx#2 flip::dstIdx#3 flip::c#2 ]
|
||||
[28] (byte) flip::srcIdx#2 ← phi( flip::@1/(byte) flip::srcIdx#3 flip::@2/(byte) flip::srcIdx#1 ) [ flip::r#2 flip::srcIdx#2 flip::dstIdx#3 flip::c#2 ]
|
||||
[29] (byte~) flip::$0 ← (const byte[256]) buffer1#0 *idx (byte) flip::srcIdx#2 [ flip::r#2 flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::$0 ]
|
||||
[30] *((const byte[256]) buffer2#0 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::r#2 flip::srcIdx#2 flip::dstIdx#3 flip::c#2 ]
|
||||
[31] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::r#2 flip::srcIdx#1 flip::dstIdx#3 flip::c#2 ]
|
||||
[32] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::r#2 flip::srcIdx#1 flip::c#2 flip::dstIdx#1 ]
|
||||
[33] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::r#2 flip::srcIdx#1 flip::dstIdx#1 flip::c#1 ]
|
||||
[34] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::r#2 flip::srcIdx#1 flip::dstIdx#1 flip::c#1 ]
|
||||
[28] (byte) flip::c#2 ← phi( flip::@1/(byte) 16 flip::@2/(byte) flip::c#1 ) [ flip::r#4 flip::srcIdx#2 flip::dstIdx#3 flip::c#2 ]
|
||||
[28] (byte) flip::dstIdx#3 ← phi( flip::@1/(byte) flip::dstIdx#5 flip::@2/(byte) flip::dstIdx#1 ) [ flip::r#4 flip::srcIdx#2 flip::dstIdx#3 flip::c#2 ]
|
||||
[28] (byte) flip::srcIdx#2 ← phi( flip::@1/(byte) flip::srcIdx#3 flip::@2/(byte) flip::srcIdx#1 ) [ flip::r#4 flip::srcIdx#2 flip::dstIdx#3 flip::c#2 ]
|
||||
[29] (byte~) flip::$0 ← (const byte[256]) buffer1#0 *idx (byte) flip::srcIdx#2 [ flip::r#4 flip::srcIdx#2 flip::dstIdx#3 flip::c#2 flip::$0 ]
|
||||
[30] *((const byte[256]) buffer2#0 + (byte) flip::dstIdx#3) ← (byte~) flip::$0 [ flip::r#4 flip::srcIdx#2 flip::dstIdx#3 flip::c#2 ]
|
||||
[31] (byte) flip::srcIdx#1 ← ++ (byte) flip::srcIdx#2 [ flip::r#4 flip::srcIdx#1 flip::dstIdx#3 flip::c#2 ]
|
||||
[32] (byte) flip::dstIdx#1 ← (byte) flip::dstIdx#3 + (byte) 16 [ flip::r#4 flip::srcIdx#1 flip::c#2 flip::dstIdx#1 ]
|
||||
[33] (byte) flip::c#1 ← -- (byte) flip::c#2 [ flip::r#4 flip::srcIdx#1 flip::dstIdx#1 flip::c#1 ]
|
||||
[34] if((byte) flip::c#1!=(byte) 0) goto flip::@2 [ flip::r#4 flip::srcIdx#1 flip::dstIdx#1 flip::c#1 ]
|
||||
to:flip::@4
|
||||
flip::@4: scope:[flip] from flip::@2
|
||||
[35] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::r#2 flip::srcIdx#1 flip::dstIdx#2 ]
|
||||
[36] (byte) flip::r#1 ← -- (byte) flip::r#2 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ]
|
||||
[35] (byte) flip::dstIdx#2 ← -- (byte) flip::dstIdx#1 [ flip::r#4 flip::srcIdx#1 flip::dstIdx#2 ]
|
||||
[36] (byte) flip::r#1 ← -- (byte) flip::r#4 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ]
|
||||
[37] if((byte) flip::r#1!=(byte) 0) goto flip::@1 [ flip::srcIdx#1 flip::dstIdx#2 flip::r#1 ]
|
||||
to:flip::@3
|
||||
flip::@3: scope:[flip] from flip::@3 flip::@4
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -29,7 +29,7 @@
|
||||
(byte) flip::i#2 reg byte x 134.66666666666666
|
||||
(byte) flip::r
|
||||
(byte) flip::r#1 r zp ZP_BYTE:4 151.5
|
||||
(byte) flip::r#2 r zp ZP_BYTE:4 22.444444444444443
|
||||
(byte) flip::r#4 r zp ZP_BYTE:4 22.444444444444443
|
||||
(byte) flip::srcIdx
|
||||
(byte) flip::srcIdx#1 reg byte x 300.42857142857144
|
||||
(byte) flip::srcIdx#2 reg byte x 1034.6666666666667
|
||||
@ -46,7 +46,7 @@
|
||||
(label) main::@return
|
||||
(byte) main::c
|
||||
(byte) main::c#1 reg byte x 151.5
|
||||
(byte) main::c#2 reg byte x 40.4
|
||||
(byte) main::c#4 reg byte x 40.4
|
||||
(void()) plot()
|
||||
(byte~) plot::$3 reg byte a 2002.0
|
||||
(label) plot::@1
|
||||
@ -59,13 +59,13 @@
|
||||
(byte) plot::i#3 reg byte x 202.0
|
||||
(byte*) plot::line
|
||||
(byte*) plot::line#1 line zp ZP_PTR_BYTE:2 67.33333333333333
|
||||
(byte*) plot::line#2 line zp ZP_PTR_BYTE:2 171.85714285714283
|
||||
(byte*) plot::line#4 line zp ZP_PTR_BYTE:2 171.85714285714283
|
||||
(byte) plot::x
|
||||
(byte) plot::x#1 reg byte y 1501.5
|
||||
(byte) plot::x#2 reg byte y 750.75
|
||||
(byte) plot::y
|
||||
(byte) plot::y#1 y zp ZP_BYTE:4 151.5
|
||||
(byte) plot::y#2 y zp ZP_BYTE:4 25.25
|
||||
(byte) plot::y#4 y zp ZP_BYTE:4 25.25
|
||||
(void()) prepare()
|
||||
(label) prepare::@1
|
||||
(label) prepare::@return
|
||||
@ -73,9 +73,9 @@
|
||||
(byte) prepare::i#1 reg byte x 16.5
|
||||
(byte) prepare::i#2 reg byte x 22.0
|
||||
|
||||
reg byte x [ main::c#2 main::c#1 ]
|
||||
zp ZP_PTR_BYTE:2 [ plot::line#2 plot::line#1 ]
|
||||
zp ZP_BYTE:4 [ plot::y#2 plot::y#1 flip::r#2 flip::r#1 ]
|
||||
reg byte x [ main::c#4 main::c#1 ]
|
||||
zp ZP_PTR_BYTE:2 [ plot::line#4 plot::line#1 ]
|
||||
zp ZP_BYTE:4 [ plot::y#4 plot::y#1 flip::r#4 flip::r#1 ]
|
||||
reg byte x [ plot::i#2 plot::i#3 plot::i#1 ]
|
||||
reg byte y [ plot::x#2 plot::x#1 ]
|
||||
reg byte x [ flip::srcIdx#2 flip::srcIdx#3 flip::srcIdx#1 ]
|
||||
|
@ -258,6 +258,30 @@ main::@return: scope:[main] from main::@1
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
|
||||
Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#0
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN#0 ← (word) 1024
|
||||
to:@1
|
||||
main: scope:[main] from @1
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
*((byte*) SCREEN#0 + (byte) main::i#2) ← (byte) main::i#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
(boolean~) main::$0 ← (byte) main::i#1 != (byte) 100
|
||||
if((boolean~) main::$0) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
return
|
||||
to:@return
|
||||
@1: scope:[] from @begin
|
||||
call main param-assignment
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
|
||||
Simple Condition (boolean~) main::$0 if((byte) main::i#1!=(byte) 100) goto main::@1
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
CONTROL FLOW GRAPH
|
||||
@ -268,9 +292,8 @@ main: scope:[main] from @1
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte*) SCREEN#1 ← phi( main/(byte*) SCREEN#0 )
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
*((byte*) SCREEN#1 + (byte) main::i#2) ← (byte) main::i#2
|
||||
*((byte*) SCREEN#0 + (byte) main::i#2) ← (byte) main::i#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 100) goto main::@1
|
||||
to:main::@return
|
||||
@ -291,30 +314,8 @@ CONTROL FLOW GRAPH
|
||||
main: scope:[main] from @1
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte*) SCREEN#1 ← phi( main/(const byte*) SCREEN#0 )
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
*((byte*) SCREEN#1 + (byte) main::i#2) ← (byte) main::i#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 100) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
return
|
||||
to:@return
|
||||
@1: scope:[] from @begin
|
||||
call main param-assignment
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
|
||||
Constant (const byte*) SCREEN#1 = SCREEN#0
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
to:@1
|
||||
main: scope:[main] from @1
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
*((const byte*) SCREEN#1 + (byte) main::i#2) ← (byte) main::i#2
|
||||
*((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte) main::i#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 100) goto main::@1
|
||||
to:main::@return
|
||||
@ -328,7 +329,8 @@ main::@return: scope:[main] from main::@1
|
||||
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Constant inlined SCREEN#1 = (const byte*) SCREEN#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Constant inlined main::i#0 = (byte) 0
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
CONTROL FLOW GRAPH
|
||||
|
@ -317,6 +317,7 @@ main::@return: scope:[main] from main::@2
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
|
||||
Not aliassing identity: SCREEN2#1 SCREEN2#1
|
||||
Alias (byte*) SCREEN1#0 = (byte*) SCREEN1#2 (byte*) SCREEN1#3
|
||||
Alias (byte*) SCREEN2#0 = (byte*) SCREEN2#4 (byte*) SCREEN2#5
|
||||
Alias (byte*) SCREEN2#2 = (byte*) SCREEN2#3
|
||||
@ -357,6 +358,7 @@ main::@return: scope:[main] from main::@2
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
|
||||
Not aliassing identity: SCREEN2#1 SCREEN2#1
|
||||
Self Phi Eliminated (byte*) SCREEN1#1
|
||||
Self Phi Eliminated (byte*) SCREEN2#2
|
||||
Self Phi Eliminated (byte*) SCREEN2#1
|
||||
@ -397,6 +399,43 @@ main::@return: scope:[main] from main::@2
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
|
||||
Redundant Phi (byte*) SCREEN1#1 (byte*) SCREEN1#0
|
||||
Redundant Phi (byte*) SCREEN2#2 (byte*) SCREEN2#0
|
||||
Redundant Phi (byte*) SCREEN2#1 (byte*) SCREEN2#2
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN1#0 ← (word) 1024
|
||||
(byte*) SCREEN2#0 ← (word) 1280
|
||||
to:@1
|
||||
main: scope:[main] from @1
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
*((byte*) SCREEN1#0 + (byte) main::i#2) ← (byte) main::i#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
(boolean~) main::$0 ← (byte) main::i#1 != (byte) 0
|
||||
if((boolean~) main::$0) goto main::@1
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte) main::j#0 ← (byte) 100
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@2 main::@3
|
||||
(byte) main::j#2 ← phi( main::@2/(byte) main::j#1 main::@3/(byte) main::j#0 )
|
||||
*((byte*) SCREEN2#0 + (byte) main::j#2) ← (byte) main::j#2
|
||||
(byte) main::j#1 ← -- (byte) main::j#2
|
||||
(boolean~) main::$1 ← (byte) main::j#1 != (byte) 255
|
||||
if((boolean~) main::$1) goto main::@2
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
to:@return
|
||||
@1: scope:[] from @begin
|
||||
call main param-assignment
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
|
||||
Simple Condition (boolean~) main::$0 if((byte) main::i#1!=(byte) 0) goto main::@1
|
||||
Simple Condition (boolean~) main::$1 if((byte) main::j#1!=(byte) 255) goto main::@2
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
@ -409,10 +448,8 @@ main: scope:[main] from @1
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte*) SCREEN2#2 ← phi( main/(byte*) SCREEN2#0 )
|
||||
(byte*) SCREEN1#1 ← phi( main/(byte*) SCREEN1#0 )
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
*((byte*) SCREEN1#1 + (byte) main::i#2) ← (byte) main::i#2
|
||||
*((byte*) SCREEN1#0 + (byte) main::i#2) ← (byte) main::i#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 0) goto main::@1
|
||||
to:main::@3
|
||||
@ -420,9 +457,8 @@ main::@3: scope:[main] from main::@1
|
||||
(byte) main::j#0 ← (byte) 100
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@2 main::@3
|
||||
(byte*) SCREEN2#1 ← phi( main::@3/(byte*) SCREEN2#2 )
|
||||
(byte) main::j#2 ← phi( main::@2/(byte) main::j#1 main::@3/(byte) main::j#0 )
|
||||
*((byte*) SCREEN2#1 + (byte) main::j#2) ← (byte) main::j#2
|
||||
*((byte*) SCREEN2#0 + (byte) main::j#2) ← (byte) main::j#2
|
||||
(byte) main::j#1 ← -- (byte) main::j#2
|
||||
if((byte) main::j#1!=(byte) 255) goto main::@2
|
||||
to:main::@return
|
||||
@ -445,71 +481,8 @@ CONTROL FLOW GRAPH
|
||||
main: scope:[main] from @1
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte*) SCREEN2#2 ← phi( main/(const byte*) SCREEN2#0 )
|
||||
(byte*) SCREEN1#1 ← phi( main/(const byte*) SCREEN1#0 )
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
*((byte*) SCREEN1#1 + (byte) main::i#2) ← (byte) main::i#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 0) goto main::@1
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@2 main::@3
|
||||
(byte*) SCREEN2#1 ← phi( main::@3/(byte*) SCREEN2#2 )
|
||||
(byte) main::j#2 ← phi( main::@2/(byte) main::j#1 main::@3/(const byte) main::j#0 )
|
||||
*((byte*) SCREEN2#1 + (byte) main::j#2) ← (byte) main::j#2
|
||||
(byte) main::j#1 ← -- (byte) main::j#2
|
||||
if((byte) main::j#1!=(byte) 255) goto main::@2
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
to:@return
|
||||
@1: scope:[] from @begin
|
||||
call main param-assignment
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
|
||||
Constant (const byte*) SCREEN1#1 = SCREEN1#0
|
||||
Constant (const byte*) SCREEN2#2 = SCREEN2#0
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
to:@1
|
||||
main: scope:[main] from @1
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
*((const byte*) SCREEN1#1 + (byte) main::i#2) ← (byte) main::i#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 0) goto main::@1
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@2 main::@3
|
||||
(byte*) SCREEN2#1 ← phi( main::@3/(const byte*) SCREEN2#2 )
|
||||
(byte) main::j#2 ← phi( main::@2/(byte) main::j#1 main::@3/(const byte) main::j#0 )
|
||||
*((byte*) SCREEN2#1 + (byte) main::j#2) ← (byte) main::j#2
|
||||
(byte) main::j#1 ← -- (byte) main::j#2
|
||||
if((byte) main::j#1!=(byte) 255) goto main::@2
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
to:@return
|
||||
@1: scope:[] from @begin
|
||||
call main param-assignment
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
|
||||
Constant (const byte*) SCREEN2#1 = SCREEN2#2
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
to:@1
|
||||
main: scope:[main] from @1
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
*((const byte*) SCREEN1#1 + (byte) main::i#2) ← (byte) main::i#2
|
||||
*((const byte*) SCREEN1#0 + (byte) main::i#2) ← (byte) main::i#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 0) goto main::@1
|
||||
to:main::@3
|
||||
@ -517,7 +490,7 @@ main::@3: scope:[main] from main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@2 main::@3
|
||||
(byte) main::j#2 ← phi( main::@2/(byte) main::j#1 main::@3/(const byte) main::j#0 )
|
||||
*((const byte*) SCREEN2#1 + (byte) main::j#2) ← (byte) main::j#2
|
||||
*((const byte*) SCREEN2#0 + (byte) main::j#2) ← (byte) main::j#2
|
||||
(byte) main::j#1 ← -- (byte) main::j#2
|
||||
if((byte) main::j#1!=(byte) 255) goto main::@2
|
||||
to:main::@return
|
||||
@ -540,13 +513,13 @@ main: scope:[main] from @1
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
*((const byte*) SCREEN1#1 + (byte) main::i#2) ← (byte) main::i#2
|
||||
*((const byte*) SCREEN1#0 + (byte) main::i#2) ← (byte) main::i#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 0) goto main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@2
|
||||
(byte) main::j#2 ← phi( main::@2/(byte) main::j#1 main::@1/(const byte) main::j#0 )
|
||||
*((const byte*) SCREEN2#1 + (byte) main::j#2) ← (byte) main::j#2
|
||||
*((const byte*) SCREEN2#0 + (byte) main::j#2) ← (byte) main::j#2
|
||||
(byte) main::j#1 ← -- (byte) main::j#2
|
||||
if((byte) main::j#1!=(byte) 255) goto main::@2
|
||||
to:main::@return
|
||||
@ -562,9 +535,10 @@ Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::j#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::j#2
|
||||
Constant inlined SCREEN1#1 = (const byte*) SCREEN1#0
|
||||
Constant inlined SCREEN2#1 = (const byte*) SCREEN2#0
|
||||
Constant inlined SCREEN2#2 = (const byte*) SCREEN2#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::j#0
|
||||
Inlining constant with var siblings (const byte) main::j#0
|
||||
Constant inlined main::j#0 = (byte) 100
|
||||
Constant inlined main::i#0 = (byte) 0
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
|
@ -6,75 +6,75 @@ main: scope:[main] from @begin
|
||||
[1] *((const byte*) PROCPORT#0) ← (byte) 50 [ ]
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@5
|
||||
[2] (byte*) main::charset4#10 ← phi( main/(const byte*) CHARSET4#0 main::@5/(byte*) main::charset4#1 ) [ main::chargen#2 main::charset4#10 ]
|
||||
[2] (byte*) main::chargen#2 ← phi( main/(const byte*) CHARGEN#0 main::@5/(byte*) main::chargen#1 ) [ main::chargen#2 main::charset4#10 ]
|
||||
[3] (byte*) main::chargen1#0 ← (byte*) main::chargen#2 + (byte) 1 [ main::chargen#2 main::charset4#10 main::chargen1#0 ]
|
||||
[4] (byte~) main::$1 ← * (byte*) main::chargen#2 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::$1 ]
|
||||
[5] (byte~) main::$2 ← (byte~) main::$1 & (byte) 96 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::$2 ]
|
||||
[6] (byte~) main::$3 ← * (byte*) main::chargen1#0 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::$2 main::$3 ]
|
||||
[7] (byte~) main::$4 ← (byte~) main::$3 & (byte) 96 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::$2 main::$4 ]
|
||||
[8] (byte~) main::$5 ← (byte~) main::$4 >> (byte) 2 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::$2 main::$5 ]
|
||||
[9] (byte~) main::$6 ← (byte~) main::$2 | (byte~) main::$5 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::$6 ]
|
||||
[10] (byte~) main::$7 ← (byte~) main::$6 >> (byte) 1 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::$7 ]
|
||||
[11] (byte~) main::$8 ← (byte~) main::$7 >> (byte) 2 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::$8 ]
|
||||
[12] (byte) main::bits#0 ← (const byte[]) bits_count#0 *idx (byte~) main::$8 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits#0 ]
|
||||
[13] if((byte) main::bits#0<(byte) 2) goto main::@2 [ main::chargen#2 main::charset4#10 main::chargen1#0 ]
|
||||
[2] (byte*) main::charset4#10 ← phi( main/(const byte*) CHARSET4#0 main::@5/(byte*) main::charset4#1 ) [ main::chargen#10 main::charset4#10 ]
|
||||
[2] (byte*) main::chargen#10 ← phi( main/(const byte*) CHARGEN#0 main::@5/(byte*) main::chargen#1 ) [ main::chargen#10 main::charset4#10 ]
|
||||
[3] (byte*) main::chargen1#0 ← (byte*) main::chargen#10 + (byte) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 ]
|
||||
[4] (byte~) main::$1 ← * (byte*) main::chargen#10 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$1 ]
|
||||
[5] (byte~) main::$2 ← (byte~) main::$1 & (byte) 96 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$2 ]
|
||||
[6] (byte~) main::$3 ← * (byte*) main::chargen1#0 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$2 main::$3 ]
|
||||
[7] (byte~) main::$4 ← (byte~) main::$3 & (byte) 96 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$2 main::$4 ]
|
||||
[8] (byte~) main::$5 ← (byte~) main::$4 >> (byte) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$2 main::$5 ]
|
||||
[9] (byte~) main::$6 ← (byte~) main::$2 | (byte~) main::$5 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$6 ]
|
||||
[10] (byte~) main::$7 ← (byte~) main::$6 >> (byte) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$7 ]
|
||||
[11] (byte~) main::$8 ← (byte~) main::$7 >> (byte) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::$8 ]
|
||||
[12] (byte) main::bits#0 ← (const byte[]) bits_count#0 *idx (byte~) main::$8 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits#0 ]
|
||||
[13] if((byte) main::bits#0<(byte) 2) goto main::@2 [ main::chargen#10 main::charset4#10 main::chargen1#0 ]
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@7
|
||||
[14] (byte) main::bits_gen#9 ← phi( main::@1/(byte) 0 main::@7/(byte) 0+(byte) 1 ) [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#9 ]
|
||||
[15] (byte) main::bits_gen#1 ← (byte) main::bits_gen#9 << (byte) 1 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#1 ]
|
||||
[16] (byte~) main::$14 ← * (byte*) main::chargen#2 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$14 ]
|
||||
[17] (byte~) main::$15 ← (byte~) main::$14 & (byte) 24 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 ]
|
||||
[18] (byte~) main::$16 ← * (byte*) main::chargen1#0 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 main::$16 ]
|
||||
[19] (byte~) main::$17 ← (byte~) main::$16 & (byte) 24 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 main::$17 ]
|
||||
[20] (byte~) main::$18 ← (byte~) main::$17 >> (byte) 2 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 main::$18 ]
|
||||
[21] (byte~) main::$19 ← (byte~) main::$15 | (byte~) main::$18 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$19 ]
|
||||
[22] (byte~) main::$20 ← (byte~) main::$19 >> (byte) 1 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$20 ]
|
||||
[23] (byte) main::bits#1 ← (const byte[]) bits_count#0 *idx (byte~) main::$20 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::bits#1 ]
|
||||
[24] if((byte) main::bits#1<(byte) 2) goto main::@3 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#1 ]
|
||||
[14] (byte) main::bits_gen#9 ← phi( main::@1/(byte) 0 main::@7/(byte) 0+(byte) 1 ) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#9 ]
|
||||
[15] (byte) main::bits_gen#1 ← (byte) main::bits_gen#9 << (byte) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ]
|
||||
[16] (byte~) main::$14 ← * (byte*) main::chargen#10 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$14 ]
|
||||
[17] (byte~) main::$15 ← (byte~) main::$14 & (byte) 24 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 ]
|
||||
[18] (byte~) main::$16 ← * (byte*) main::chargen1#0 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 main::$16 ]
|
||||
[19] (byte~) main::$17 ← (byte~) main::$16 & (byte) 24 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 main::$17 ]
|
||||
[20] (byte~) main::$18 ← (byte~) main::$17 >> (byte) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$15 main::$18 ]
|
||||
[21] (byte~) main::$19 ← (byte~) main::$15 | (byte~) main::$18 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$19 ]
|
||||
[22] (byte~) main::$20 ← (byte~) main::$19 >> (byte) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::$20 ]
|
||||
[23] (byte) main::bits#1 ← (const byte[]) bits_count#0 *idx (byte~) main::$20 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 main::bits#1 ]
|
||||
[24] if((byte) main::bits#1<(byte) 2) goto main::@3 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#1 ]
|
||||
to:main::@8
|
||||
main::@8: scope:[main] from main::@2
|
||||
[25] (byte) main::bits_gen#4 ← (byte) main::bits_gen#1 + (byte) 1 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#4 ]
|
||||
[25] (byte) main::bits_gen#4 ← (byte) main::bits_gen#1 + (byte) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#4 ]
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2 main::@8
|
||||
[26] (byte) main::bits_gen#11 ← phi( main::@2/(byte) main::bits_gen#1 main::@8/(byte) main::bits_gen#4 ) [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#11 ]
|
||||
[27] (byte) main::bits_gen#14 ← (byte) main::bits_gen#11 << (byte) 1 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#14 ]
|
||||
[28] (byte~) main::$26 ← * (byte*) main::chargen#2 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$26 ]
|
||||
[29] (byte~) main::$27 ← (byte~) main::$26 & (byte) 6 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$27 ]
|
||||
[30] (byte~) main::$28 ← (byte~) main::$27 << (byte) 1 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$28 ]
|
||||
[31] (byte~) main::$29 ← * (byte*) main::chargen1#0 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$28 main::$29 ]
|
||||
[32] (byte~) main::$30 ← (byte~) main::$29 & (byte) 6 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$28 main::$30 ]
|
||||
[33] (byte~) main::$31 ← (byte~) main::$30 >> (byte) 1 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$28 main::$31 ]
|
||||
[34] (byte~) main::$32 ← (byte~) main::$28 | (byte~) main::$31 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$32 ]
|
||||
[35] (byte) main::bits#2 ← (const byte[]) bits_count#0 *idx (byte~) main::$32 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::bits#2 ]
|
||||
[36] if((byte) main::bits#2<(byte) 2) goto main::@4 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#14 ]
|
||||
[26] (byte) main::bits_gen#11 ← phi( main::@2/(byte) main::bits_gen#1 main::@8/(byte) main::bits_gen#4 ) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#11 ]
|
||||
[27] (byte) main::bits_gen#14 ← (byte) main::bits_gen#11 << (byte) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ]
|
||||
[28] (byte~) main::$26 ← * (byte*) main::chargen#10 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$26 ]
|
||||
[29] (byte~) main::$27 ← (byte~) main::$26 & (byte) 6 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$27 ]
|
||||
[30] (byte~) main::$28 ← (byte~) main::$27 << (byte) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$28 ]
|
||||
[31] (byte~) main::$29 ← * (byte*) main::chargen1#0 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$28 main::$29 ]
|
||||
[32] (byte~) main::$30 ← (byte~) main::$29 & (byte) 6 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$28 main::$30 ]
|
||||
[33] (byte~) main::$31 ← (byte~) main::$30 >> (byte) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$28 main::$31 ]
|
||||
[34] (byte~) main::$32 ← (byte~) main::$28 | (byte~) main::$31 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::$32 ]
|
||||
[35] (byte) main::bits#2 ← (const byte[]) bits_count#0 *idx (byte~) main::$32 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 main::bits#2 ]
|
||||
[36] if((byte) main::bits#2<(byte) 2) goto main::@4 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#14 ]
|
||||
to:main::@9
|
||||
main::@9: scope:[main] from main::@3
|
||||
[37] (byte) main::bits_gen#6 ← (byte) main::bits_gen#14 + (byte) 1 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#6 ]
|
||||
[37] (byte) main::bits_gen#6 ← (byte) main::bits_gen#14 + (byte) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#6 ]
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@3 main::@9
|
||||
[38] (byte) main::bits_gen#13 ← phi( main::@3/(byte) main::bits_gen#14 main::@9/(byte) main::bits_gen#6 ) [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#13 ]
|
||||
[39] (byte) main::bits_gen#16 ← (byte) main::bits_gen#13 << (byte) 1 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#16 ]
|
||||
[40] (byte~) main::$38 ← * (byte*) main::chargen#2 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$38 ]
|
||||
[41] (byte~) main::$39 ← (byte~) main::$38 & (byte) 1 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$39 ]
|
||||
[42] (byte~) main::$40 ← (byte~) main::$39 << (byte) 2 [ main::chargen#2 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$40 ]
|
||||
[43] (byte~) main::$41 ← * (byte*) main::chargen1#0 [ main::chargen#2 main::charset4#10 main::bits_gen#16 main::$40 main::$41 ]
|
||||
[44] (byte~) main::$42 ← (byte~) main::$41 & (byte) 1 [ main::chargen#2 main::charset4#10 main::bits_gen#16 main::$40 main::$42 ]
|
||||
[45] (byte~) main::$43 ← (byte~) main::$40 | (byte~) main::$42 [ main::chargen#2 main::charset4#10 main::bits_gen#16 main::$43 ]
|
||||
[46] (byte) main::bits#3 ← (const byte[]) bits_count#0 *idx (byte~) main::$43 [ main::chargen#2 main::charset4#10 main::bits_gen#16 main::bits#3 ]
|
||||
[47] if((byte) main::bits#3<(byte) 2) goto main::@5 [ main::chargen#2 main::charset4#10 main::bits_gen#16 ]
|
||||
[38] (byte) main::bits_gen#13 ← phi( main::@3/(byte) main::bits_gen#14 main::@9/(byte) main::bits_gen#6 ) [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#13 ]
|
||||
[39] (byte) main::bits_gen#16 ← (byte) main::bits_gen#13 << (byte) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 ]
|
||||
[40] (byte~) main::$38 ← * (byte*) main::chargen#10 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$38 ]
|
||||
[41] (byte~) main::$39 ← (byte~) main::$38 & (byte) 1 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$39 ]
|
||||
[42] (byte~) main::$40 ← (byte~) main::$39 << (byte) 2 [ main::chargen#10 main::charset4#10 main::chargen1#0 main::bits_gen#16 main::$40 ]
|
||||
[43] (byte~) main::$41 ← * (byte*) main::chargen1#0 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$40 main::$41 ]
|
||||
[44] (byte~) main::$42 ← (byte~) main::$41 & (byte) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$40 main::$42 ]
|
||||
[45] (byte~) main::$43 ← (byte~) main::$40 | (byte~) main::$42 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::$43 ]
|
||||
[46] (byte) main::bits#3 ← (const byte[]) bits_count#0 *idx (byte~) main::$43 [ main::chargen#10 main::charset4#10 main::bits_gen#16 main::bits#3 ]
|
||||
[47] if((byte) main::bits#3<(byte) 2) goto main::@5 [ main::chargen#10 main::charset4#10 main::bits_gen#16 ]
|
||||
to:main::@10
|
||||
main::@10: scope:[main] from main::@4
|
||||
[48] (byte) main::bits_gen#8 ← (byte) main::bits_gen#16 + (byte) 1 [ main::chargen#2 main::charset4#10 main::bits_gen#8 ]
|
||||
[48] (byte) main::bits_gen#8 ← (byte) main::bits_gen#16 + (byte) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#8 ]
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@10 main::@4
|
||||
[49] (byte) main::bits_gen#15 ← phi( main::@10/(byte) main::bits_gen#8 main::@4/(byte) main::bits_gen#16 ) [ main::chargen#2 main::charset4#10 main::bits_gen#15 ]
|
||||
[50] (byte) main::bits_gen#7 ← (byte) main::bits_gen#15 << (byte) 1 [ main::chargen#2 main::charset4#10 main::bits_gen#7 ]
|
||||
[51] *((byte*) main::charset4#10) ← (byte) main::bits_gen#7 [ main::chargen#2 main::charset4#10 ]
|
||||
[52] (byte*) main::charset4#1 ← ++ (byte*) main::charset4#10 [ main::chargen#2 main::charset4#1 ]
|
||||
[53] (byte*) main::chargen#1 ← (byte*) main::chargen#2 + (byte) 2 [ main::chargen#1 main::charset4#1 ]
|
||||
[49] (byte) main::bits_gen#15 ← phi( main::@10/(byte) main::bits_gen#8 main::@4/(byte) main::bits_gen#16 ) [ main::chargen#10 main::charset4#10 main::bits_gen#15 ]
|
||||
[50] (byte) main::bits_gen#7 ← (byte) main::bits_gen#15 << (byte) 1 [ main::chargen#10 main::charset4#10 main::bits_gen#7 ]
|
||||
[51] *((byte*) main::charset4#10) ← (byte) main::bits_gen#7 [ main::chargen#10 main::charset4#10 ]
|
||||
[52] (byte*) main::charset4#1 ← ++ (byte*) main::charset4#10 [ main::chargen#10 main::charset4#1 ]
|
||||
[53] (byte*) main::chargen#1 ← (byte*) main::chargen#10 + (byte) 2 [ main::chargen#1 main::charset4#1 ]
|
||||
[54] if((byte*) main::chargen#1<(const byte*) CHARGEN#0+(word) 2048) goto main::@1 [ main::chargen#1 main::charset4#1 ]
|
||||
to:main::@11
|
||||
main::@11: scope:[main] from main::@5
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -75,7 +75,7 @@
|
||||
(byte) main::bits_gen#9 reg byte a 11.0
|
||||
(byte*) main::chargen
|
||||
(byte*) main::chargen#1 chargen zp ZP_PTR_BYTE:2 16.5
|
||||
(byte*) main::chargen#2 chargen zp ZP_PTR_BYTE:2 1.5098039215686279
|
||||
(byte*) main::chargen#10 chargen zp ZP_PTR_BYTE:2 1.5098039215686279
|
||||
(byte*) main::chargen1
|
||||
(byte*) main::chargen1#0 chargen1 zp ZP_PTR_BYTE:7 1.375
|
||||
(byte*) main::charset4
|
||||
@ -85,7 +85,7 @@
|
||||
(byte) main::i#1 reg byte x 16.5
|
||||
(byte) main::i#2 reg byte x 22.0
|
||||
|
||||
zp ZP_PTR_BYTE:2 [ main::chargen#2 main::chargen#1 ]
|
||||
zp ZP_PTR_BYTE:2 [ main::chargen#10 main::chargen#1 ]
|
||||
zp ZP_PTR_BYTE:4 [ main::charset4#10 main::charset4#1 ]
|
||||
reg byte a [ main::bits_gen#9 ]
|
||||
zp ZP_BYTE:6 [ main::bits_gen#11 main::bits_gen#1 main::bits_gen#4 main::bits_gen#13 main::bits_gen#14 main::bits_gen#6 main::bits_gen#15 main::bits_gen#8 main::bits_gen#16 main::$2 ]
|
||||
|
@ -330,9 +330,9 @@ main::@return: scope:[main] from main::@2
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Redundant Phi (byte) main::i#3 (byte) main::i#2
|
||||
Redundant Phi (byte*) SCREEN#4 (byte*) SCREEN#1
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
Alias (byte) main::i#2 = (byte) main::i#3
|
||||
Alias (byte*) SCREEN#1 = (byte*) SCREEN#4
|
||||
Succesful SSA optimization Pass2AliasElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN#0 ← (word) 1024
|
||||
@ -389,6 +389,34 @@ main::@return: scope:[main] from main::@2
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#0
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN#0 ← (word) 1024
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(boolean~) main::$1 ← (byte) main::i#2 >= (byte) 50
|
||||
if((boolean~) main::$1) goto main::@2
|
||||
to:main::@3
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
(boolean~) main::$2 ← (byte) main::i#1 < (byte) 100
|
||||
if((boolean~) main::$2) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
*((byte*) SCREEN#0) ← (byte) main::i#2
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Simple Condition (boolean~) main::$1 if((byte) main::i#2>=(byte) 50) goto main::@2
|
||||
Simple Condition (boolean~) main::$2 if((byte) main::i#1<(byte) 100) goto main::@1
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
@ -401,7 +429,6 @@ main: scope:[main] from @begin
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte*) SCREEN#1 ← phi( main/(byte*) SCREEN#0 )
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
if((byte) main::i#2>=(byte) 50) goto main::@2
|
||||
to:main::@3
|
||||
@ -410,7 +437,7 @@ main::@2: scope:[main] from main::@1 main::@3
|
||||
if((byte) main::i#1<(byte) 100) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
*((byte*) SCREEN#1) ← (byte) main::i#2
|
||||
*((byte*) SCREEN#0) ← (byte) main::i#2
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
@ -427,7 +454,6 @@ CONTROL FLOW GRAPH
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte*) SCREEN#1 ← phi( main/(const byte*) SCREEN#0 )
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
if((byte) main::i#2>=(byte) 50) goto main::@2
|
||||
to:main::@3
|
||||
@ -436,38 +462,15 @@ main::@2: scope:[main] from main::@1 main::@3
|
||||
if((byte) main::i#1<(byte) 100) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
*((byte*) SCREEN#1) ← (byte) main::i#2
|
||||
*((const byte*) SCREEN#0) ← (byte) main::i#2
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte*) SCREEN#1 = SCREEN#0
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
if((byte) main::i#2>=(byte) 50) goto main::@2
|
||||
to:main::@3
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1<(byte) 100) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
*((const byte*) SCREEN#1) ← (byte) main::i#2
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant inlined SCREEN#1 = (const byte*) SCREEN#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Constant inlined main::i#0 = (byte) 0
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
CONTROL FLOW GRAPH
|
||||
|
@ -423,10 +423,10 @@ main::@return: scope:[main] from main::@2
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Redundant Phi (byte) main::i#3 (byte) main::i#2
|
||||
Redundant Phi (byte[]) TXT#3 (byte[]) TXT#1
|
||||
Redundant Phi (byte*) SCREEN#3 (byte*) SCREEN#1
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
Alias (byte) main::i#2 = (byte) main::i#3
|
||||
Alias (byte[]) TXT#1 = (byte[]) TXT#3
|
||||
Alias (byte*) SCREEN#1 = (byte*) SCREEN#3
|
||||
Succesful SSA optimization Pass2AliasElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN#0 ← (word) 1024
|
||||
@ -500,6 +500,42 @@ main::@return: scope:[main] from main::@2
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Redundant Phi (byte[]) TXT#1 (byte[]) TXT#0
|
||||
Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#0
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN#0 ← (word) 1024
|
||||
(byte[]) TXT#0 ← { (byte) 3, (byte) 1, (byte) 13, (byte) 5, (byte) 12, (byte) 15, (byte) 20, (byte) 32 }
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
(byte) main::j#0 ← (byte) 0
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte) main::j#3 ← phi( main/(byte) main::j#0 main::@2/(byte) main::j#4 )
|
||||
(byte~) main::$0 ← (byte[]) TXT#0 *idx (byte) main::j#3
|
||||
*((byte*) SCREEN#0 + (byte) main::i#2) ← (byte~) main::$0
|
||||
(byte) main::j#1 ← ++ (byte) main::j#3
|
||||
(boolean~) main::$2 ← (byte) main::j#1 != (byte) 8
|
||||
if((boolean~) main::$2) goto main::@2
|
||||
to:main::@3
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::j#4 ← phi( main::@1/(byte) main::j#1 main::@3/(byte) main::j#2 )
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
(boolean~) main::$3 ← (byte) main::i#1 != (byte) 101
|
||||
if((boolean~) main::$3) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte) main::j#2 ← (byte) 0
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Simple Condition (boolean~) main::$2 if((byte) main::j#1!=(byte) 8) goto main::@2
|
||||
Simple Condition (boolean~) main::$3 if((byte) main::i#1!=(byte) 101) goto main::@1
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
@ -515,11 +551,9 @@ main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte*) SCREEN#1 ← phi( main/(byte*) SCREEN#0 )
|
||||
(byte) main::j#3 ← phi( main/(byte) main::j#0 main::@2/(byte) main::j#4 )
|
||||
(byte[]) TXT#1 ← phi( main/(byte[]) TXT#0 )
|
||||
(byte~) main::$0 ← (byte[]) TXT#1 *idx (byte) main::j#3
|
||||
*((byte*) SCREEN#1 + (byte) main::i#2) ← (byte~) main::$0
|
||||
(byte~) main::$0 ← (byte[]) TXT#0 *idx (byte) main::j#3
|
||||
*((byte*) SCREEN#0 + (byte) main::i#2) ← (byte~) main::$0
|
||||
(byte) main::j#1 ← ++ (byte) main::j#3
|
||||
if((byte) main::j#1!=(byte) 8) goto main::@2
|
||||
to:main::@3
|
||||
@ -550,40 +584,9 @@ main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte*) SCREEN#1 ← phi( main/(const byte*) SCREEN#0 )
|
||||
(byte) main::j#3 ← phi( main/(const byte) main::j#0 main::@2/(byte) main::j#4 )
|
||||
(byte[]) TXT#1 ← phi( main/(const byte[]) TXT#0 )
|
||||
(byte~) main::$0 ← (byte[]) TXT#1 *idx (byte) main::j#3
|
||||
*((byte*) SCREEN#1 + (byte) main::i#2) ← (byte~) main::$0
|
||||
(byte) main::j#1 ← ++ (byte) main::j#3
|
||||
if((byte) main::j#1!=(byte) 8) goto main::@2
|
||||
to:main::@3
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::j#4 ← phi( main::@1/(byte) main::j#1 main::@3/(const byte) main::j#2 )
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 101) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte[]) TXT#1 = TXT#0
|
||||
Constant (const byte*) SCREEN#1 = SCREEN#0
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte) main::j#3 ← phi( main/(const byte) main::j#0 main::@2/(byte) main::j#4 )
|
||||
(byte~) main::$0 ← (const byte[]) TXT#1 *idx (byte) main::j#3
|
||||
*((const byte*) SCREEN#1 + (byte) main::i#2) ← (byte~) main::$0
|
||||
(byte~) main::$0 ← (const byte[]) TXT#0 *idx (byte) main::j#3
|
||||
*((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte~) main::$0
|
||||
(byte) main::j#1 ← ++ (byte) main::j#3
|
||||
if((byte) main::j#1!=(byte) 8) goto main::@2
|
||||
to:main::@3
|
||||
@ -602,11 +605,17 @@ main::@return: scope:[main] from main::@2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::j#3
|
||||
Not culling empty block because it shares successor with its predecessor. (label) main::@3
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::j#3
|
||||
Constant inlined SCREEN#1 = (const byte*) SCREEN#0
|
||||
Inlining constant with var siblings (const byte) main::j#0
|
||||
Inlining constant with var siblings (const byte) main::j#0
|
||||
Inlining constant with var siblings (const byte) main::j#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::j#2
|
||||
Inlining constant with var siblings (const byte) main::j#2
|
||||
Inlining constant with var siblings (const byte) main::j#2
|
||||
Constant inlined main::j#2 = (byte) 0
|
||||
Constant inlined main::j#0 = (byte) 0
|
||||
Constant inlined main::i#0 = (byte) 0
|
||||
Constant inlined TXT#1 = (const byte[]) TXT#0
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
|
@ -437,10 +437,10 @@ main::@return: scope:[main] from main::@2
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Not aliassing across scopes: main::cursor#0 SCREEN#0
|
||||
Redundant Phi (byte*) main::cursor#3 (byte*) main::cursor#2
|
||||
Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#3
|
||||
Redundant Phi (byte[]) TEXT#3 (byte[]) TEXT#1
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
Alias (byte*) main::cursor#2 = (byte*) main::cursor#3
|
||||
Alias (byte*) SCREEN#2 = (byte*) SCREEN#3
|
||||
Alias (byte[]) TEXT#1 = (byte[]) TEXT#3
|
||||
Succesful SSA optimization Pass2AliasElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN#0 ← (word) 1024
|
||||
@ -452,7 +452,7 @@ main: scope:[main] from @begin
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte*) SCREEN#3 ← phi( main/(byte*) SCREEN#0 main::@2/(byte*) SCREEN#3 )
|
||||
(byte*) SCREEN#2 ← phi( main/(byte*) SCREEN#0 main::@2/(byte*) SCREEN#2 )
|
||||
(byte*) main::cursor#2 ← phi( main/(byte*) main::cursor#0 main::@2/(byte*) main::cursor#1 )
|
||||
(byte) main::i#3 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#4 )
|
||||
(byte[]) TEXT#1 ← phi( main/(byte[]) TEXT#0 main::@2/(byte[]) TEXT#1 )
|
||||
@ -465,7 +465,7 @@ main::@1: scope:[main] from main main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::i#4 ← phi( main::@1/(byte) main::i#1 main::@3/(byte) main::i#2 )
|
||||
(byte*) main::cursor#1 ← ++ (byte*) main::cursor#2
|
||||
(byte*~) main::$3 ← (byte*) SCREEN#3 + (word) 1000
|
||||
(byte*~) main::$3 ← (byte*) SCREEN#2 + (word) 1000
|
||||
(boolean~) main::$4 ← (byte*) main::cursor#1 < (byte*~) main::$3
|
||||
if((boolean~) main::$4) goto main::@1
|
||||
to:main::@return
|
||||
@ -477,8 +477,9 @@ main::@return: scope:[main] from main::@2
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Not aliassing across scopes: main::cursor#0 SCREEN#0
|
||||
Self Phi Eliminated (byte[]) TEXT#1
|
||||
Self Phi Eliminated (byte*) SCREEN#3
|
||||
Self Phi Eliminated (byte*) SCREEN#2
|
||||
Succesful SSA optimization Pass2SelfPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
@ -491,7 +492,7 @@ main: scope:[main] from @begin
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte*) SCREEN#3 ← phi( main/(byte*) SCREEN#0 )
|
||||
(byte*) SCREEN#2 ← phi( main/(byte*) SCREEN#0 )
|
||||
(byte*) main::cursor#2 ← phi( main/(byte*) main::cursor#0 main::@2/(byte*) main::cursor#1 )
|
||||
(byte) main::i#3 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#4 )
|
||||
(byte[]) TEXT#1 ← phi( main/(byte[]) TEXT#0 )
|
||||
@ -504,7 +505,44 @@ main::@1: scope:[main] from main main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::i#4 ← phi( main::@1/(byte) main::i#1 main::@3/(byte) main::i#2 )
|
||||
(byte*) main::cursor#1 ← ++ (byte*) main::cursor#2
|
||||
(byte*~) main::$3 ← (byte*) SCREEN#3 + (word) 1000
|
||||
(byte*~) main::$3 ← (byte*) SCREEN#2 + (word) 1000
|
||||
(boolean~) main::$4 ← (byte*) main::cursor#1 < (byte*~) main::$3
|
||||
if((boolean~) main::$4) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte) main::i#2 ← (byte) 0
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Redundant Phi (byte[]) TEXT#1 (byte[]) TEXT#0
|
||||
Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#0
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN#0 ← (word) 1024
|
||||
(byte[]) TEXT#0 ← (string) "camelot "
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
(byte*) main::cursor#0 ← (byte*) SCREEN#0
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte*) main::cursor#2 ← phi( main/(byte*) main::cursor#0 main::@2/(byte*) main::cursor#1 )
|
||||
(byte) main::i#3 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#4 )
|
||||
(byte~) main::$0 ← (byte[]) TEXT#0 *idx (byte) main::i#3
|
||||
*((byte*) main::cursor#2) ← (byte~) main::$0
|
||||
(byte) main::i#1 ← ++ (byte) main::i#3
|
||||
(boolean~) main::$2 ← (byte) main::i#1 != (byte) 8
|
||||
if((boolean~) main::$2) goto main::@2
|
||||
to:main::@3
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::i#4 ← phi( main::@1/(byte) main::i#1 main::@3/(byte) main::i#2 )
|
||||
(byte*) main::cursor#1 ← ++ (byte*) main::cursor#2
|
||||
(byte*~) main::$3 ← (byte*) SCREEN#0 + (word) 1000
|
||||
(boolean~) main::$4 ← (byte*) main::cursor#1 < (byte*~) main::$3
|
||||
if((boolean~) main::$4) goto main::@1
|
||||
to:main::@return
|
||||
@ -530,11 +568,9 @@ main: scope:[main] from @begin
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte*) SCREEN#3 ← phi( main/(byte*) SCREEN#0 )
|
||||
(byte*) main::cursor#2 ← phi( main/(byte*) main::cursor#0 main::@2/(byte*) main::cursor#1 )
|
||||
(byte) main::i#3 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#4 )
|
||||
(byte[]) TEXT#1 ← phi( main/(byte[]) TEXT#0 )
|
||||
(byte~) main::$0 ← (byte[]) TEXT#1 *idx (byte) main::i#3
|
||||
(byte~) main::$0 ← (byte[]) TEXT#0 *idx (byte) main::i#3
|
||||
*((byte*) main::cursor#2) ← (byte~) main::$0
|
||||
(byte) main::i#1 ← ++ (byte) main::i#3
|
||||
if((byte) main::i#1!=(byte) 8) goto main::@2
|
||||
@ -542,7 +578,7 @@ main::@1: scope:[main] from main main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::i#4 ← phi( main::@1/(byte) main::i#1 main::@3/(byte) main::i#2 )
|
||||
(byte*) main::cursor#1 ← ++ (byte*) main::cursor#2
|
||||
(byte*~) main::$3 ← (byte*) SCREEN#3 + (word) 1000
|
||||
(byte*~) main::$3 ← (byte*) SCREEN#0 + (word) 1000
|
||||
if((byte*) main::cursor#1<(byte*~) main::$3) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
@ -566,11 +602,9 @@ main: scope:[main] from @begin
|
||||
(byte*) main::cursor#0 ← (const byte*) SCREEN#0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte*) SCREEN#3 ← phi( main/(const byte*) SCREEN#0 )
|
||||
(byte*) main::cursor#2 ← phi( main/(byte*) main::cursor#0 main::@2/(byte*) main::cursor#1 )
|
||||
(byte) main::i#3 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#4 )
|
||||
(byte[]) TEXT#1 ← phi( main/(const byte[]) TEXT#0 )
|
||||
(byte~) main::$0 ← (byte[]) TEXT#1 *idx (byte) main::i#3
|
||||
(byte~) main::$0 ← (const byte[]) TEXT#0 *idx (byte) main::i#3
|
||||
*((byte*) main::cursor#2) ← (byte~) main::$0
|
||||
(byte) main::i#1 ← ++ (byte) main::i#3
|
||||
if((byte) main::i#1!=(byte) 8) goto main::@2
|
||||
@ -578,7 +612,7 @@ main::@1: scope:[main] from main main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::i#4 ← phi( main::@1/(byte) main::i#1 main::@3/(const byte) main::i#2 )
|
||||
(byte*) main::cursor#1 ← ++ (byte*) main::cursor#2
|
||||
(byte*~) main::$3 ← (byte*) SCREEN#3 + (word) 1000
|
||||
(byte*~) main::$3 ← (const byte*) SCREEN#0 + (word) 1000
|
||||
if((byte*) main::cursor#1<(byte*~) main::$3) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
@ -589,8 +623,7 @@ main::@return: scope:[main] from main::@2
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte*) main::cursor#0 = SCREEN#0
|
||||
Constant (const byte[]) TEXT#1 = TEXT#0
|
||||
Constant (const byte*) SCREEN#3 = SCREEN#0
|
||||
Constant (const byte*) main::$3 = SCREEN#0+1000
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
@ -601,36 +634,7 @@ main: scope:[main] from @begin
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte*) main::cursor#2 ← phi( main/(const byte*) main::cursor#0 main::@2/(byte*) main::cursor#1 )
|
||||
(byte) main::i#3 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#4 )
|
||||
(byte~) main::$0 ← (const byte[]) TEXT#1 *idx (byte) main::i#3
|
||||
*((byte*) main::cursor#2) ← (byte~) main::$0
|
||||
(byte) main::i#1 ← ++ (byte) main::i#3
|
||||
if((byte) main::i#1!=(byte) 8) goto main::@2
|
||||
to:main::@3
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte) main::i#4 ← phi( main::@1/(byte) main::i#1 main::@3/(const byte) main::i#2 )
|
||||
(byte*) main::cursor#1 ← ++ (byte*) main::cursor#2
|
||||
(byte*~) main::$3 ← (const byte*) SCREEN#3 + (word) 1000
|
||||
if((byte*) main::cursor#1<(byte*~) main::$3) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte*) main::$3 = SCREEN#3+1000
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte*) main::cursor#2 ← phi( main/(const byte*) main::cursor#0 main::@2/(byte*) main::cursor#1 )
|
||||
(byte) main::i#3 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#4 )
|
||||
(byte~) main::$0 ← (const byte[]) TEXT#1 *idx (byte) main::i#3
|
||||
(byte~) main::$0 ← (const byte[]) TEXT#0 *idx (byte) main::i#3
|
||||
*((byte*) main::cursor#2) ← (byte~) main::$0
|
||||
(byte) main::i#1 ← ++ (byte) main::i#3
|
||||
if((byte) main::i#1!=(byte) 8) goto main::@2
|
||||
@ -650,9 +654,15 @@ main::@return: scope:[main] from main::@2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#3
|
||||
Not culling empty block because it shares successor with its predecessor. (label) main::@3
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#3
|
||||
Constant inlined TEXT#1 = (const byte[]) TEXT#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#2
|
||||
Inlining constant with var siblings (const byte) main::i#2
|
||||
Inlining constant with var siblings (const byte) main::i#2
|
||||
Inlining constant with var siblings (const byte*) main::cursor#0
|
||||
Inlining constant with var siblings (const byte*) main::cursor#0
|
||||
Constant inlined main::$3 = (const byte*) SCREEN#0+(word) 1000
|
||||
Constant inlined SCREEN#3 = (const byte*) SCREEN#0
|
||||
Constant inlined main::i#2 = (byte) 0
|
||||
Constant inlined main::cursor#0 = (const byte*) SCREEN#0
|
||||
Constant inlined main::i#0 = (byte) 0
|
||||
|
@ -261,6 +261,30 @@ main::@return: scope:[main] from main::@1
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Redundant Phi (byte[16]) main::buf#1 (byte[16]) main::buf#0
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
(byte[16]) main::buf#0 ← (word) 4352
|
||||
(byte) main::i#0 ← (byte) 5
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) 2 + (byte) main::i#2
|
||||
(byte~) main::$1 ← (byte~) main::$0 + (byte) 2
|
||||
*((byte[16]) main::buf#0 + (byte) main::i#2) ← (byte~) main::$1
|
||||
(byte) main::i#1 ← (byte) main::i#2 + (byte) 1
|
||||
(boolean~) main::$3 ← (byte) main::i#1 < (byte) 10
|
||||
if((boolean~) main::$3) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Simple Condition (boolean~) main::$3 if((byte) main::i#1<(byte) 10) goto main::@1
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
CONTROL FLOW GRAPH
|
||||
@ -272,11 +296,10 @@ main: scope:[main] from @begin
|
||||
(byte) main::i#0 ← (byte) 5
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte[16]) main::buf#1 ← phi( main/(byte[16]) main::buf#0 )
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) 2 + (byte) main::i#2
|
||||
(byte~) main::$1 ← (byte~) main::$0 + (byte) 2
|
||||
*((byte[16]) main::buf#1 + (byte) main::i#2) ← (byte~) main::$1
|
||||
*((byte[16]) main::buf#0 + (byte) main::i#2) ← (byte~) main::$1
|
||||
(byte) main::i#1 ← (byte) main::i#2 + (byte) 1
|
||||
if((byte) main::i#1<(byte) 10) goto main::@1
|
||||
to:main::@return
|
||||
@ -295,32 +318,10 @@ CONTROL FLOW GRAPH
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte[16]) main::buf#1 ← phi( main/(const byte[16]) main::buf#0 )
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) 2 + (byte) main::i#2
|
||||
(byte~) main::$1 ← (byte~) main::$0 + (byte) 2
|
||||
*((byte[16]) main::buf#1 + (byte) main::i#2) ← (byte~) main::$1
|
||||
(byte) main::i#1 ← (byte) main::i#2 + (byte) 1
|
||||
if((byte) main::i#1<(byte) 10) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte[16]) main::buf#1 = main::buf#0
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) 2 + (byte) main::i#2
|
||||
(byte~) main::$1 ← (byte~) main::$0 + (byte) 2
|
||||
*((const byte[16]) main::buf#1 + (byte) main::i#2) ← (byte~) main::$1
|
||||
*((const byte[16]) main::buf#0 + (byte) main::i#2) ← (byte~) main::$1
|
||||
(byte) main::i#1 ← (byte) main::i#2 + (byte) 1
|
||||
if((byte) main::i#1<(byte) 10) goto main::@1
|
||||
to:main::@return
|
||||
@ -344,7 +345,7 @@ main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) main::i#2
|
||||
(byte~) main::$1 ← (byte~) main::$0 + (byte) 2+(byte) 2
|
||||
*((const byte[16]) main::buf#1 + (byte) main::i#2) ← (byte~) main::$1
|
||||
*((const byte[16]) main::buf#0 + (byte) main::i#2) ← (byte~) main::$1
|
||||
(byte) main::i#1 ← (byte) main::i#2 + (byte) 1
|
||||
if((byte) main::i#1<(byte) 10) goto main::@1
|
||||
to:main::@return
|
||||
@ -366,7 +367,7 @@ main: scope:[main] from @begin
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$1 ← (byte) main::i#2 + (byte) 2+(byte) 2
|
||||
*((const byte[16]) main::buf#1 + (byte) main::i#2) ← (byte~) main::$1
|
||||
*((const byte[16]) main::buf#0 + (byte) main::i#2) ← (byte~) main::$1
|
||||
(byte) main::i#1 ← (byte) main::i#2 + (byte) 1
|
||||
if((byte) main::i#1<(byte) 10) goto main::@1
|
||||
to:main::@return
|
||||
@ -381,7 +382,8 @@ Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Constant inlined main::buf#1 = (const byte[16]) main::buf#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Constant inlined main::i#0 = (byte) 5
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
CONTROL FLOW GRAPH
|
||||
|
@ -414,6 +414,42 @@ main::@return: scope:[main] from main::@1
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Redundant Phi (byte[]) str#1 (byte[]) str#0
|
||||
Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#0
|
||||
Redundant Phi (byte[]) nums#1 (byte[]) nums#0
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN#0 ← (word) 1024
|
||||
(byte) char#0 ← (byte) 'a'
|
||||
(byte) num#0 ← (byte) 1
|
||||
(string~) $0 ← (string) "bc" + (string) "d"
|
||||
(byte[]) str#0 ← (string~) $0 + (byte) 'e'
|
||||
(byte[]) nums#0 ← { (byte) 2, (byte) 3, (byte) 4, (byte) 5 }
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
*((byte*) SCREEN#0 + (byte) 0) ← (byte) char#0
|
||||
*((byte*) SCREEN#0 + (byte) 2) ← (byte) num#0
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) 4 + (byte) main::i#2
|
||||
(byte~) main::$1 ← (byte[]) str#0 *idx (byte) main::i#2
|
||||
*((byte*) SCREEN#0 + (byte~) main::$0) ← (byte~) main::$1
|
||||
(byte~) main::$2 ← (byte) 9 + (byte) main::i#2
|
||||
(byte~) main::$3 ← (byte[]) nums#0 *idx (byte) main::i#2
|
||||
*((byte*) SCREEN#0 + (byte~) main::$2) ← (byte~) main::$3
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
(boolean~) main::$4 ← (byte) main::i#1 != (byte) 4
|
||||
if((boolean~) main::$4) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Simple Condition (boolean~) main::$4 if((byte) main::i#1!=(byte) 4) goto main::@1
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
CONTROL FLOW GRAPH
|
||||
@ -432,16 +468,13 @@ main: scope:[main] from @begin
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte[]) nums#1 ← phi( main/(byte[]) nums#0 )
|
||||
(byte*) SCREEN#2 ← phi( main/(byte*) SCREEN#0 )
|
||||
(byte[]) str#1 ← phi( main/(byte[]) str#0 )
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) 4 + (byte) main::i#2
|
||||
(byte~) main::$1 ← (byte[]) str#1 *idx (byte) main::i#2
|
||||
*((byte*) SCREEN#2 + (byte~) main::$0) ← (byte~) main::$1
|
||||
(byte~) main::$1 ← (byte[]) str#0 *idx (byte) main::i#2
|
||||
*((byte*) SCREEN#0 + (byte~) main::$0) ← (byte~) main::$1
|
||||
(byte~) main::$2 ← (byte) 9 + (byte) main::i#2
|
||||
(byte~) main::$3 ← (byte[]) nums#1 *idx (byte) main::i#2
|
||||
*((byte*) SCREEN#2 + (byte~) main::$2) ← (byte~) main::$3
|
||||
(byte~) main::$3 ← (byte[]) nums#0 *idx (byte) main::i#2
|
||||
*((byte*) SCREEN#0 + (byte~) main::$2) ← (byte~) main::$3
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 4) goto main::@1
|
||||
to:main::@return
|
||||
@ -467,16 +500,13 @@ main: scope:[main] from @begin
|
||||
*((const byte*) SCREEN#0 + (byte) 2) ← (const byte) num#0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte[]) nums#1 ← phi( main/(const byte[]) nums#0 )
|
||||
(byte*) SCREEN#2 ← phi( main/(const byte*) SCREEN#0 )
|
||||
(byte[]) str#1 ← phi( main/(byte[]) str#0 )
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) 4 + (byte) main::i#2
|
||||
(byte~) main::$1 ← (byte[]) str#1 *idx (byte) main::i#2
|
||||
*((byte*) SCREEN#2 + (byte~) main::$0) ← (byte~) main::$1
|
||||
(byte~) main::$1 ← (byte[]) str#0 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#0 + (byte~) main::$0) ← (byte~) main::$1
|
||||
(byte~) main::$2 ← (byte) 9 + (byte) main::i#2
|
||||
(byte~) main::$3 ← (byte[]) nums#1 *idx (byte) main::i#2
|
||||
*((byte*) SCREEN#2 + (byte~) main::$2) ← (byte~) main::$3
|
||||
(byte~) main::$3 ← (const byte[]) nums#0 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#0 + (byte~) main::$2) ← (byte~) main::$3
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 4) goto main::@1
|
||||
to:main::@return
|
||||
@ -486,35 +516,6 @@ main::@return: scope:[main] from main::@1
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte[]) str#0 = $0+'e'
|
||||
Constant (const byte*) SCREEN#2 = SCREEN#0
|
||||
Constant (const byte[]) nums#1 = nums#0
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
*((const byte*) SCREEN#0 + (byte) 0) ← (const byte) char#0
|
||||
*((const byte*) SCREEN#0 + (byte) 2) ← (const byte) num#0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte[]) str#1 ← phi( main/(const byte[]) str#0 )
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) 4 + (byte) main::i#2
|
||||
(byte~) main::$1 ← (byte[]) str#1 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#2 + (byte~) main::$0) ← (byte~) main::$1
|
||||
(byte~) main::$2 ← (byte) 9 + (byte) main::i#2
|
||||
(byte~) main::$3 ← (const byte[]) nums#1 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#2 + (byte~) main::$2) ← (byte~) main::$3
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 4) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte[]) str#1 = str#0
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
@ -527,11 +528,11 @@ main: scope:[main] from @begin
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) 4 + (byte) main::i#2
|
||||
(byte~) main::$1 ← (const byte[]) str#1 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#2 + (byte~) main::$0) ← (byte~) main::$1
|
||||
(byte~) main::$1 ← (const byte[]) str#0 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#0 + (byte~) main::$0) ← (byte~) main::$1
|
||||
(byte~) main::$2 ← (byte) 9 + (byte) main::i#2
|
||||
(byte~) main::$3 ← (const byte[]) nums#1 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#2 + (byte~) main::$2) ← (byte~) main::$3
|
||||
(byte~) main::$3 ← (const byte[]) nums#0 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#0 + (byte~) main::$2) ← (byte~) main::$3
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 4) goto main::@1
|
||||
to:main::@return
|
||||
@ -544,10 +545,10 @@ Consolidated assigned array index constant in assignment *(SCREEN#0+0)
|
||||
Consolidated assigned array index constant in assignment *(SCREEN#0+2)
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Consolidated assigned array index constant in assignment *(SCREEN#2+4 + main::$0)
|
||||
Consolidated assigned array index constant in assignment *(SCREEN#0+4 + main::$0)
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Consolidated assigned array index constant in assignment *(SCREEN#2+9 + main::$2)
|
||||
Consolidated assigned array index constant in assignment *(SCREEN#0+9 + main::$2)
|
||||
Succesful SSA optimization Pass2ConstantAdditionElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
@ -560,11 +561,11 @@ main: scope:[main] from @begin
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) main::i#2
|
||||
(byte~) main::$1 ← (const byte[]) str#1 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#2+(byte) 4 + (byte~) main::$0) ← (byte~) main::$1
|
||||
(byte~) main::$1 ← (const byte[]) str#0 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#0+(byte) 4 + (byte~) main::$0) ← (byte~) main::$1
|
||||
(byte~) main::$2 ← (byte) main::i#2
|
||||
(byte~) main::$3 ← (const byte[]) nums#1 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#2+(byte) 9 + (byte~) main::$2) ← (byte~) main::$3
|
||||
(byte~) main::$3 ← (const byte[]) nums#0 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#0+(byte) 9 + (byte~) main::$2) ← (byte~) main::$3
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 4) goto main::@1
|
||||
to:main::@return
|
||||
@ -587,10 +588,10 @@ main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@1/(byte) main::i#1 )
|
||||
(byte~) main::$1 ← (const byte[]) str#1 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#2+(byte) 4 + (byte) main::i#2) ← (byte~) main::$1
|
||||
(byte~) main::$3 ← (const byte[]) nums#1 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#2+(byte) 9 + (byte) main::i#2) ← (byte~) main::$3
|
||||
(byte~) main::$1 ← (const byte[]) str#0 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#0+(byte) 4 + (byte) main::i#2) ← (byte~) main::$1
|
||||
(byte~) main::$3 ← (const byte[]) nums#0 *idx (byte) main::i#2
|
||||
*((const byte*) SCREEN#0+(byte) 9 + (byte) main::i#2) ← (byte~) main::$3
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 4) goto main::@1
|
||||
to:main::@return
|
||||
@ -607,11 +608,10 @@ Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Constant inlined SCREEN#2 = (const byte*) SCREEN#0
|
||||
Constant inlined str#1 = (const byte[]) str#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Constant inlined $0 = (string) "bc"+(string) "d"
|
||||
Constant inlined main::i#0 = (byte) 0
|
||||
Constant inlined nums#1 = (const byte[]) nums#0
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
|
@ -440,6 +440,10 @@ Not aliassing across scopes: main::$0 inc::return#0
|
||||
Not aliassing across scopes: main::$2 inc::return#0
|
||||
Not aliassing across scopes: i#1 inc::$0
|
||||
Not aliassing across scopes: inc::return#0 i#1
|
||||
Inlining constant with var siblings (const byte) main::a#0
|
||||
Inlining constant with var siblings (const byte) main::a#0
|
||||
Inlining constant with var siblings (const byte) i#0
|
||||
Inlining constant with var siblings (const byte) i#0
|
||||
Constant inlined main::a#0 = (byte) 4
|
||||
Constant inlined i#0 = (byte) 0
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
|
@ -234,8 +234,8 @@ CONTROL FLOW GRAPH
|
||||
to:@2
|
||||
@end: scope:[] from @2
|
||||
|
||||
Redundant Phi (byte) i#3 (byte) i#2
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
Alias (byte) i#2 = (byte) i#3
|
||||
Succesful SSA optimization Pass2AliasElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte) i#0 ← (byte) 10
|
||||
@ -302,6 +302,11 @@ CONTROL FLOW GRAPH
|
||||
to:@2
|
||||
@end: scope:[] from @2
|
||||
|
||||
Inlining constant with var siblings (const byte) i#0
|
||||
Inlining constant with var siblings (const byte) i#0
|
||||
Inlining constant with var siblings (const byte) s#0
|
||||
Inlining constant with var siblings (const byte) s#0
|
||||
Inlining constant with var siblings (const byte) s#0
|
||||
Constant inlined s#0 = (byte) 0
|
||||
Constant inlined i#0 = (byte) 10
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
|
@ -412,6 +412,44 @@ nest::@return: scope:[nest] from nest::@1
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#0
|
||||
Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#2
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN#0 ← (word) 1024
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
(byte) main::i#0 ← (byte) 100
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@3
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@3/(byte) main::i#1 )
|
||||
call nest param-assignment
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte) main::i#1 ← -- (byte) main::i#2
|
||||
(boolean~) main::$1 ← (byte) main::i#1 > (byte) 0
|
||||
if((boolean~) main::$1) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@3
|
||||
return
|
||||
to:@return
|
||||
nest: scope:[nest] from main::@1
|
||||
(byte) nest::j#0 ← (byte) 100
|
||||
to:nest::@1
|
||||
nest::@1: scope:[nest] from nest nest::@1
|
||||
(byte) nest::j#2 ← phi( nest/(byte) nest::j#0 nest::@1/(byte) nest::j#1 )
|
||||
*((byte*) SCREEN#0) ← (byte) nest::j#2
|
||||
(byte) nest::j#1 ← -- (byte) nest::j#2
|
||||
(boolean~) nest::$0 ← (byte) nest::j#1 > (byte) 0
|
||||
if((boolean~) nest::$0) goto nest::@1
|
||||
to:nest::@return
|
||||
nest::@return: scope:[nest] from nest::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Simple Condition (boolean~) main::$1 if((byte) main::i#1>(byte) 0) goto main::@1
|
||||
Simple Condition (boolean~) nest::$0 if((byte) nest::j#1>(byte) 0) goto nest::@1
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
@ -424,7 +462,6 @@ main: scope:[main] from @begin
|
||||
(byte) main::i#0 ← (byte) 100
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@3
|
||||
(byte*) SCREEN#2 ← phi( main/(byte*) SCREEN#0 )
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@3/(byte) main::i#1 )
|
||||
call nest param-assignment
|
||||
to:main::@3
|
||||
@ -439,9 +476,8 @@ nest: scope:[nest] from main::@1
|
||||
(byte) nest::j#0 ← (byte) 100
|
||||
to:nest::@1
|
||||
nest::@1: scope:[nest] from nest nest::@1
|
||||
(byte*) SCREEN#1 ← phi( nest/(byte*) SCREEN#2 )
|
||||
(byte) nest::j#2 ← phi( nest/(byte) nest::j#0 nest::@1/(byte) nest::j#1 )
|
||||
*((byte*) SCREEN#1) ← (byte) nest::j#2
|
||||
*((byte*) SCREEN#0) ← (byte) nest::j#2
|
||||
(byte) nest::j#1 ← -- (byte) nest::j#2
|
||||
if((byte) nest::j#1>(byte) 0) goto nest::@1
|
||||
to:nest::@return
|
||||
@ -455,73 +491,6 @@ Constant (const byte) main::i#0 = 100
|
||||
Constant (const byte) nest::j#0 = 100
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@3
|
||||
(byte*) SCREEN#2 ← phi( main/(const byte*) SCREEN#0 )
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@3/(byte) main::i#1 )
|
||||
call nest param-assignment
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte) main::i#1 ← -- (byte) main::i#2
|
||||
if((byte) main::i#1>(byte) 0) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@3
|
||||
return
|
||||
to:@return
|
||||
nest: scope:[nest] from main::@1
|
||||
to:nest::@1
|
||||
nest::@1: scope:[nest] from nest nest::@1
|
||||
(byte*) SCREEN#1 ← phi( nest/(byte*) SCREEN#2 )
|
||||
(byte) nest::j#2 ← phi( nest/(const byte) nest::j#0 nest::@1/(byte) nest::j#1 )
|
||||
*((byte*) SCREEN#1) ← (byte) nest::j#2
|
||||
(byte) nest::j#1 ← -- (byte) nest::j#2
|
||||
if((byte) nest::j#1>(byte) 0) goto nest::@1
|
||||
to:nest::@return
|
||||
nest::@return: scope:[nest] from nest::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte*) SCREEN#2 = SCREEN#0
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@3
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@3/(byte) main::i#1 )
|
||||
call nest param-assignment
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte) main::i#1 ← -- (byte) main::i#2
|
||||
if((byte) main::i#1>(byte) 0) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@3
|
||||
return
|
||||
to:@return
|
||||
nest: scope:[nest] from main::@1
|
||||
to:nest::@1
|
||||
nest::@1: scope:[nest] from nest nest::@1
|
||||
(byte*) SCREEN#1 ← phi( nest/(const byte*) SCREEN#2 )
|
||||
(byte) nest::j#2 ← phi( nest/(const byte) nest::j#0 nest::@1/(byte) nest::j#1 )
|
||||
*((byte*) SCREEN#1) ← (byte) nest::j#2
|
||||
(byte) nest::j#1 ← -- (byte) nest::j#2
|
||||
if((byte) nest::j#1>(byte) 0) goto nest::@1
|
||||
to:nest::@return
|
||||
nest::@return: scope:[nest] from nest::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte*) SCREEN#1 = SCREEN#2
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
@ -542,7 +511,7 @@ nest: scope:[nest] from main::@1
|
||||
to:nest::@1
|
||||
nest::@1: scope:[nest] from nest nest::@1
|
||||
(byte) nest::j#2 ← phi( nest/(const byte) nest::j#0 nest::@1/(byte) nest::j#1 )
|
||||
*((const byte*) SCREEN#1) ← (byte) nest::j#2
|
||||
*((const byte*) SCREEN#0) ← (byte) nest::j#2
|
||||
(byte) nest::j#1 ← -- (byte) nest::j#2
|
||||
if((byte) nest::j#1>(byte) 0) goto nest::@1
|
||||
to:nest::@return
|
||||
@ -551,8 +520,10 @@ nest::@return: scope:[nest] from nest::@1
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant inlined SCREEN#2 = (const byte*) SCREEN#0
|
||||
Constant inlined SCREEN#1 = (const byte*) SCREEN#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) nest::j#0
|
||||
Inlining constant with var siblings (const byte) nest::j#0
|
||||
Constant inlined main::i#0 = (byte) 100
|
||||
Constant inlined nest::j#0 = (byte) 100
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
|
@ -6,18 +6,18 @@ main: scope:[main] from @begin
|
||||
[1] phi() [ ]
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@3
|
||||
[2] (byte) main::i#2 ← phi( main/(byte) 100 main::@3/(byte) main::i#1 ) [ main::i#2 ]
|
||||
[2] (byte) main::i#5 ← phi( main/(byte) 100 main::@3/(byte) main::i#1 ) [ main::i#5 ]
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@5
|
||||
[3] (byte) main::j#2 ← phi( main::@1/(byte) 100 main::@5/(byte) main::j#1 ) [ main::i#2 main::j#2 ]
|
||||
[4] call nest1 param-assignment [ main::i#2 main::j#2 ]
|
||||
[3] (byte) main::j#2 ← phi( main::@1/(byte) 100 main::@5/(byte) main::j#1 ) [ main::i#5 main::j#2 ]
|
||||
[4] call nest1 param-assignment [ main::i#5 main::j#2 ]
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@2
|
||||
[5] (byte) main::j#1 ← -- (byte) main::j#2 [ main::i#2 main::j#1 ]
|
||||
[6] if((byte) main::j#1>(byte) 0) goto main::@2 [ main::i#2 main::j#1 ]
|
||||
[5] (byte) main::j#1 ← -- (byte) main::j#2 [ main::i#5 main::j#1 ]
|
||||
[6] if((byte) main::j#1>(byte) 0) goto main::@2 [ main::i#5 main::j#1 ]
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@5
|
||||
[7] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 ]
|
||||
[7] (byte) main::i#1 ← -- (byte) main::i#5 [ main::i#1 ]
|
||||
[8] if((byte) main::i#1>(byte) 0) goto main::@1 [ main::i#1 ]
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@3
|
||||
@ -27,18 +27,18 @@ nest1: scope:[nest1] from main::@2
|
||||
[10] phi() [ ]
|
||||
to:nest1::@1
|
||||
nest1::@1: scope:[nest1] from nest1 nest1::@3
|
||||
[11] (byte) nest1::i#2 ← phi( nest1/(byte) 100 nest1::@3/(byte) nest1::i#1 ) [ nest1::i#2 ]
|
||||
[11] (byte) nest1::i#5 ← phi( nest1/(byte) 100 nest1::@3/(byte) nest1::i#1 ) [ nest1::i#5 ]
|
||||
to:nest1::@2
|
||||
nest1::@2: scope:[nest1] from nest1::@1 nest1::@5
|
||||
[12] (byte) nest1::j#2 ← phi( nest1::@1/(byte) 100 nest1::@5/(byte) nest1::j#1 ) [ nest1::i#2 nest1::j#2 ]
|
||||
[13] call nest2 param-assignment [ nest1::i#2 nest1::j#2 ]
|
||||
[12] (byte) nest1::j#2 ← phi( nest1::@1/(byte) 100 nest1::@5/(byte) nest1::j#1 ) [ nest1::i#5 nest1::j#2 ]
|
||||
[13] call nest2 param-assignment [ nest1::i#5 nest1::j#2 ]
|
||||
to:nest1::@5
|
||||
nest1::@5: scope:[nest1] from nest1::@2
|
||||
[14] (byte) nest1::j#1 ← -- (byte) nest1::j#2 [ nest1::i#2 nest1::j#1 ]
|
||||
[15] if((byte) nest1::j#1>(byte) 0) goto nest1::@2 [ nest1::i#2 nest1::j#1 ]
|
||||
[14] (byte) nest1::j#1 ← -- (byte) nest1::j#2 [ nest1::i#5 nest1::j#1 ]
|
||||
[15] if((byte) nest1::j#1>(byte) 0) goto nest1::@2 [ nest1::i#5 nest1::j#1 ]
|
||||
to:nest1::@3
|
||||
nest1::@3: scope:[nest1] from nest1::@5
|
||||
[16] (byte) nest1::i#1 ← -- (byte) nest1::i#2 [ nest1::i#1 ]
|
||||
[16] (byte) nest1::i#1 ← -- (byte) nest1::i#5 [ nest1::i#1 ]
|
||||
[17] if((byte) nest1::i#1>(byte) 0) goto nest1::@1 [ nest1::i#1 ]
|
||||
to:nest1::@return
|
||||
nest1::@return: scope:[nest1] from nest1::@3
|
||||
@ -48,16 +48,16 @@ nest2: scope:[nest2] from nest1::@2
|
||||
[19] phi() [ ]
|
||||
to:nest2::@1
|
||||
nest2::@1: scope:[nest2] from nest2 nest2::@3
|
||||
[20] (byte) nest2::i#2 ← phi( nest2/(byte) 100 nest2::@3/(byte) nest2::i#1 ) [ nest2::i#2 ]
|
||||
[20] (byte) nest2::i#4 ← phi( nest2/(byte) 100 nest2::@3/(byte) nest2::i#1 ) [ nest2::i#4 ]
|
||||
to:nest2::@2
|
||||
nest2::@2: scope:[nest2] from nest2::@1 nest2::@2
|
||||
[21] (byte) nest2::j#2 ← phi( nest2::@1/(byte) 100 nest2::@2/(byte) nest2::j#1 ) [ nest2::i#2 nest2::j#2 ]
|
||||
[22] *((const byte*) SCREEN#0) ← (byte) nest2::j#2 [ nest2::i#2 nest2::j#2 ]
|
||||
[23] (byte) nest2::j#1 ← -- (byte) nest2::j#2 [ nest2::i#2 nest2::j#1 ]
|
||||
[24] if((byte) nest2::j#1>(byte) 0) goto nest2::@2 [ nest2::i#2 nest2::j#1 ]
|
||||
[21] (byte) nest2::j#2 ← phi( nest2::@1/(byte) 100 nest2::@2/(byte) nest2::j#1 ) [ nest2::i#4 nest2::j#2 ]
|
||||
[22] *((const byte*) SCREEN#0) ← (byte) nest2::j#2 [ nest2::i#4 nest2::j#2 ]
|
||||
[23] (byte) nest2::j#1 ← -- (byte) nest2::j#2 [ nest2::i#4 nest2::j#1 ]
|
||||
[24] if((byte) nest2::j#1>(byte) 0) goto nest2::@2 [ nest2::i#4 nest2::j#1 ]
|
||||
to:nest2::@3
|
||||
nest2::@3: scope:[nest2] from nest2::@2
|
||||
[25] (byte) nest2::i#1 ← -- (byte) nest2::i#2 [ nest2::i#1 ]
|
||||
[25] (byte) nest2::i#1 ← -- (byte) nest2::i#4 [ nest2::i#1 ]
|
||||
[26] if((byte) nest2::i#1>(byte) 0) goto nest2::@1 [ nest2::i#1 ]
|
||||
to:nest2::@return
|
||||
nest2::@return: scope:[nest2] from nest2::@3
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -10,7 +10,7 @@
|
||||
(label) main::@return
|
||||
(byte) main::i
|
||||
(byte) main::i#1 i zp ZP_BYTE:2 16.5
|
||||
(byte) main::i#2 i zp ZP_BYTE:2 4.4
|
||||
(byte) main::i#5 i zp ZP_BYTE:2 4.4
|
||||
(byte) main::j
|
||||
(byte) main::j#1 j zp ZP_BYTE:3 151.5
|
||||
(byte) main::j#2 j zp ZP_BYTE:3 101.0
|
||||
@ -22,7 +22,7 @@
|
||||
(label) nest1::@return
|
||||
(byte) nest1::i
|
||||
(byte) nest1::i#1 i zp ZP_BYTE:4 1501.5
|
||||
(byte) nest1::i#2 i zp ZP_BYTE:4 400.4
|
||||
(byte) nest1::i#5 i zp ZP_BYTE:4 400.4
|
||||
(byte) nest1::j
|
||||
(byte) nest1::j#1 reg byte a 15001.5
|
||||
(byte) nest1::j#2 reg byte a 10001.0
|
||||
@ -33,14 +33,14 @@
|
||||
(label) nest2::@return
|
||||
(byte) nest2::i
|
||||
(byte) nest2::i#1 reg byte x 150001.5
|
||||
(byte) nest2::i#2 reg byte x 40000.4
|
||||
(byte) nest2::i#4 reg byte x 40000.4
|
||||
(byte) nest2::j
|
||||
(byte) nest2::j#1 reg byte y 1500001.5
|
||||
(byte) nest2::j#2 reg byte y 1500001.5
|
||||
|
||||
zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
|
||||
zp ZP_BYTE:2 [ main::i#5 main::i#1 ]
|
||||
zp ZP_BYTE:3 [ main::j#2 main::j#1 ]
|
||||
zp ZP_BYTE:4 [ nest1::i#2 nest1::i#1 ]
|
||||
zp ZP_BYTE:4 [ nest1::i#5 nest1::i#1 ]
|
||||
reg byte a [ nest1::j#2 nest1::j#1 ]
|
||||
reg byte x [ nest2::i#2 nest2::i#1 ]
|
||||
reg byte x [ nest2::i#4 nest2::i#1 ]
|
||||
reg byte y [ nest2::j#2 nest2::j#1 ]
|
||||
|
@ -447,6 +447,11 @@ main::@return: scope:[main] from main::@1
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::s#0
|
||||
Inlining constant with var siblings (const byte) main::s#0
|
||||
Inlining constant with var siblings (const byte) main::s#0
|
||||
Constant inlined main::s#0 = (byte) 0
|
||||
Constant inlined main::i#0 = (byte) 100
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
|
@ -608,6 +608,13 @@ Not aliassing across scopes: inccnt::return#0 cnt#1
|
||||
Not aliassing across scopes: main::$0 inccnt::return#0
|
||||
Not aliassing across scopes: main::$1 inccnt::return#0
|
||||
Not aliassing across scopes: inccnt::return#0 cnt#1
|
||||
Inlining constant with var siblings (const byte) cnt#0
|
||||
Inlining constant with var siblings (const byte) cnt#0
|
||||
Inlining constant with var siblings (const byte) cnt#0
|
||||
Inlining constant with var siblings (const byte) cnt2#0
|
||||
Inlining constant with var siblings (const byte) cnt2#0
|
||||
Inlining constant with var siblings (const byte) cnt3#0
|
||||
Inlining constant with var siblings (const byte) cnt3#0
|
||||
Constant inlined cnt#0 = (byte) 0
|
||||
Constant inlined cnt3#0 = (byte) 0
|
||||
Constant inlined cnt2#0 = (byte) 0
|
||||
|
@ -407,6 +407,10 @@ inccnt::@return: scope:[inccnt] from inccnt
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Inlining constant with var siblings (const byte) cnt#0
|
||||
Inlining constant with var siblings (const byte) cnt#0
|
||||
Inlining constant with var siblings (const byte) cnt#0
|
||||
Inlining constant with var siblings (const byte) cnt#0
|
||||
Constant inlined cnt#0 = (byte) 0
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
CONTROL FLOW GRAPH
|
||||
|
@ -1181,6 +1181,104 @@ rvaluevar::@return: scope:[rvaluevar] from rvaluevar::@1
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Redundant Phi (byte[1024]) lvalue::SCREEN#1 (byte[1024]) lvalue::SCREEN#0
|
||||
Redundant Phi (byte[1024]) rvalue::SCREEN#1 (byte[1024]) rvalue::SCREEN#0
|
||||
Redundant Phi (byte) lvaluevar::b#1 (byte) lvaluevar::b#0
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
call lvalue param-assignment
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
call rvalue param-assignment
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
call rvaluevar param-assignment
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2
|
||||
call lvaluevar param-assignment
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@3
|
||||
return
|
||||
to:@return
|
||||
lvalue: scope:[lvalue] from main
|
||||
(byte[1024]) lvalue::SCREEN#0 ← (word) 1024
|
||||
*((byte[1024]) lvalue::SCREEN#0) ← (byte) 1
|
||||
*((byte[1024]) lvalue::SCREEN#0 + (byte) 1) ← (byte) 2
|
||||
(byte) lvalue::i#0 ← (byte) 2
|
||||
to:lvalue::@1
|
||||
lvalue::@1: scope:[lvalue] from lvalue lvalue::@2
|
||||
(byte) lvalue::i#2 ← phi( lvalue/(byte) lvalue::i#0 lvalue::@2/(byte) lvalue::i#1 )
|
||||
(boolean~) lvalue::$0 ← (byte) lvalue::i#2 < (byte) 10
|
||||
if((boolean~) lvalue::$0) goto lvalue::@2
|
||||
to:lvalue::@return
|
||||
lvalue::@2: scope:[lvalue] from lvalue::@1
|
||||
*((byte[1024]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3
|
||||
(byte) lvalue::i#1 ← ++ (byte) lvalue::i#2
|
||||
to:lvalue::@1
|
||||
lvalue::@return: scope:[lvalue] from lvalue::@1
|
||||
return
|
||||
to:@return
|
||||
rvalue: scope:[rvalue] from main::@1
|
||||
(byte[1024]) rvalue::SCREEN#0 ← (word) 1024
|
||||
(byte) rvalue::b#0 ← * (byte[1024]) rvalue::SCREEN#0
|
||||
(byte) rvalue::b#1 ← (byte[1024]) rvalue::SCREEN#0 *idx (byte) 1
|
||||
(byte) rvalue::i#0 ← (byte) 2
|
||||
to:rvalue::@1
|
||||
rvalue::@1: scope:[rvalue] from rvalue rvalue::@2
|
||||
(byte) rvalue::i#2 ← phi( rvalue/(byte) rvalue::i#0 rvalue::@2/(byte) rvalue::i#1 )
|
||||
(boolean~) rvalue::$2 ← (byte) rvalue::i#2 < (byte) 10
|
||||
if((boolean~) rvalue::$2) goto rvalue::@2
|
||||
to:rvalue::@return
|
||||
rvalue::@2: scope:[rvalue] from rvalue::@1
|
||||
(byte) rvalue::b#2 ← (byte[1024]) rvalue::SCREEN#0 *idx (byte) rvalue::i#2
|
||||
(byte) rvalue::i#1 ← ++ (byte) rvalue::i#2
|
||||
to:rvalue::@1
|
||||
rvalue::@return: scope:[rvalue] from rvalue::@1
|
||||
return
|
||||
to:@return
|
||||
lvaluevar: scope:[lvaluevar] from main::@3
|
||||
(byte*) lvaluevar::screen#0 ← (word) 1024
|
||||
(byte) lvaluevar::b#0 ← (byte) 4
|
||||
(byte) lvaluevar::i#0 ← (byte) 2
|
||||
to:lvaluevar::@1
|
||||
lvaluevar::@1: scope:[lvaluevar] from lvaluevar lvaluevar::@2
|
||||
(byte*) lvaluevar::screen#2 ← phi( lvaluevar/(byte*) lvaluevar::screen#0 lvaluevar::@2/(byte*) lvaluevar::screen#1 )
|
||||
(byte) lvaluevar::i#2 ← phi( lvaluevar/(byte) lvaluevar::i#0 lvaluevar::@2/(byte) lvaluevar::i#1 )
|
||||
(boolean~) lvaluevar::$0 ← (byte) lvaluevar::i#2 < (byte) 10
|
||||
if((boolean~) lvaluevar::$0) goto lvaluevar::@2
|
||||
to:lvaluevar::@return
|
||||
lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1
|
||||
*((byte*) lvaluevar::screen#2) ← (byte) lvaluevar::b#0
|
||||
(byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2
|
||||
(byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2
|
||||
to:lvaluevar::@1
|
||||
lvaluevar::@return: scope:[lvaluevar] from lvaluevar::@1
|
||||
return
|
||||
to:@return
|
||||
rvaluevar: scope:[rvaluevar] from main::@2
|
||||
(byte*) rvaluevar::screen#0 ← (word) 1024
|
||||
(byte) rvaluevar::i#0 ← (byte) 2
|
||||
to:rvaluevar::@1
|
||||
rvaluevar::@1: scope:[rvaluevar] from rvaluevar rvaluevar::@2
|
||||
(byte*) rvaluevar::screen#2 ← phi( rvaluevar/(byte*) rvaluevar::screen#0 rvaluevar::@2/(byte*) rvaluevar::screen#1 )
|
||||
(byte) rvaluevar::i#2 ← phi( rvaluevar/(byte) rvaluevar::i#0 rvaluevar::@2/(byte) rvaluevar::i#1 )
|
||||
(boolean~) rvaluevar::$0 ← (byte) rvaluevar::i#2 < (byte) 10
|
||||
if((boolean~) rvaluevar::$0) goto rvaluevar::@2
|
||||
to:rvaluevar::@return
|
||||
rvaluevar::@2: scope:[rvaluevar] from rvaluevar::@1
|
||||
(byte) rvaluevar::b#0 ← * (byte*) rvaluevar::screen#2
|
||||
(byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2
|
||||
(byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2
|
||||
to:rvaluevar::@1
|
||||
rvaluevar::@return: scope:[rvaluevar] from rvaluevar::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Simple Condition (boolean~) lvalue::$0 if((byte) lvalue::i#2<(byte) 10) goto lvalue::@2
|
||||
Simple Condition (boolean~) rvalue::$2 if((byte) rvalue::i#2<(byte) 10) goto rvalue::@2
|
||||
Simple Condition (boolean~) lvaluevar::$0 if((byte) lvaluevar::i#2<(byte) 10) goto lvaluevar::@2
|
||||
@ -1212,12 +1310,11 @@ lvalue: scope:[lvalue] from main
|
||||
(byte) lvalue::i#0 ← (byte) 2
|
||||
to:lvalue::@1
|
||||
lvalue::@1: scope:[lvalue] from lvalue lvalue::@2
|
||||
(byte[1024]) lvalue::SCREEN#1 ← phi( lvalue/(byte[1024]) lvalue::SCREEN#0 )
|
||||
(byte) lvalue::i#2 ← phi( lvalue/(byte) lvalue::i#0 lvalue::@2/(byte) lvalue::i#1 )
|
||||
if((byte) lvalue::i#2<(byte) 10) goto lvalue::@2
|
||||
to:lvalue::@return
|
||||
lvalue::@2: scope:[lvalue] from lvalue::@1
|
||||
*((byte[1024]) lvalue::SCREEN#1 + (byte) lvalue::i#2) ← (byte) 3
|
||||
*((byte[1024]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3
|
||||
(byte) lvalue::i#1 ← ++ (byte) lvalue::i#2
|
||||
to:lvalue::@1
|
||||
lvalue::@return: scope:[lvalue] from lvalue::@1
|
||||
@ -1230,12 +1327,11 @@ rvalue: scope:[rvalue] from main::@1
|
||||
(byte) rvalue::i#0 ← (byte) 2
|
||||
to:rvalue::@1
|
||||
rvalue::@1: scope:[rvalue] from rvalue rvalue::@2
|
||||
(byte[1024]) rvalue::SCREEN#1 ← phi( rvalue/(byte[1024]) rvalue::SCREEN#0 )
|
||||
(byte) rvalue::i#2 ← phi( rvalue/(byte) rvalue::i#0 rvalue::@2/(byte) rvalue::i#1 )
|
||||
if((byte) rvalue::i#2<(byte) 10) goto rvalue::@2
|
||||
to:rvalue::@return
|
||||
rvalue::@2: scope:[rvalue] from rvalue::@1
|
||||
(byte) rvalue::b#2 ← (byte[1024]) rvalue::SCREEN#1 *idx (byte) rvalue::i#2
|
||||
(byte) rvalue::b#2 ← (byte[1024]) rvalue::SCREEN#0 *idx (byte) rvalue::i#2
|
||||
(byte) rvalue::i#1 ← ++ (byte) rvalue::i#2
|
||||
to:rvalue::@1
|
||||
rvalue::@return: scope:[rvalue] from rvalue::@1
|
||||
@ -1248,12 +1344,11 @@ lvaluevar: scope:[lvaluevar] from main::@3
|
||||
to:lvaluevar::@1
|
||||
lvaluevar::@1: scope:[lvaluevar] from lvaluevar lvaluevar::@2
|
||||
(byte*) lvaluevar::screen#2 ← phi( lvaluevar/(byte*) lvaluevar::screen#0 lvaluevar::@2/(byte*) lvaluevar::screen#1 )
|
||||
(byte) lvaluevar::b#1 ← phi( lvaluevar/(byte) lvaluevar::b#0 )
|
||||
(byte) lvaluevar::i#2 ← phi( lvaluevar/(byte) lvaluevar::i#0 lvaluevar::@2/(byte) lvaluevar::i#1 )
|
||||
if((byte) lvaluevar::i#2<(byte) 10) goto lvaluevar::@2
|
||||
to:lvaluevar::@return
|
||||
lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1
|
||||
*((byte*) lvaluevar::screen#2) ← (byte) lvaluevar::b#1
|
||||
*((byte*) lvaluevar::screen#2) ← (byte) lvaluevar::b#0
|
||||
(byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2
|
||||
(byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2
|
||||
to:lvaluevar::@1
|
||||
@ -1313,99 +1408,11 @@ lvalue: scope:[lvalue] from main
|
||||
*((const byte[1024]) lvalue::SCREEN#0 + (byte) 1) ← (byte) 2
|
||||
to:lvalue::@1
|
||||
lvalue::@1: scope:[lvalue] from lvalue lvalue::@2
|
||||
(byte[1024]) lvalue::SCREEN#1 ← phi( lvalue/(const byte[1024]) lvalue::SCREEN#0 )
|
||||
(byte) lvalue::i#2 ← phi( lvalue/(const byte) lvalue::i#0 lvalue::@2/(byte) lvalue::i#1 )
|
||||
if((byte) lvalue::i#2<(byte) 10) goto lvalue::@2
|
||||
to:lvalue::@return
|
||||
lvalue::@2: scope:[lvalue] from lvalue::@1
|
||||
*((byte[1024]) lvalue::SCREEN#1 + (byte) lvalue::i#2) ← (byte) 3
|
||||
(byte) lvalue::i#1 ← ++ (byte) lvalue::i#2
|
||||
to:lvalue::@1
|
||||
lvalue::@return: scope:[lvalue] from lvalue::@1
|
||||
return
|
||||
to:@return
|
||||
rvalue: scope:[rvalue] from main::@1
|
||||
(byte) rvalue::b#0 ← * (const byte[1024]) rvalue::SCREEN#0
|
||||
(byte) rvalue::b#1 ← (const byte[1024]) rvalue::SCREEN#0 *idx (byte) 1
|
||||
to:rvalue::@1
|
||||
rvalue::@1: scope:[rvalue] from rvalue rvalue::@2
|
||||
(byte[1024]) rvalue::SCREEN#1 ← phi( rvalue/(const byte[1024]) rvalue::SCREEN#0 )
|
||||
(byte) rvalue::i#2 ← phi( rvalue/(const byte) rvalue::i#0 rvalue::@2/(byte) rvalue::i#1 )
|
||||
if((byte) rvalue::i#2<(byte) 10) goto rvalue::@2
|
||||
to:rvalue::@return
|
||||
rvalue::@2: scope:[rvalue] from rvalue::@1
|
||||
(byte) rvalue::b#2 ← (byte[1024]) rvalue::SCREEN#1 *idx (byte) rvalue::i#2
|
||||
(byte) rvalue::i#1 ← ++ (byte) rvalue::i#2
|
||||
to:rvalue::@1
|
||||
rvalue::@return: scope:[rvalue] from rvalue::@1
|
||||
return
|
||||
to:@return
|
||||
lvaluevar: scope:[lvaluevar] from main::@3
|
||||
to:lvaluevar::@1
|
||||
lvaluevar::@1: scope:[lvaluevar] from lvaluevar lvaluevar::@2
|
||||
(byte*) lvaluevar::screen#2 ← phi( lvaluevar/(const byte*) lvaluevar::screen#0 lvaluevar::@2/(byte*) lvaluevar::screen#1 )
|
||||
(byte) lvaluevar::b#1 ← phi( lvaluevar/(const byte) lvaluevar::b#0 )
|
||||
(byte) lvaluevar::i#2 ← phi( lvaluevar/(const byte) lvaluevar::i#0 lvaluevar::@2/(byte) lvaluevar::i#1 )
|
||||
if((byte) lvaluevar::i#2<(byte) 10) goto lvaluevar::@2
|
||||
to:lvaluevar::@return
|
||||
lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1
|
||||
*((byte*) lvaluevar::screen#2) ← (byte) lvaluevar::b#1
|
||||
(byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2
|
||||
(byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2
|
||||
to:lvaluevar::@1
|
||||
lvaluevar::@return: scope:[lvaluevar] from lvaluevar::@1
|
||||
return
|
||||
to:@return
|
||||
rvaluevar: scope:[rvaluevar] from main::@2
|
||||
to:rvaluevar::@1
|
||||
rvaluevar::@1: scope:[rvaluevar] from rvaluevar rvaluevar::@2
|
||||
(byte*) rvaluevar::screen#2 ← phi( rvaluevar/(const byte*) rvaluevar::screen#0 rvaluevar::@2/(byte*) rvaluevar::screen#1 )
|
||||
(byte) rvaluevar::i#2 ← phi( rvaluevar/(const byte) rvaluevar::i#0 rvaluevar::@2/(byte) rvaluevar::i#1 )
|
||||
if((byte) rvaluevar::i#2<(byte) 10) goto rvaluevar::@2
|
||||
to:rvaluevar::@return
|
||||
rvaluevar::@2: scope:[rvaluevar] from rvaluevar::@1
|
||||
(byte) rvaluevar::b#0 ← * (byte*) rvaluevar::screen#2
|
||||
(byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2
|
||||
(byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2
|
||||
to:rvaluevar::@1
|
||||
rvaluevar::@return: scope:[rvaluevar] from rvaluevar::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte[1024]) lvalue::SCREEN#1 = lvalue::SCREEN#0
|
||||
Constant (const byte[1024]) rvalue::SCREEN#1 = rvalue::SCREEN#0
|
||||
Constant (const byte) lvaluevar::b#1 = lvaluevar::b#0
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
call lvalue param-assignment
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
call rvalue param-assignment
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
call rvaluevar param-assignment
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2
|
||||
call lvaluevar param-assignment
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@3
|
||||
return
|
||||
to:@return
|
||||
lvalue: scope:[lvalue] from main
|
||||
*((const byte[1024]) lvalue::SCREEN#0) ← (byte) 1
|
||||
*((const byte[1024]) lvalue::SCREEN#0 + (byte) 1) ← (byte) 2
|
||||
to:lvalue::@1
|
||||
lvalue::@1: scope:[lvalue] from lvalue lvalue::@2
|
||||
(byte) lvalue::i#2 ← phi( lvalue/(const byte) lvalue::i#0 lvalue::@2/(byte) lvalue::i#1 )
|
||||
if((byte) lvalue::i#2<(byte) 10) goto lvalue::@2
|
||||
to:lvalue::@return
|
||||
lvalue::@2: scope:[lvalue] from lvalue::@1
|
||||
*((const byte[1024]) lvalue::SCREEN#1 + (byte) lvalue::i#2) ← (byte) 3
|
||||
*((const byte[1024]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3
|
||||
(byte) lvalue::i#1 ← ++ (byte) lvalue::i#2
|
||||
to:lvalue::@1
|
||||
lvalue::@return: scope:[lvalue] from lvalue::@1
|
||||
@ -1420,7 +1427,7 @@ rvalue::@1: scope:[rvalue] from rvalue rvalue::@2
|
||||
if((byte) rvalue::i#2<(byte) 10) goto rvalue::@2
|
||||
to:rvalue::@return
|
||||
rvalue::@2: scope:[rvalue] from rvalue::@1
|
||||
(byte) rvalue::b#2 ← (const byte[1024]) rvalue::SCREEN#1 *idx (byte) rvalue::i#2
|
||||
(byte) rvalue::b#2 ← (const byte[1024]) rvalue::SCREEN#0 *idx (byte) rvalue::i#2
|
||||
(byte) rvalue::i#1 ← ++ (byte) rvalue::i#2
|
||||
to:rvalue::@1
|
||||
rvalue::@return: scope:[rvalue] from rvalue::@1
|
||||
@ -1434,7 +1441,7 @@ lvaluevar::@1: scope:[lvaluevar] from lvaluevar lvaluevar::@2
|
||||
if((byte) lvaluevar::i#2<(byte) 10) goto lvaluevar::@2
|
||||
to:lvaluevar::@return
|
||||
lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1
|
||||
*((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#1
|
||||
*((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0
|
||||
(byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2
|
||||
(byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2
|
||||
to:lvaluevar::@1
|
||||
@ -1490,7 +1497,7 @@ lvalue::@1: scope:[lvalue] from lvalue lvalue::@2
|
||||
if((byte) lvalue::i#2<(byte) 10) goto lvalue::@2
|
||||
to:lvalue::@return
|
||||
lvalue::@2: scope:[lvalue] from lvalue::@1
|
||||
*((const byte[1024]) lvalue::SCREEN#1 + (byte) lvalue::i#2) ← (byte) 3
|
||||
*((const byte[1024]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3
|
||||
(byte) lvalue::i#1 ← ++ (byte) lvalue::i#2
|
||||
to:lvalue::@1
|
||||
lvalue::@return: scope:[lvalue] from lvalue::@1
|
||||
@ -1505,7 +1512,7 @@ rvalue::@1: scope:[rvalue] from rvalue rvalue::@2
|
||||
if((byte) rvalue::i#2<(byte) 10) goto rvalue::@2
|
||||
to:rvalue::@return
|
||||
rvalue::@2: scope:[rvalue] from rvalue::@1
|
||||
(byte) rvalue::b#2 ← (const byte[1024]) rvalue::SCREEN#1 *idx (byte) rvalue::i#2
|
||||
(byte) rvalue::b#2 ← (const byte[1024]) rvalue::SCREEN#0 *idx (byte) rvalue::i#2
|
||||
(byte) rvalue::i#1 ← ++ (byte) rvalue::i#2
|
||||
to:rvalue::@1
|
||||
rvalue::@return: scope:[rvalue] from rvalue::@1
|
||||
@ -1519,7 +1526,7 @@ lvaluevar::@1: scope:[lvaluevar] from lvaluevar lvaluevar::@2
|
||||
if((byte) lvaluevar::i#2<(byte) 10) goto lvaluevar::@2
|
||||
to:lvaluevar::@return
|
||||
lvaluevar::@2: scope:[lvaluevar] from lvaluevar::@1
|
||||
*((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#1
|
||||
*((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0
|
||||
(byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2
|
||||
(byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2
|
||||
to:lvaluevar::@1
|
||||
@ -1545,15 +1552,24 @@ rvaluevar::@return: scope:[rvaluevar] from rvaluevar::@1
|
||||
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) rvalue::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) rvalue::i#2
|
||||
Constant inlined lvaluevar::b#1 = (const byte) lvaluevar::b#0
|
||||
Constant inlined rvalue::SCREEN#1 = (const byte[1024]) rvalue::SCREEN#0
|
||||
Inlining constant with var siblings (const byte) lvalue::i#0
|
||||
Inlining constant with var siblings (const byte) lvalue::i#0
|
||||
Inlining constant with var siblings (const byte) rvalue::i#0
|
||||
Inlining constant with var siblings (const byte) rvalue::i#0
|
||||
Inlining constant with var siblings (const byte*) lvaluevar::screen#0
|
||||
Inlining constant with var siblings (const byte*) lvaluevar::screen#0
|
||||
Inlining constant with var siblings (const byte) lvaluevar::i#0
|
||||
Inlining constant with var siblings (const byte) lvaluevar::i#0
|
||||
Inlining constant with var siblings (const byte*) rvaluevar::screen#0
|
||||
Inlining constant with var siblings (const byte*) rvaluevar::screen#0
|
||||
Inlining constant with var siblings (const byte) rvaluevar::i#0
|
||||
Inlining constant with var siblings (const byte) rvaluevar::i#0
|
||||
Constant inlined lvalue::i#0 = (byte) 2
|
||||
Constant inlined lvaluevar::screen#0 = (word) 1024
|
||||
Constant inlined rvaluevar::screen#0 = (word) 1024
|
||||
Constant inlined rvaluevar::i#0 = (byte) 2
|
||||
Constant inlined lvaluevar::i#0 = (byte) 2
|
||||
Constant inlined rvalue::i#0 = (byte) 2
|
||||
Constant inlined lvalue::SCREEN#1 = (const byte[1024]) lvalue::SCREEN#0
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
|
@ -295,6 +295,30 @@ main::@return: scope:[main] from main::@1
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Redundant Phi (byte[1024]) main::SCREEN#1 (byte[1024]) main::SCREEN#0
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
(byte[1024]) main::SCREEN#0 ← (word) 1024
|
||||
(byte) main::i#0 ← (byte) 2
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(boolean~) main::$0 ← (byte) main::i#2 < (byte) 10
|
||||
if((boolean~) main::$0) goto main::@2
|
||||
to:main::@return
|
||||
main::@2: scope:[main] from main::@1
|
||||
(byte) main::b#0 ← (byte[1024]) main::SCREEN#0 *idx (byte) main::i#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
to:main::@1
|
||||
main::@return: scope:[main] from main::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Simple Condition (boolean~) main::$0 if((byte) main::i#2<(byte) 10) goto main::@2
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
CONTROL FLOW GRAPH
|
||||
@ -306,12 +330,11 @@ main: scope:[main] from @begin
|
||||
(byte) main::i#0 ← (byte) 2
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte[1024]) main::SCREEN#1 ← phi( main/(byte[1024]) main::SCREEN#0 )
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
if((byte) main::i#2<(byte) 10) goto main::@2
|
||||
to:main::@return
|
||||
main::@2: scope:[main] from main::@1
|
||||
(byte) main::b#0 ← (byte[1024]) main::SCREEN#1 *idx (byte) main::i#2
|
||||
(byte) main::b#0 ← (byte[1024]) main::SCREEN#0 *idx (byte) main::i#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
to:main::@1
|
||||
main::@return: scope:[main] from main::@1
|
||||
@ -329,33 +352,11 @@ CONTROL FLOW GRAPH
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte[1024]) main::SCREEN#1 ← phi( main/(const byte[1024]) main::SCREEN#0 )
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
if((byte) main::i#2<(byte) 10) goto main::@2
|
||||
to:main::@return
|
||||
main::@2: scope:[main] from main::@1
|
||||
(byte) main::b#0 ← (byte[1024]) main::SCREEN#1 *idx (byte) main::i#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
to:main::@1
|
||||
main::@return: scope:[main] from main::@1
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte[1024]) main::SCREEN#1 = main::SCREEN#0
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
if((byte) main::i#2<(byte) 10) goto main::@2
|
||||
to:main::@return
|
||||
main::@2: scope:[main] from main::@1
|
||||
(byte) main::b#0 ← (const byte[1024]) main::SCREEN#1 *idx (byte) main::i#2
|
||||
(byte) main::b#0 ← (const byte[1024]) main::SCREEN#0 *idx (byte) main::i#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
to:main::@1
|
||||
main::@return: scope:[main] from main::@1
|
||||
@ -365,7 +366,8 @@ main::@return: scope:[main] from main::@1
|
||||
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Constant inlined main::SCREEN#1 = (const byte[1024]) main::SCREEN#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Constant inlined main::i#0 = (byte) 2
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
CONTROL FLOW GRAPH
|
||||
|
@ -6,18 +6,18 @@ main: scope:[main] from @begin
|
||||
[1] phi() [ ]
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
[2] (byte) main::i#3 ← phi( main/(byte) 0 main::@2/(byte) main::i#1 ) [ main::nxt#3 main::i#3 ]
|
||||
[2] (byte*) main::nxt#3 ← phi( main/(const byte[]) TEXT#0 main::@2/(byte*) main::nxt#1 ) [ main::nxt#3 main::i#3 ]
|
||||
[3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#3 main::c#0 ]
|
||||
[4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#3 main::c#0 ]
|
||||
[2] (byte) main::i#2 ← phi( main/(byte) 0 main::@2/(byte) main::i#1 ) [ main::nxt#3 main::i#2 ]
|
||||
[2] (byte*) main::nxt#3 ← phi( main/(const byte[]) TEXT#0 main::@2/(byte*) main::nxt#1 ) [ main::nxt#3 main::i#2 ]
|
||||
[3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#2 main::c#0 ]
|
||||
[4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#2 main::c#0 ]
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
[5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#3 main::c#1 ]
|
||||
[5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#2 main::c#1 ]
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
[6] (byte*) main::nxt#4 ← phi( main::@1/(byte*) main::nxt#3 main::@3/(const byte[]) TEXT#0 ) [ main::i#3 main::c#2 main::nxt#4 ]
|
||||
[6] (byte) main::c#2 ← phi( main::@1/(byte) main::c#0 main::@3/(byte) main::c#1 ) [ main::i#3 main::c#2 main::nxt#4 ]
|
||||
[7] (byte) main::i#1 ← ++ (byte) main::i#3 [ main::i#1 main::c#2 main::nxt#4 ]
|
||||
[6] (byte*) main::nxt#4 ← phi( main::@1/(byte*) main::nxt#3 main::@3/(const byte[]) TEXT#0 ) [ main::i#2 main::c#2 main::nxt#4 ]
|
||||
[6] (byte) main::c#2 ← phi( main::@1/(byte) main::c#0 main::@3/(byte) main::c#1 ) [ main::i#2 main::c#2 main::nxt#4 ]
|
||||
[7] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 main::c#2 main::nxt#4 ]
|
||||
[8] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::c#2 [ main::i#1 main::nxt#4 ]
|
||||
[9] (byte*) main::nxt#1 ← ++ (byte*) main::nxt#4 [ main::nxt#1 main::i#1 ]
|
||||
[10] if(true) goto main::@1 [ main::nxt#1 main::i#1 ]
|
||||
|
@ -472,10 +472,10 @@ main::@return: scope:[main] from main::@2
|
||||
|
||||
Not aliassing across scopes: main::nxt#0 TEXT#0
|
||||
Not aliassing across scopes: main::nxt#2 TEXT#2
|
||||
Redundant Phi (byte) main::i#2 (byte) main::i#3
|
||||
Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#2
|
||||
Redundant Phi (byte[]) TEXT#4 (byte[]) TEXT#2
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
Alias (byte) main::i#2 = (byte) main::i#3
|
||||
Alias (byte*) SCREEN#1 = (byte*) SCREEN#2
|
||||
Alias (byte[]) TEXT#2 = (byte[]) TEXT#4
|
||||
Succesful SSA optimization Pass2AliasElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN#0 ← (word) 1024
|
||||
@ -489,8 +489,8 @@ main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte[]) TEXT#2 ← phi( main/(byte[]) TEXT#0 main::@2/(byte[]) TEXT#2 )
|
||||
(byte*) SCREEN#2 ← phi( main/(byte*) SCREEN#0 main::@2/(byte*) SCREEN#2 )
|
||||
(byte) main::i#3 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte*) SCREEN#1 ← phi( main/(byte*) SCREEN#0 main::@2/(byte*) SCREEN#1 )
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte*) main::nxt#3 ← phi( main/(byte*) main::nxt#0 main::@2/(byte*) main::nxt#1 )
|
||||
(byte) main::c#0 ← * (byte*) main::nxt#3
|
||||
(boolean~) main::$2 ← (byte) main::c#0 != (byte) '@'
|
||||
@ -499,8 +499,8 @@ main::@1: scope:[main] from main main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte*) main::nxt#4 ← phi( main::@1/(byte*) main::nxt#3 main::@3/(byte*) main::nxt#2 )
|
||||
(byte) main::c#2 ← phi( main::@1/(byte) main::c#0 main::@3/(byte) main::c#1 )
|
||||
(byte) main::i#1 ← ++ (byte) main::i#3
|
||||
*((byte*) SCREEN#2 + (byte) main::i#1) ← (byte) main::c#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
*((byte*) SCREEN#1 + (byte) main::i#1) ← (byte) main::c#2
|
||||
(byte*) main::nxt#1 ← ++ (byte*) main::nxt#4
|
||||
if(true) goto main::@1
|
||||
to:main::@return
|
||||
@ -513,7 +513,9 @@ main::@return: scope:[main] from main::@2
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Self Phi Eliminated (byte*) SCREEN#2
|
||||
Not aliassing across scopes: main::nxt#0 TEXT#0
|
||||
Not aliassing across scopes: main::nxt#2 TEXT#2
|
||||
Self Phi Eliminated (byte*) SCREEN#1
|
||||
Self Phi Eliminated (byte[]) TEXT#2
|
||||
Succesful SSA optimization Pass2SelfPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@ -529,8 +531,8 @@ main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte[]) TEXT#2 ← phi( main/(byte[]) TEXT#0 )
|
||||
(byte*) SCREEN#2 ← phi( main/(byte*) SCREEN#0 )
|
||||
(byte) main::i#3 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte*) SCREEN#1 ← phi( main/(byte*) SCREEN#0 )
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte*) main::nxt#3 ← phi( main/(byte*) main::nxt#0 main::@2/(byte*) main::nxt#1 )
|
||||
(byte) main::c#0 ← * (byte*) main::nxt#3
|
||||
(boolean~) main::$2 ← (byte) main::c#0 != (byte) '@'
|
||||
@ -539,8 +541,8 @@ main::@1: scope:[main] from main main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte*) main::nxt#4 ← phi( main::@1/(byte*) main::nxt#3 main::@3/(byte*) main::nxt#2 )
|
||||
(byte) main::c#2 ← phi( main::@1/(byte) main::c#0 main::@3/(byte) main::c#1 )
|
||||
(byte) main::i#1 ← ++ (byte) main::i#3
|
||||
*((byte*) SCREEN#2 + (byte) main::i#1) ← (byte) main::c#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
*((byte*) SCREEN#1 + (byte) main::i#1) ← (byte) main::c#2
|
||||
(byte*) main::nxt#1 ← ++ (byte*) main::nxt#4
|
||||
if(true) goto main::@1
|
||||
to:main::@return
|
||||
@ -553,6 +555,44 @@ main::@return: scope:[main] from main::@2
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#0
|
||||
Redundant Phi (byte[]) TEXT#2 (byte[]) TEXT#0
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN#0 ← (word) 1024
|
||||
(byte*) SCROLL#0 ← (word) 53270
|
||||
(byte[]) TEXT#0 ← (string) "01234567@"
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
(byte*) main::nxt#0 ← (byte[]) TEXT#0
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte*) main::nxt#3 ← phi( main/(byte*) main::nxt#0 main::@2/(byte*) main::nxt#1 )
|
||||
(byte) main::c#0 ← * (byte*) main::nxt#3
|
||||
(boolean~) main::$2 ← (byte) main::c#0 != (byte) '@'
|
||||
if((boolean~) main::$2) goto main::@2
|
||||
to:main::@3
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte*) main::nxt#4 ← phi( main::@1/(byte*) main::nxt#3 main::@3/(byte*) main::nxt#2 )
|
||||
(byte) main::c#2 ← phi( main::@1/(byte) main::c#0 main::@3/(byte) main::c#1 )
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
*((byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::c#2
|
||||
(byte*) main::nxt#1 ← ++ (byte*) main::nxt#4
|
||||
if(true) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte*) main::nxt#2 ← (byte[]) TEXT#0
|
||||
(byte) main::c#1 ← * (byte*) main::nxt#2
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Simple Condition (boolean~) main::$2 if((byte) main::c#0!=(byte) '@') goto main::@2
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
CONTROL FLOW GRAPH
|
||||
@ -567,9 +607,7 @@ main: scope:[main] from @begin
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte[]) TEXT#2 ← phi( main/(byte[]) TEXT#0 )
|
||||
(byte*) SCREEN#2 ← phi( main/(byte*) SCREEN#0 )
|
||||
(byte) main::i#3 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte*) main::nxt#3 ← phi( main/(byte*) main::nxt#0 main::@2/(byte*) main::nxt#1 )
|
||||
(byte) main::c#0 ← * (byte*) main::nxt#3
|
||||
if((byte) main::c#0!=(byte) '@') goto main::@2
|
||||
@ -577,13 +615,13 @@ main::@1: scope:[main] from main main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte*) main::nxt#4 ← phi( main::@1/(byte*) main::nxt#3 main::@3/(byte*) main::nxt#2 )
|
||||
(byte) main::c#2 ← phi( main::@1/(byte) main::c#0 main::@3/(byte) main::c#1 )
|
||||
(byte) main::i#1 ← ++ (byte) main::i#3
|
||||
*((byte*) SCREEN#2 + (byte) main::i#1) ← (byte) main::c#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
*((byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::c#2
|
||||
(byte*) main::nxt#1 ← ++ (byte*) main::nxt#4
|
||||
if(true) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte*) main::nxt#2 ← (byte[]) TEXT#2
|
||||
(byte*) main::nxt#2 ← (byte[]) TEXT#0
|
||||
(byte) main::c#1 ← * (byte*) main::nxt#2
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
@ -604,9 +642,7 @@ main: scope:[main] from @begin
|
||||
(byte*) main::nxt#0 ← (const byte[]) TEXT#0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte[]) TEXT#2 ← phi( main/(const byte[]) TEXT#0 )
|
||||
(byte*) SCREEN#2 ← phi( main/(const byte*) SCREEN#0 )
|
||||
(byte) main::i#3 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte*) main::nxt#3 ← phi( main/(byte*) main::nxt#0 main::@2/(byte*) main::nxt#1 )
|
||||
(byte) main::c#0 ← * (byte*) main::nxt#3
|
||||
if((byte) main::c#0!=(byte) '@') goto main::@2
|
||||
@ -614,13 +650,13 @@ main::@1: scope:[main] from main main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte*) main::nxt#4 ← phi( main::@1/(byte*) main::nxt#3 main::@3/(byte*) main::nxt#2 )
|
||||
(byte) main::c#2 ← phi( main::@1/(byte) main::c#0 main::@3/(byte) main::c#1 )
|
||||
(byte) main::i#1 ← ++ (byte) main::i#3
|
||||
*((byte*) SCREEN#2 + (byte) main::i#1) ← (byte) main::c#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
*((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::c#2
|
||||
(byte*) main::nxt#1 ← ++ (byte*) main::nxt#4
|
||||
if(true) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte*) main::nxt#2 ← (byte[]) TEXT#2
|
||||
(byte*) main::nxt#2 ← (const byte[]) TEXT#0
|
||||
(byte) main::c#1 ← * (byte*) main::nxt#2
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
@ -629,8 +665,7 @@ main::@return: scope:[main] from main::@2
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte*) main::nxt#0 = TEXT#0
|
||||
Constant (const byte*) SCREEN#2 = SCREEN#0
|
||||
Constant (const byte[]) TEXT#2 = TEXT#0
|
||||
Constant (const byte*) main::nxt#2 = TEXT#0
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
@ -639,38 +674,7 @@ CONTROL FLOW GRAPH
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::i#3 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte*) main::nxt#3 ← phi( main/(const byte*) main::nxt#0 main::@2/(byte*) main::nxt#1 )
|
||||
(byte) main::c#0 ← * (byte*) main::nxt#3
|
||||
if((byte) main::c#0!=(byte) '@') goto main::@2
|
||||
to:main::@3
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte*) main::nxt#4 ← phi( main::@1/(byte*) main::nxt#3 main::@3/(byte*) main::nxt#2 )
|
||||
(byte) main::c#2 ← phi( main::@1/(byte) main::c#0 main::@3/(byte) main::c#1 )
|
||||
(byte) main::i#1 ← ++ (byte) main::i#3
|
||||
*((const byte*) SCREEN#2 + (byte) main::i#1) ← (byte) main::c#2
|
||||
(byte*) main::nxt#1 ← ++ (byte*) main::nxt#4
|
||||
if(true) goto main::@1
|
||||
to:main::@return
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte*) main::nxt#2 ← (const byte[]) TEXT#2
|
||||
(byte) main::c#1 ← * (byte*) main::nxt#2
|
||||
to:main::@2
|
||||
main::@return: scope:[main] from main::@2
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte*) main::nxt#2 = TEXT#2
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::i#3 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@2/(byte) main::i#1 )
|
||||
(byte*) main::nxt#3 ← phi( main/(const byte*) main::nxt#0 main::@2/(byte*) main::nxt#1 )
|
||||
(byte) main::c#0 ← * (byte*) main::nxt#3
|
||||
if((byte) main::c#0!=(byte) '@') goto main::@2
|
||||
@ -678,8 +682,8 @@ main::@1: scope:[main] from main main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte*) main::nxt#4 ← phi( main::@1/(byte*) main::nxt#3 main::@3/(const byte*) main::nxt#2 )
|
||||
(byte) main::c#2 ← phi( main::@1/(byte) main::c#0 main::@3/(byte) main::c#1 )
|
||||
(byte) main::i#1 ← ++ (byte) main::i#3
|
||||
*((const byte*) SCREEN#2 + (byte) main::i#1) ← (byte) main::c#2
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
*((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::c#2
|
||||
(byte*) main::nxt#1 ← ++ (byte*) main::nxt#4
|
||||
if(true) goto main::@1
|
||||
to:main::@return
|
||||
@ -691,9 +695,15 @@ main::@return: scope:[main] from main::@2
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte*) main::nxt#0
|
||||
Inlining constant with var siblings (const byte*) main::nxt#0
|
||||
Inlining constant with var siblings (const byte*) main::nxt#0
|
||||
Inlining constant with var siblings (const byte*) main::nxt#2
|
||||
Inlining constant with var siblings (const byte*) main::nxt#2
|
||||
Inlining constant with var siblings (const byte*) main::nxt#2
|
||||
Constant inlined main::nxt#0 = (const byte[]) TEXT#0
|
||||
Constant inlined SCREEN#2 = (const byte*) SCREEN#0
|
||||
Constant inlined TEXT#2 = (const byte[]) TEXT#0
|
||||
Constant inlined main::nxt#2 = (const byte[]) TEXT#0
|
||||
Constant inlined main::i#0 = (byte) 0
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
@ -704,7 +714,7 @@ CONTROL FLOW GRAPH
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
(byte) main::i#3 ← phi( main/(byte) 0 main::@2/(byte) main::i#1 )
|
||||
(byte) main::i#2 ← phi( main/(byte) 0 main::@2/(byte) main::i#1 )
|
||||
(byte*) main::nxt#3 ← phi( main/(const byte[]) TEXT#0 main::@2/(byte*) main::nxt#1 )
|
||||
(byte) main::c#0 ← * (byte*) main::nxt#3
|
||||
if((byte) main::c#0!=(byte) '@') goto main::@2
|
||||
@ -712,7 +722,7 @@ main::@1: scope:[main] from main main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
(byte*) main::nxt#4 ← phi( main::@1/(byte*) main::nxt#3 main::@3/(const byte[]) TEXT#0 )
|
||||
(byte) main::c#2 ← phi( main::@1/(byte) main::c#0 main::@3/(byte) main::c#1 )
|
||||
(byte) main::i#1 ← ++ (byte) main::i#3
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
*((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::c#2
|
||||
(byte*) main::nxt#1 ← ++ (byte*) main::nxt#4
|
||||
if(true) goto main::@1
|
||||
@ -745,7 +755,7 @@ FINAL SYMBOL TABLE
|
||||
(byte) main::c#2
|
||||
(byte) main::i
|
||||
(byte) main::i#1
|
||||
(byte) main::i#3
|
||||
(byte) main::i#2
|
||||
(byte*) main::nxt
|
||||
(byte*) main::nxt#1
|
||||
(byte*) main::nxt#3
|
||||
@ -763,7 +773,7 @@ CONTROL FLOW GRAPH - PHI LIFTED
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@5
|
||||
(byte) main::i#3 ← phi( main/(byte) 0 main::@5/(byte~) main::i#5 )
|
||||
(byte) main::i#2 ← phi( main/(byte) 0 main::@5/(byte~) main::i#5 )
|
||||
(byte*) main::nxt#3 ← phi( main/(const byte[]) TEXT#0 main::@5/(byte*~) main::nxt#5 )
|
||||
(byte) main::c#0 ← * (byte*) main::nxt#3
|
||||
if((byte) main::c#0!=(byte) '@') goto main::@6
|
||||
@ -775,7 +785,7 @@ main::@3: scope:[main] from main::@1
|
||||
main::@2: scope:[main] from main::@3 main::@6
|
||||
(byte*) main::nxt#4 ← phi( main::@6/(byte*~) main::nxt#6 main::@3/(const byte[]) TEXT#0 )
|
||||
(byte) main::c#2 ← phi( main::@6/(byte~) main::c#3 main::@3/(byte~) main::c#4 )
|
||||
(byte) main::i#1 ← ++ (byte) main::i#3
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
*((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::c#2
|
||||
(byte*) main::nxt#1 ← ++ (byte*) main::nxt#4
|
||||
if(true) goto main::@5
|
||||
@ -811,19 +821,19 @@ main: scope:[main] from @begin
|
||||
[1] phi() [ ]
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@5
|
||||
[2] (byte) main::i#3 ← phi( main/(byte) 0 main::@5/(byte~) main::i#5 ) [ main::nxt#3 main::i#3 ]
|
||||
[2] (byte*) main::nxt#3 ← phi( main/(const byte[]) TEXT#0 main::@5/(byte*~) main::nxt#5 ) [ main::nxt#3 main::i#3 ]
|
||||
[3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#3 main::c#0 ]
|
||||
[4] if((byte) main::c#0!=(byte) '@') goto main::@6 [ main::nxt#3 main::i#3 main::c#0 ]
|
||||
[2] (byte) main::i#2 ← phi( main/(byte) 0 main::@5/(byte~) main::i#5 ) [ main::nxt#3 main::i#2 ]
|
||||
[2] (byte*) main::nxt#3 ← phi( main/(const byte[]) TEXT#0 main::@5/(byte*~) main::nxt#5 ) [ main::nxt#3 main::i#2 ]
|
||||
[3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#2 main::c#0 ]
|
||||
[4] if((byte) main::c#0!=(byte) '@') goto main::@6 [ main::nxt#3 main::i#2 main::c#0 ]
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
[5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#3 main::c#1 ]
|
||||
[6] (byte~) main::c#4 ← (byte) main::c#1 [ main::i#3 main::c#4 ]
|
||||
[5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#2 main::c#1 ]
|
||||
[6] (byte~) main::c#4 ← (byte) main::c#1 [ main::i#2 main::c#4 ]
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@3 main::@6
|
||||
[7] (byte*) main::nxt#4 ← phi( main::@6/(byte*~) main::nxt#6 main::@3/(const byte[]) TEXT#0 ) [ main::i#3 main::c#2 main::nxt#4 ]
|
||||
[7] (byte) main::c#2 ← phi( main::@6/(byte~) main::c#3 main::@3/(byte~) main::c#4 ) [ main::i#3 main::c#2 main::nxt#4 ]
|
||||
[8] (byte) main::i#1 ← ++ (byte) main::i#3 [ main::c#2 main::nxt#4 main::i#1 ]
|
||||
[7] (byte*) main::nxt#4 ← phi( main::@6/(byte*~) main::nxt#6 main::@3/(const byte[]) TEXT#0 ) [ main::i#2 main::c#2 main::nxt#4 ]
|
||||
[7] (byte) main::c#2 ← phi( main::@6/(byte~) main::c#3 main::@3/(byte~) main::c#4 ) [ main::i#2 main::c#2 main::nxt#4 ]
|
||||
[8] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::c#2 main::nxt#4 main::i#1 ]
|
||||
[9] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::c#2 [ main::nxt#4 main::i#1 ]
|
||||
[10] (byte*) main::nxt#1 ← ++ (byte*) main::nxt#4 [ main::i#1 main::nxt#1 ]
|
||||
[11] if(true) goto main::@5 [ main::i#1 main::nxt#1 ]
|
||||
@ -836,8 +846,8 @@ main::@5: scope:[main] from main::@2
|
||||
[14] (byte~) main::i#5 ← (byte) main::i#1 [ main::nxt#5 main::i#5 ]
|
||||
to:main::@1
|
||||
main::@6: scope:[main] from main::@1
|
||||
[15] (byte~) main::c#3 ← (byte) main::c#0 [ main::nxt#3 main::i#3 main::c#3 ]
|
||||
[16] (byte*~) main::nxt#6 ← (byte*) main::nxt#3 [ main::i#3 main::c#3 main::nxt#6 ]
|
||||
[15] (byte~) main::c#3 ← (byte) main::c#0 [ main::nxt#3 main::i#2 main::c#3 ]
|
||||
[16] (byte*~) main::nxt#6 ← (byte*) main::nxt#3 [ main::i#2 main::c#3 main::nxt#6 ]
|
||||
to:main::@2
|
||||
|
||||
Created 4 initial phi equivalence classes
|
||||
@ -865,18 +875,18 @@ main: scope:[main] from @begin
|
||||
[1] phi() [ ]
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
[2] (byte) main::i#3 ← phi( main/(byte) 0 main::@2/(byte) main::i#1 ) [ main::nxt#3 main::i#3 ]
|
||||
[2] (byte*) main::nxt#3 ← phi( main/(const byte[]) TEXT#0 main::@2/(byte*) main::nxt#1 ) [ main::nxt#3 main::i#3 ]
|
||||
[3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#3 main::c#0 ]
|
||||
[4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#3 main::c#0 ]
|
||||
[2] (byte) main::i#2 ← phi( main/(byte) 0 main::@2/(byte) main::i#1 ) [ main::nxt#3 main::i#2 ]
|
||||
[2] (byte*) main::nxt#3 ← phi( main/(const byte[]) TEXT#0 main::@2/(byte*) main::nxt#1 ) [ main::nxt#3 main::i#2 ]
|
||||
[3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#2 main::c#0 ]
|
||||
[4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#2 main::c#0 ]
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
[5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#3 main::c#1 ]
|
||||
[5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#2 main::c#1 ]
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@3
|
||||
[6] (byte*) main::nxt#4 ← phi( main::@1/(byte*) main::nxt#3 main::@3/(const byte[]) TEXT#0 ) [ main::i#3 main::c#2 main::nxt#4 ]
|
||||
[6] (byte) main::c#2 ← phi( main::@1/(byte) main::c#0 main::@3/(byte) main::c#1 ) [ main::i#3 main::c#2 main::nxt#4 ]
|
||||
[7] (byte) main::i#1 ← ++ (byte) main::i#3 [ main::i#1 main::c#2 main::nxt#4 ]
|
||||
[6] (byte*) main::nxt#4 ← phi( main::@1/(byte*) main::nxt#3 main::@3/(const byte[]) TEXT#0 ) [ main::i#2 main::c#2 main::nxt#4 ]
|
||||
[6] (byte) main::c#2 ← phi( main::@1/(byte) main::c#0 main::@3/(byte) main::c#1 ) [ main::i#2 main::c#2 main::nxt#4 ]
|
||||
[7] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 main::c#2 main::nxt#4 ]
|
||||
[8] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::c#2 [ main::i#1 main::nxt#4 ]
|
||||
[9] (byte*) main::nxt#1 ← ++ (byte*) main::nxt#4 [ main::nxt#1 main::i#1 ]
|
||||
[10] if(true) goto main::@1 [ main::nxt#1 main::i#1 ]
|
||||
@ -917,21 +927,21 @@ VARIABLE REGISTER WEIGHTS
|
||||
(byte) main::c#2 16.5
|
||||
(byte) main::i
|
||||
(byte) main::i#1 8.25
|
||||
(byte) main::i#3 4.4
|
||||
(byte) main::i#2 4.4
|
||||
(byte*) main::nxt
|
||||
(byte*) main::nxt#1 11.0
|
||||
(byte*) main::nxt#3 11.0
|
||||
(byte*) main::nxt#4 7.333333333333333
|
||||
|
||||
Initial phi equivalence classes
|
||||
[ main::i#3 main::i#1 ]
|
||||
[ main::i#2 main::i#1 ]
|
||||
[ main::c#2 main::c#0 main::c#1 ]
|
||||
[ main::nxt#4 main::nxt#3 main::nxt#1 ]
|
||||
Complete equivalence classes
|
||||
[ main::i#3 main::i#1 ]
|
||||
[ main::i#2 main::i#1 ]
|
||||
[ main::c#2 main::c#0 main::c#1 ]
|
||||
[ main::nxt#4 main::nxt#3 main::nxt#1 ]
|
||||
Allocated zp ZP_BYTE:2 [ main::i#3 main::i#1 ]
|
||||
Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
|
||||
Allocated zp ZP_BYTE:3 [ main::c#2 main::c#0 main::c#1 ]
|
||||
Allocated zp ZP_PTR_BYTE:4 [ main::nxt#4 main::nxt#3 main::nxt#1 ]
|
||||
INITIAL ASM
|
||||
@ -955,7 +965,7 @@ main: {
|
||||
.label nxt = 4
|
||||
//SEG6 [2] phi from main to main::@1 [phi:main->main::@1]
|
||||
b1_from_main:
|
||||
//SEG7 [2] phi (byte) main::i#3 = (byte) 0 [phi:main->main::@1#0] -- zpby1=coby1
|
||||
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- zpby1=coby1
|
||||
lda #0
|
||||
sta i
|
||||
//SEG8 [2] phi (byte*) main::nxt#3 = (const byte[]) TEXT#0 [phi:main->main::@1#1] -- zpptrby1=cowo1
|
||||
@ -966,23 +976,23 @@ main: {
|
||||
jmp b1
|
||||
//SEG9 [2] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
|
||||
b1_from_b2:
|
||||
//SEG10 [2] phi (byte) main::i#3 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy
|
||||
//SEG10 [2] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy
|
||||
//SEG11 [2] phi (byte*) main::nxt#3 = (byte*) main::nxt#1 [phi:main::@2->main::@1#1] -- register_copy
|
||||
jmp b1
|
||||
//SEG12 main::@1
|
||||
b1:
|
||||
//SEG13 [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#3 main::c#0 ] -- zpby1=_star_zpptrby1
|
||||
//SEG13 [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#2 main::c#0 ] -- zpby1=_star_zpptrby1
|
||||
ldy #0
|
||||
lda (nxt),y
|
||||
sta c
|
||||
//SEG14 [4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#3 main::c#0 ] -- zpby1_neq_coby1_then_la1
|
||||
//SEG14 [4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#2 main::c#0 ] -- zpby1_neq_coby1_then_la1
|
||||
lda c
|
||||
cmp #'@'
|
||||
bne b2_from_b1
|
||||
jmp b3
|
||||
//SEG15 main::@3
|
||||
b3:
|
||||
//SEG16 [5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#3 main::c#1 ] -- zpby1=_star_cowo1
|
||||
//SEG16 [5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#2 main::c#1 ] -- zpby1=_star_cowo1
|
||||
lda TEXT
|
||||
sta c
|
||||
//SEG17 [6] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
|
||||
@ -1001,7 +1011,7 @@ main: {
|
||||
jmp b2
|
||||
//SEG23 main::@2
|
||||
b2:
|
||||
//SEG24 [7] (byte) main::i#1 ← ++ (byte) main::i#3 [ main::i#1 main::c#2 main::nxt#4 ] -- zpby1=_inc_zpby1
|
||||
//SEG24 [7] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 main::c#2 main::nxt#4 ] -- zpby1=_inc_zpby1
|
||||
inc i
|
||||
//SEG25 [8] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::c#2 [ main::i#1 main::nxt#4 ] -- cowo1_staridx_zpby1=zpby2
|
||||
lda c
|
||||
@ -1022,19 +1032,19 @@ main: {
|
||||
}
|
||||
|
||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
Statement [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#3 main::c#0 ] always clobbers reg byte a reg byte y
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#3 main::i#1 ]
|
||||
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ main::i#3 main::i#1 ]
|
||||
Statement [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#3 main::c#0 ] always clobbers reg byte a reg byte y
|
||||
Potential registers zp ZP_BYTE:2 [ main::i#3 main::i#1 ] : zp ZP_BYTE:2 , reg byte x ,
|
||||
Statement [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#2 main::c#0 ] always clobbers reg byte a reg byte y
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
|
||||
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
|
||||
Statement [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#2 main::c#0 ] always clobbers reg byte a reg byte y
|
||||
Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x ,
|
||||
Potential registers zp ZP_BYTE:3 [ main::c#2 main::c#0 main::c#1 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y ,
|
||||
Potential registers zp ZP_PTR_BYTE:4 [ main::nxt#4 main::nxt#3 main::nxt#1 ] : zp ZP_PTR_BYTE:4 ,
|
||||
|
||||
REGISTER UPLIFT SCOPES
|
||||
Uplift Scope [main] 55: zp ZP_BYTE:3 [ main::c#2 main::c#0 main::c#1 ] 29.33: zp ZP_PTR_BYTE:4 [ main::nxt#4 main::nxt#3 main::nxt#1 ] 12.65: zp ZP_BYTE:2 [ main::i#3 main::i#1 ]
|
||||
Uplift Scope [main] 55: zp ZP_BYTE:3 [ main::c#2 main::c#0 main::c#1 ] 29.33: zp ZP_PTR_BYTE:4 [ main::nxt#4 main::nxt#3 main::nxt#1 ] 12.65: zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
|
||||
Uplift Scope []
|
||||
|
||||
Uplifting [main] best 840 combination reg byte y [ main::c#2 main::c#0 main::c#1 ] zp ZP_PTR_BYTE:4 [ main::nxt#4 main::nxt#3 main::nxt#1 ] reg byte x [ main::i#3 main::i#1 ]
|
||||
Uplifting [main] best 840 combination reg byte y [ main::c#2 main::c#0 main::c#1 ] zp ZP_PTR_BYTE:4 [ main::nxt#4 main::nxt#3 main::nxt#1 ] reg byte x [ main::i#2 main::i#1 ]
|
||||
Uplifting [] best 840 combination
|
||||
Allocated (was zp ZP_PTR_BYTE:4) zp ZP_PTR_BYTE:2 [ main::nxt#4 main::nxt#3 main::nxt#1 ]
|
||||
Removing instruction jmp bend
|
||||
@ -1061,7 +1071,7 @@ main: {
|
||||
.label nxt = 2
|
||||
//SEG6 [2] phi from main to main::@1 [phi:main->main::@1]
|
||||
b1_from_main:
|
||||
//SEG7 [2] phi (byte) main::i#3 = (byte) 0 [phi:main->main::@1#0] -- xby=coby1
|
||||
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- xby=coby1
|
||||
ldx #0
|
||||
//SEG8 [2] phi (byte*) main::nxt#3 = (const byte[]) TEXT#0 [phi:main->main::@1#1] -- zpptrby1=cowo1
|
||||
lda #<TEXT
|
||||
@ -1071,20 +1081,20 @@ main: {
|
||||
jmp b1
|
||||
//SEG9 [2] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
|
||||
b1_from_b2:
|
||||
//SEG10 [2] phi (byte) main::i#3 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy
|
||||
//SEG10 [2] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy
|
||||
//SEG11 [2] phi (byte*) main::nxt#3 = (byte*) main::nxt#1 [phi:main::@2->main::@1#1] -- register_copy
|
||||
//SEG12 main::@1
|
||||
b1:
|
||||
//SEG13 [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#3 main::c#0 ] -- yby=_star_zpptrby1
|
||||
//SEG13 [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#2 main::c#0 ] -- yby=_star_zpptrby1
|
||||
ldy #0
|
||||
lda (nxt),y
|
||||
tay
|
||||
//SEG14 [4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#3 main::c#0 ] -- yby_neq_coby1_then_la1
|
||||
//SEG14 [4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#2 main::c#0 ] -- yby_neq_coby1_then_la1
|
||||
cpy #'@'
|
||||
bne b2_from_b1
|
||||
//SEG15 main::@3
|
||||
b3:
|
||||
//SEG16 [5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#3 main::c#1 ] -- yby=_star_cowo1
|
||||
//SEG16 [5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#2 main::c#1 ] -- yby=_star_cowo1
|
||||
ldy TEXT
|
||||
//SEG17 [6] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
|
||||
b2_from_b3:
|
||||
@ -1101,7 +1111,7 @@ main: {
|
||||
//SEG22 [6] phi (byte) main::c#2 = (byte) main::c#0 [phi:main::@1->main::@2#1] -- register_copy
|
||||
//SEG23 main::@2
|
||||
b2:
|
||||
//SEG24 [7] (byte) main::i#1 ← ++ (byte) main::i#3 [ main::i#1 main::c#2 main::nxt#4 ] -- xby=_inc_xby
|
||||
//SEG24 [7] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 main::c#2 main::nxt#4 ] -- xby=_inc_xby
|
||||
inx
|
||||
//SEG25 [8] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::c#2 [ main::i#1 main::nxt#4 ] -- cowo1_staridx_xby=yby
|
||||
tya
|
||||
@ -1142,7 +1152,7 @@ main: {
|
||||
.label nxt = 2
|
||||
//SEG6 [2] phi from main to main::@1 [phi:main->main::@1]
|
||||
b1_from_main:
|
||||
//SEG7 [2] phi (byte) main::i#3 = (byte) 0 [phi:main->main::@1#0] -- xby=coby1
|
||||
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- xby=coby1
|
||||
ldx #0
|
||||
//SEG8 [2] phi (byte*) main::nxt#3 = (const byte[]) TEXT#0 [phi:main->main::@1#1] -- zpptrby1=cowo1
|
||||
lda #<TEXT
|
||||
@ -1151,20 +1161,20 @@ main: {
|
||||
sta nxt+1
|
||||
jmp b1
|
||||
//SEG9 [2] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
|
||||
//SEG10 [2] phi (byte) main::i#3 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy
|
||||
//SEG10 [2] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy
|
||||
//SEG11 [2] phi (byte*) main::nxt#3 = (byte*) main::nxt#1 [phi:main::@2->main::@1#1] -- register_copy
|
||||
//SEG12 main::@1
|
||||
b1:
|
||||
//SEG13 [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#3 main::c#0 ] -- yby=_star_zpptrby1
|
||||
//SEG13 [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#2 main::c#0 ] -- yby=_star_zpptrby1
|
||||
ldy #0
|
||||
lda (nxt),y
|
||||
tay
|
||||
//SEG14 [4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#3 main::c#0 ] -- yby_neq_coby1_then_la1
|
||||
//SEG14 [4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#2 main::c#0 ] -- yby_neq_coby1_then_la1
|
||||
cpy #'@'
|
||||
bne b2
|
||||
//SEG15 main::@3
|
||||
b3:
|
||||
//SEG16 [5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#3 main::c#1 ] -- yby=_star_cowo1
|
||||
//SEG16 [5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#2 main::c#1 ] -- yby=_star_cowo1
|
||||
ldy TEXT
|
||||
//SEG17 [6] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
|
||||
b2_from_b3:
|
||||
@ -1180,7 +1190,7 @@ main: {
|
||||
//SEG22 [6] phi (byte) main::c#2 = (byte) main::c#0 [phi:main::@1->main::@2#1] -- register_copy
|
||||
//SEG23 main::@2
|
||||
b2:
|
||||
//SEG24 [7] (byte) main::i#1 ← ++ (byte) main::i#3 [ main::i#1 main::c#2 main::nxt#4 ] -- xby=_inc_xby
|
||||
//SEG24 [7] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 main::c#2 main::nxt#4 ] -- xby=_inc_xby
|
||||
inx
|
||||
//SEG25 [8] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::c#2 [ main::i#1 main::nxt#4 ] -- cowo1_staridx_xby=yby
|
||||
tya
|
||||
@ -1219,7 +1229,7 @@ ASSEMBLER
|
||||
main: {
|
||||
.label nxt = 2
|
||||
//SEG6 [2] phi from main to main::@1 [phi:main->main::@1]
|
||||
//SEG7 [2] phi (byte) main::i#3 = (byte) 0 [phi:main->main::@1#0] -- xby=coby1
|
||||
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- xby=coby1
|
||||
ldx #0
|
||||
//SEG8 [2] phi (byte*) main::nxt#3 = (const byte[]) TEXT#0 [phi:main->main::@1#1] -- zpptrby1=cowo1
|
||||
lda #<TEXT
|
||||
@ -1228,19 +1238,19 @@ main: {
|
||||
sta nxt+1
|
||||
jmp b1
|
||||
//SEG9 [2] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
|
||||
//SEG10 [2] phi (byte) main::i#3 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy
|
||||
//SEG10 [2] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy
|
||||
//SEG11 [2] phi (byte*) main::nxt#3 = (byte*) main::nxt#1 [phi:main::@2->main::@1#1] -- register_copy
|
||||
//SEG12 main::@1
|
||||
b1:
|
||||
//SEG13 [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#3 main::c#0 ] -- yby=_star_zpptrby1
|
||||
//SEG13 [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#2 main::c#0 ] -- yby=_star_zpptrby1
|
||||
ldy #0
|
||||
lda (nxt),y
|
||||
tay
|
||||
//SEG14 [4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#3 main::c#0 ] -- yby_neq_coby1_then_la1
|
||||
//SEG14 [4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#2 main::c#0 ] -- yby_neq_coby1_then_la1
|
||||
cpy #'@'
|
||||
bne b2
|
||||
//SEG15 main::@3
|
||||
//SEG16 [5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#3 main::c#1 ] -- yby=_star_cowo1
|
||||
//SEG16 [5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#2 main::c#1 ] -- yby=_star_cowo1
|
||||
ldy TEXT
|
||||
//SEG17 [6] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
|
||||
//SEG18 [6] phi (byte*) main::nxt#4 = (const byte[]) TEXT#0 [phi:main::@3->main::@2#0] -- zpptrby1=cowo1
|
||||
@ -1255,7 +1265,7 @@ main: {
|
||||
//SEG22 [6] phi (byte) main::c#2 = (byte) main::c#0 [phi:main::@1->main::@2#1] -- register_copy
|
||||
//SEG23 main::@2
|
||||
b2:
|
||||
//SEG24 [7] (byte) main::i#1 ← ++ (byte) main::i#3 [ main::i#1 main::c#2 main::nxt#4 ] -- xby=_inc_xby
|
||||
//SEG24 [7] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 main::c#2 main::nxt#4 ] -- xby=_inc_xby
|
||||
inx
|
||||
//SEG25 [8] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::c#2 [ main::i#1 main::nxt#4 ] -- cowo1_staridx_xby=yby
|
||||
tya
|
||||
@ -1289,7 +1299,7 @@ ASSEMBLER
|
||||
main: {
|
||||
.label nxt = 2
|
||||
//SEG6 [2] phi from main to main::@1 [phi:main->main::@1]
|
||||
//SEG7 [2] phi (byte) main::i#3 = (byte) 0 [phi:main->main::@1#0] -- xby=coby1
|
||||
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- xby=coby1
|
||||
ldx #0
|
||||
//SEG8 [2] phi (byte*) main::nxt#3 = (const byte[]) TEXT#0 [phi:main->main::@1#1] -- zpptrby1=cowo1
|
||||
lda #<TEXT
|
||||
@ -1297,19 +1307,19 @@ main: {
|
||||
lda #>TEXT
|
||||
sta nxt+1
|
||||
//SEG9 [2] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
|
||||
//SEG10 [2] phi (byte) main::i#3 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy
|
||||
//SEG10 [2] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy
|
||||
//SEG11 [2] phi (byte*) main::nxt#3 = (byte*) main::nxt#1 [phi:main::@2->main::@1#1] -- register_copy
|
||||
//SEG12 main::@1
|
||||
b1:
|
||||
//SEG13 [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#3 main::c#0 ] -- yby=_star_zpptrby1
|
||||
//SEG13 [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#2 main::c#0 ] -- yby=_star_zpptrby1
|
||||
ldy #0
|
||||
lda (nxt),y
|
||||
tay
|
||||
//SEG14 [4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#3 main::c#0 ] -- yby_neq_coby1_then_la1
|
||||
//SEG14 [4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#2 main::c#0 ] -- yby_neq_coby1_then_la1
|
||||
cpy #'@'
|
||||
bne b2
|
||||
//SEG15 main::@3
|
||||
//SEG16 [5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#3 main::c#1 ] -- yby=_star_cowo1
|
||||
//SEG16 [5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#2 main::c#1 ] -- yby=_star_cowo1
|
||||
ldy TEXT
|
||||
//SEG17 [6] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
|
||||
//SEG18 [6] phi (byte*) main::nxt#4 = (const byte[]) TEXT#0 [phi:main::@3->main::@2#0] -- zpptrby1=cowo1
|
||||
@ -1323,7 +1333,7 @@ main: {
|
||||
//SEG22 [6] phi (byte) main::c#2 = (byte) main::c#0 [phi:main::@1->main::@2#1] -- register_copy
|
||||
//SEG23 main::@2
|
||||
b2:
|
||||
//SEG24 [7] (byte) main::i#1 ← ++ (byte) main::i#3 [ main::i#1 main::c#2 main::nxt#4 ] -- xby=_inc_xby
|
||||
//SEG24 [7] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 main::c#2 main::nxt#4 ] -- xby=_inc_xby
|
||||
inx
|
||||
//SEG25 [8] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::c#2 [ main::i#1 main::nxt#4 ] -- cowo1_staridx_xby=yby
|
||||
tya
|
||||
@ -1360,13 +1370,13 @@ FINAL SYMBOL TABLE
|
||||
(byte) main::c#2 reg byte y 16.5
|
||||
(byte) main::i
|
||||
(byte) main::i#1 reg byte x 8.25
|
||||
(byte) main::i#3 reg byte x 4.4
|
||||
(byte) main::i#2 reg byte x 4.4
|
||||
(byte*) main::nxt
|
||||
(byte*) main::nxt#1 nxt zp ZP_PTR_BYTE:2 11.0
|
||||
(byte*) main::nxt#3 nxt zp ZP_PTR_BYTE:2 11.0
|
||||
(byte*) main::nxt#4 nxt zp ZP_PTR_BYTE:2 7.333333333333333
|
||||
|
||||
reg byte x [ main::i#3 main::i#1 ]
|
||||
reg byte x [ main::i#2 main::i#1 ]
|
||||
reg byte y [ main::c#2 main::c#0 main::c#1 ]
|
||||
zp ZP_PTR_BYTE:2 [ main::nxt#4 main::nxt#3 main::nxt#1 ]
|
||||
|
||||
@ -1384,7 +1394,7 @@ FINAL CODE
|
||||
main: {
|
||||
.label nxt = 2
|
||||
//SEG6 [2] phi from main to main::@1 [phi:main->main::@1]
|
||||
//SEG7 [2] phi (byte) main::i#3 = (byte) 0 [phi:main->main::@1#0] -- xby=coby1
|
||||
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- xby=coby1
|
||||
ldx #0
|
||||
//SEG8 [2] phi (byte*) main::nxt#3 = (const byte[]) TEXT#0 [phi:main->main::@1#1] -- zpptrby1=cowo1
|
||||
lda #<TEXT
|
||||
@ -1392,19 +1402,19 @@ main: {
|
||||
lda #>TEXT
|
||||
sta nxt+1
|
||||
//SEG9 [2] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
|
||||
//SEG10 [2] phi (byte) main::i#3 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy
|
||||
//SEG10 [2] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@2->main::@1#0] -- register_copy
|
||||
//SEG11 [2] phi (byte*) main::nxt#3 = (byte*) main::nxt#1 [phi:main::@2->main::@1#1] -- register_copy
|
||||
//SEG12 main::@1
|
||||
b1:
|
||||
//SEG13 [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#3 main::c#0 ] -- yby=_star_zpptrby1
|
||||
//SEG13 [3] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::i#2 main::c#0 ] -- yby=_star_zpptrby1
|
||||
ldy #0
|
||||
lda (nxt),y
|
||||
tay
|
||||
//SEG14 [4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#3 main::c#0 ] -- yby_neq_coby1_then_la1
|
||||
//SEG14 [4] if((byte) main::c#0!=(byte) '@') goto main::@2 [ main::nxt#3 main::i#2 main::c#0 ] -- yby_neq_coby1_then_la1
|
||||
cpy #'@'
|
||||
bne b2
|
||||
//SEG15 main::@3
|
||||
//SEG16 [5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#3 main::c#1 ] -- yby=_star_cowo1
|
||||
//SEG16 [5] (byte) main::c#1 ← * (const byte[]) TEXT#0 [ main::i#2 main::c#1 ] -- yby=_star_cowo1
|
||||
ldy TEXT
|
||||
//SEG17 [6] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
|
||||
//SEG18 [6] phi (byte*) main::nxt#4 = (const byte[]) TEXT#0 [phi:main::@3->main::@2#0] -- zpptrby1=cowo1
|
||||
@ -1418,7 +1428,7 @@ main: {
|
||||
//SEG22 [6] phi (byte) main::c#2 = (byte) main::c#0 [phi:main::@1->main::@2#1] -- register_copy
|
||||
//SEG23 main::@2
|
||||
b2:
|
||||
//SEG24 [7] (byte) main::i#1 ← ++ (byte) main::i#3 [ main::i#1 main::c#2 main::nxt#4 ] -- xby=_inc_xby
|
||||
//SEG24 [7] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 main::c#2 main::nxt#4 ] -- xby=_inc_xby
|
||||
inx
|
||||
//SEG25 [8] *((const byte*) SCREEN#0 + (byte) main::i#1) ← (byte) main::c#2 [ main::i#1 main::nxt#4 ] -- cowo1_staridx_xby=yby
|
||||
tya
|
||||
|
@ -17,12 +17,12 @@
|
||||
(byte) main::c#2 reg byte y 16.5
|
||||
(byte) main::i
|
||||
(byte) main::i#1 reg byte x 8.25
|
||||
(byte) main::i#3 reg byte x 4.4
|
||||
(byte) main::i#2 reg byte x 4.4
|
||||
(byte*) main::nxt
|
||||
(byte*) main::nxt#1 nxt zp ZP_PTR_BYTE:2 11.0
|
||||
(byte*) main::nxt#3 nxt zp ZP_PTR_BYTE:2 11.0
|
||||
(byte*) main::nxt#4 nxt zp ZP_PTR_BYTE:2 7.333333333333333
|
||||
|
||||
reg byte x [ main::i#3 main::i#1 ]
|
||||
reg byte x [ main::i#2 main::i#1 ]
|
||||
reg byte y [ main::c#2 main::c#0 main::c#1 ]
|
||||
zp ZP_PTR_BYTE:2 [ main::nxt#4 main::nxt#3 main::nxt#1 ]
|
||||
|
@ -7,44 +7,44 @@ main: scope:[main] from @begin
|
||||
[2] call fillscreen param-assignment [ ]
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main main::@2 main::@4
|
||||
[3] (byte*) main::nxt#3 ← phi( main::@4/(byte*) main::nxt#10 main/(const byte*) TEXT#0 ) [ main::scroll#3 main::nxt#3 ]
|
||||
[3] (byte) main::scroll#3 ← phi( main::@4/(byte) main::scroll#10 main/(byte) 7 ) [ main::scroll#3 main::nxt#3 ]
|
||||
[4] (byte~) main::$2 ← * (const byte*) RASTER#0 [ main::scroll#3 main::nxt#3 main::$2 ]
|
||||
[5] if((byte~) main::$2!=(byte) 254) goto main::@2 [ main::scroll#3 main::nxt#3 ]
|
||||
[3] (byte*) main::nxt#9 ← phi( main::@4/(byte*) main::nxt#10 main/(const byte*) TEXT#0 ) [ main::scroll#7 main::nxt#9 ]
|
||||
[3] (byte) main::scroll#7 ← phi( main::@4/(byte) main::scroll#10 main/(byte) 7 ) [ main::scroll#7 main::nxt#9 ]
|
||||
[4] (byte~) main::$2 ← * (const byte*) RASTER#0 [ main::scroll#7 main::nxt#9 main::$2 ]
|
||||
[5] if((byte~) main::$2!=(byte) 254) goto main::@2 [ main::scroll#7 main::nxt#9 ]
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2 main::@3
|
||||
[6] (byte~) main::$4 ← * (const byte*) RASTER#0 [ main::scroll#3 main::nxt#3 main::$4 ]
|
||||
[7] if((byte~) main::$4!=(byte) 255) goto main::@3 [ main::scroll#3 main::nxt#3 ]
|
||||
[6] (byte~) main::$4 ← * (const byte*) RASTER#0 [ main::scroll#7 main::nxt#9 main::$4 ]
|
||||
[7] if((byte~) main::$4!=(byte) 255) goto main::@3 [ main::scroll#7 main::nxt#9 ]
|
||||
to:main::@8
|
||||
main::@8: scope:[main] from main::@3
|
||||
[8] (byte~) main::$6 ← * (const byte*) BGCOL#0 [ main::scroll#3 main::nxt#3 main::$6 ]
|
||||
[9] (byte~) main::$7 ← (byte~) main::$6 + (byte) 1 [ main::scroll#3 main::nxt#3 main::$7 ]
|
||||
[10] *((const byte*) BGCOL#0) ← (byte~) main::$7 [ main::scroll#3 main::nxt#3 ]
|
||||
[11] (byte) main::scroll#1 ← -- (byte) main::scroll#3 [ main::nxt#3 main::scroll#1 ]
|
||||
[12] if((byte) main::scroll#1!=(byte) 255) goto main::@4 [ main::nxt#3 main::scroll#1 ]
|
||||
[8] (byte~) main::$6 ← * (const byte*) BGCOL#0 [ main::scroll#7 main::nxt#9 main::$6 ]
|
||||
[9] (byte~) main::$7 ← (byte~) main::$6 + (byte) 1 [ main::scroll#7 main::nxt#9 main::$7 ]
|
||||
[10] *((const byte*) BGCOL#0) ← (byte~) main::$7 [ main::scroll#7 main::nxt#9 ]
|
||||
[11] (byte) main::scroll#1 ← -- (byte) main::scroll#7 [ main::nxt#9 main::scroll#1 ]
|
||||
[12] if((byte) main::scroll#1!=(byte) 255) goto main::@4 [ main::nxt#9 main::scroll#1 ]
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@5 main::@8
|
||||
[13] (byte) main::i#2 ← phi( main::@5/(byte) main::i#1 main::@8/(byte) 0 ) [ main::nxt#3 main::i#2 ]
|
||||
[14] (byte~) main::$11 ← (const byte[]) main::line#0+(byte) 1 *idx (byte) main::i#2 [ main::nxt#3 main::i#2 main::$11 ]
|
||||
[15] *((const byte[]) main::line#0 + (byte) main::i#2) ← (byte~) main::$11 [ main::nxt#3 main::i#2 ]
|
||||
[16] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::nxt#3 main::i#1 ]
|
||||
[17] if((byte) main::i#1!=(byte) 39) goto main::@5 [ main::nxt#3 main::i#1 ]
|
||||
[13] (byte) main::i#2 ← phi( main::@5/(byte) main::i#1 main::@8/(byte) 0 ) [ main::nxt#9 main::i#2 ]
|
||||
[14] (byte~) main::$11 ← (const byte[]) main::line#0+(byte) 1 *idx (byte) main::i#2 [ main::nxt#9 main::i#2 main::$11 ]
|
||||
[15] *((const byte[]) main::line#0 + (byte) main::i#2) ← (byte~) main::$11 [ main::nxt#9 main::i#2 ]
|
||||
[16] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::nxt#9 main::i#1 ]
|
||||
[17] if((byte) main::i#1!=(byte) 39) goto main::@5 [ main::nxt#9 main::i#1 ]
|
||||
to:main::@10
|
||||
main::@10: scope:[main] from main::@5
|
||||
[18] (byte) main::c#0 ← * (byte*) main::nxt#3 [ main::nxt#3 main::c#0 ]
|
||||
[19] if((byte) main::c#0!=(byte) '@') goto main::@6 [ main::nxt#3 main::c#0 ]
|
||||
[18] (byte) main::c#0 ← * (byte*) main::nxt#9 [ main::nxt#9 main::c#0 ]
|
||||
[19] if((byte) main::c#0!=(byte) '@') goto main::@6 [ main::nxt#9 main::c#0 ]
|
||||
to:main::@11
|
||||
main::@11: scope:[main] from main::@10
|
||||
[20] (byte) main::c#1 ← * (const byte*) TEXT#0 [ main::c#1 ]
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@10 main::@11
|
||||
[21] (byte*) main::nxt#4 ← phi( main::@10/(byte*) main::nxt#3 main::@11/(const byte*) TEXT#0 ) [ main::c#2 main::nxt#4 ]
|
||||
[21] (byte*) main::nxt#4 ← phi( main::@10/(byte*) main::nxt#9 main::@11/(const byte*) TEXT#0 ) [ main::c#2 main::nxt#4 ]
|
||||
[21] (byte) main::c#2 ← phi( main::@10/(byte) main::c#0 main::@11/(byte) main::c#1 ) [ main::c#2 main::nxt#4 ]
|
||||
[22] *((const byte[]) main::line#0+(byte) 39) ← (byte) main::c#2 [ main::nxt#4 ]
|
||||
[23] (byte*) main::nxt#1 ← ++ (byte*) main::nxt#4 [ main::nxt#1 ]
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@6 main::@8
|
||||
[24] (byte*) main::nxt#10 ← phi( main::@6/(byte*) main::nxt#1 main::@8/(byte*) main::nxt#3 ) [ main::scroll#10 main::nxt#10 ]
|
||||
[24] (byte*) main::nxt#10 ← phi( main::@6/(byte*) main::nxt#1 main::@8/(byte*) main::nxt#9 ) [ main::scroll#10 main::nxt#10 ]
|
||||
[24] (byte) main::scroll#10 ← phi( main::@6/(byte) 7 main::@8/(byte) main::scroll#1 ) [ main::scroll#10 main::nxt#10 ]
|
||||
[25] *((const byte*) SCROLL#0) ← (byte) main::scroll#10 [ main::scroll#10 main::nxt#10 ]
|
||||
[26] (byte~) main::$17 ← * (const byte*) BGCOL#0 [ main::scroll#10 main::nxt#10 main::$17 ]
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -48,17 +48,17 @@
|
||||
(byte*) main::nxt
|
||||
(byte*) main::nxt#1 nxt zp ZP_PTR_BYTE:2 22.0
|
||||
(byte*) main::nxt#10 nxt zp ZP_PTR_BYTE:2 5.5
|
||||
(byte*) main::nxt#3 nxt zp ZP_PTR_BYTE:2 2.588235294117647
|
||||
(byte*) main::nxt#4 nxt zp ZP_PTR_BYTE:2 11.0
|
||||
(byte*) main::nxt#9 nxt zp ZP_PTR_BYTE:2 2.588235294117647
|
||||
(byte) main::scroll
|
||||
(byte) main::scroll#1 reg byte x 16.5
|
||||
(byte) main::scroll#10 reg byte x 5.5
|
||||
(byte) main::scroll#3 reg byte x 2.75
|
||||
(byte) main::scroll#7 reg byte x 2.75
|
||||
|
||||
reg byte x [ main::scroll#3 main::scroll#10 main::scroll#1 ]
|
||||
reg byte x [ main::scroll#7 main::scroll#10 main::scroll#1 ]
|
||||
reg byte x [ main::i#2 main::i#1 ]
|
||||
reg byte x [ main::c#2 main::c#0 main::c#1 ]
|
||||
zp ZP_PTR_BYTE:2 [ main::nxt#4 main::nxt#3 main::nxt#10 main::nxt#1 fillscreen::cursor#2 fillscreen::cursor#1 ]
|
||||
zp ZP_PTR_BYTE:2 [ main::nxt#4 main::nxt#9 main::nxt#10 main::nxt#1 fillscreen::cursor#2 fillscreen::cursor#1 ]
|
||||
reg byte a [ main::$2 ]
|
||||
reg byte a [ main::$4 ]
|
||||
reg byte a [ main::$6 ]
|
||||
|
@ -356,6 +356,24 @@ sum::@return: scope:[sum] from sum
|
||||
Not aliassing across scopes: s1#0 sum::return#0
|
||||
Not aliassing across scopes: s2#0 sum::return#0
|
||||
Not aliassing across scopes: s3#0 sum::return#0
|
||||
Inlining constant with var siblings (const byte) sum::a#0
|
||||
Inlining constant with different constant siblings (const byte) sum::a#0
|
||||
Inlining constant with different constant siblings (const byte) sum::a#0
|
||||
Inlining constant with var siblings (const byte) sum::b#0
|
||||
Inlining constant with different constant siblings (const byte) sum::b#0
|
||||
Inlining constant with different constant siblings (const byte) sum::b#0
|
||||
Inlining constant with var siblings (const byte) sum::a#1
|
||||
Inlining constant with different constant siblings (const byte) sum::a#1
|
||||
Inlining constant with different constant siblings (const byte) sum::a#1
|
||||
Inlining constant with var siblings (const byte) sum::b#1
|
||||
Inlining constant with different constant siblings (const byte) sum::b#1
|
||||
Inlining constant with different constant siblings (const byte) sum::b#1
|
||||
Inlining constant with var siblings (const byte) sum::a#2
|
||||
Inlining constant with different constant siblings (const byte) sum::a#2
|
||||
Inlining constant with different constant siblings (const byte) sum::a#2
|
||||
Inlining constant with var siblings (const byte) sum::b#2
|
||||
Inlining constant with different constant siblings (const byte) sum::b#2
|
||||
Inlining constant with different constant siblings (const byte) sum::b#2
|
||||
Constant inlined sum::a#0 = (byte) 1
|
||||
Constant inlined sum::a#1 = (byte) 3
|
||||
Constant inlined sum::a#2 = (byte) 9
|
||||
|
@ -85,24 +85,24 @@ render: scope:[render] from main::@1
|
||||
[46] phi() [ ]
|
||||
to:render::@1
|
||||
render::@1: scope:[render] from render render::@3
|
||||
[47] (byte*) render::colline#2 ← phi( render/(const byte*) COLORS#0 render::@3/(byte*) render::colline#1 ) [ render::y#2 render::colline#2 ]
|
||||
[47] (byte) render::y#2 ← phi( render/(byte) 0 render::@3/(byte) render::y#1 ) [ render::y#2 render::colline#2 ]
|
||||
[47] (byte*) render::colline#5 ← phi( render/(const byte*) COLORS#0 render::@3/(byte*) render::colline#1 ) [ render::y#4 render::colline#5 ]
|
||||
[47] (byte) render::y#4 ← phi( render/(byte) 0 render::@3/(byte) render::y#1 ) [ render::y#4 render::colline#5 ]
|
||||
to:render::@2
|
||||
render::@2: scope:[render] from render::@1 render::@5
|
||||
[48] (byte) render::x#2 ← phi( render::@1/(byte) 0 render::@5/(byte) render::x#1 ) [ render::y#2 render::colline#2 render::x#2 ]
|
||||
[49] (byte) findcol::x#0 ← (byte) render::x#2 [ render::y#2 render::colline#2 render::x#2 findcol::x#0 ]
|
||||
[50] (byte) findcol::y#0 ← (byte) render::y#2 [ render::y#2 render::colline#2 render::x#2 findcol::x#0 findcol::y#0 ]
|
||||
[51] call findcol param-assignment [ render::y#2 render::colline#2 render::x#2 findcol::return#0 ]
|
||||
[48] (byte) render::x#2 ← phi( render::@1/(byte) 0 render::@5/(byte) render::x#1 ) [ render::y#4 render::colline#5 render::x#2 ]
|
||||
[49] (byte) findcol::x#0 ← (byte) render::x#2 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 ]
|
||||
[50] (byte) findcol::y#0 ← (byte) render::y#4 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 ]
|
||||
[51] call findcol param-assignment [ render::y#4 render::colline#5 render::x#2 findcol::return#0 ]
|
||||
to:render::@5
|
||||
render::@5: scope:[render] from render::@2
|
||||
[52] (byte) render::col#0 ← (byte) findcol::return#0 [ render::y#2 render::colline#2 render::x#2 render::col#0 ]
|
||||
[53] *((byte*) render::colline#2 + (byte) render::x#2) ← (byte) render::col#0 [ render::y#2 render::colline#2 render::x#2 ]
|
||||
[54] (byte) render::x#1 ← ++ (byte) render::x#2 [ render::y#2 render::colline#2 render::x#1 ]
|
||||
[55] if((byte) render::x#1!=(byte) 40) goto render::@2 [ render::y#2 render::colline#2 render::x#1 ]
|
||||
[52] (byte) render::col#0 ← (byte) findcol::return#0 [ render::y#4 render::colline#5 render::x#2 render::col#0 ]
|
||||
[53] *((byte*) render::colline#5 + (byte) render::x#2) ← (byte) render::col#0 [ render::y#4 render::colline#5 render::x#2 ]
|
||||
[54] (byte) render::x#1 ← ++ (byte) render::x#2 [ render::y#4 render::colline#5 render::x#1 ]
|
||||
[55] if((byte) render::x#1!=(byte) 40) goto render::@2 [ render::y#4 render::colline#5 render::x#1 ]
|
||||
to:render::@3
|
||||
render::@3: scope:[render] from render::@5
|
||||
[56] (byte*) render::colline#1 ← (byte*) render::colline#2 + (byte) 40 [ render::y#2 render::colline#1 ]
|
||||
[57] (byte) render::y#1 ← ++ (byte) render::y#2 [ render::y#1 render::colline#1 ]
|
||||
[56] (byte*) render::colline#1 ← (byte*) render::colline#5 + (byte) 40 [ render::y#4 render::colline#1 ]
|
||||
[57] (byte) render::y#1 ← ++ (byte) render::y#4 [ render::y#1 render::colline#1 ]
|
||||
[58] if((byte) render::y#1!=(byte) 25) goto render::@1 [ render::y#1 render::colline#1 ]
|
||||
to:render::@return
|
||||
render::@return: scope:[render] from render::@3
|
||||
@ -112,59 +112,59 @@ findcol: scope:[findcol] from render::@2
|
||||
[60] phi() [ findcol::x#0 findcol::y#0 ]
|
||||
to:findcol::@1
|
||||
findcol::@1: scope:[findcol] from findcol findcol::@19
|
||||
[61] (byte) findcol::mincol#11 ← phi( findcol/(byte) 0 findcol::@19/(byte) findcol::mincol#2 ) [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 ]
|
||||
[61] (byte) findcol::mindiff#10 ← phi( findcol/(byte) 255 findcol::@19/(byte~) findcol::mindiff#13 ) [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 ]
|
||||
[61] (byte) findcol::i#12 ← phi( findcol/(byte) 0 findcol::@19/(byte) findcol::i#1 ) [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 ]
|
||||
[62] (byte) findcol::xp#0 ← (const byte[]) XPOS#0 *idx (byte) findcol::i#12 [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 findcol::xp#0 ]
|
||||
[63] (byte) findcol::yp#0 ← (const byte[]) YPOS#0 *idx (byte) findcol::i#12 [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 findcol::xp#0 findcol::yp#0 ]
|
||||
[64] if((byte) findcol::x#0!=(byte) findcol::xp#0) goto findcol::@2 [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 findcol::xp#0 findcol::yp#0 ]
|
||||
[61] (byte) findcol::mincol#10 ← phi( findcol/(byte) 0 findcol::@19/(byte) findcol::mincol#2 ) [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 ]
|
||||
[61] (byte) findcol::mindiff#10 ← phi( findcol/(byte) 255 findcol::@19/(byte~) findcol::mindiff#13 ) [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 ]
|
||||
[61] (byte) findcol::i#10 ← phi( findcol/(byte) 0 findcol::@19/(byte) findcol::i#1 ) [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 ]
|
||||
[62] (byte) findcol::xp#0 ← (const byte[]) XPOS#0 *idx (byte) findcol::i#10 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::xp#0 ]
|
||||
[63] (byte) findcol::yp#0 ← (const byte[]) YPOS#0 *idx (byte) findcol::i#10 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::xp#0 findcol::yp#0 ]
|
||||
[64] if((byte) findcol::x#0!=(byte) findcol::xp#0) goto findcol::@2 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::xp#0 findcol::yp#0 ]
|
||||
to:findcol::@9
|
||||
findcol::@9: scope:[findcol] from findcol::@1
|
||||
[65] if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@2 [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 findcol::xp#0 findcol::yp#0 ]
|
||||
[65] if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@2 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::xp#0 findcol::yp#0 ]
|
||||
to:findcol::@return
|
||||
findcol::@return: scope:[findcol] from findcol::@8 findcol::@9
|
||||
[66] (byte) findcol::return#0 ← phi( findcol::@9/(byte) 0 findcol::@8/(byte) findcol::mincol#2 ) [ findcol::return#0 ]
|
||||
[67] return [ findcol::return#0 ]
|
||||
to:@return
|
||||
findcol::@2: scope:[findcol] from findcol::@1 findcol::@9
|
||||
[68] if((byte) findcol::x#0>=(byte) findcol::xp#0) goto findcol::@4 [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 findcol::xp#0 findcol::yp#0 ]
|
||||
[68] if((byte) findcol::x#0>=(byte) findcol::xp#0) goto findcol::@4 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::xp#0 findcol::yp#0 ]
|
||||
to:findcol::@12
|
||||
findcol::@12: scope:[findcol] from findcol::@2
|
||||
[69] (byte) findcol::diff#1 ← (byte) findcol::xp#0 - (byte) findcol::x#0 [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 findcol::yp#0 findcol::diff#1 ]
|
||||
[69] (byte) findcol::diff#1 ← (byte) findcol::xp#0 - (byte) findcol::x#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#1 ]
|
||||
to:findcol::@5
|
||||
findcol::@5: scope:[findcol] from findcol::@12 findcol::@4
|
||||
[70] (byte) findcol::diff#4 ← phi( findcol::@12/(byte) findcol::diff#1 findcol::@4/(byte) findcol::diff#0 ) [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 findcol::yp#0 findcol::diff#4 ]
|
||||
[71] if((byte) findcol::y#0>=(byte) findcol::yp#0) goto findcol::@6 [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 findcol::yp#0 findcol::diff#4 ]
|
||||
[70] (byte) findcol::diff#4 ← phi( findcol::@12/(byte) findcol::diff#1 findcol::@4/(byte) findcol::diff#0 ) [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#4 ]
|
||||
[71] if((byte) findcol::y#0>=(byte) findcol::yp#0) goto findcol::@6 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#4 ]
|
||||
to:findcol::@14
|
||||
findcol::@14: scope:[findcol] from findcol::@5
|
||||
[72] (byte~) findcol::$12 ← (byte) findcol::yp#0 - (byte) findcol::y#0 [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 findcol::diff#4 findcol::$12 ]
|
||||
[73] (byte) findcol::diff#3 ← (byte) findcol::diff#4 + (byte~) findcol::$12 [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 findcol::diff#3 ]
|
||||
[72] (byte~) findcol::$12 ← (byte) findcol::yp#0 - (byte) findcol::y#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#4 findcol::$12 ]
|
||||
[73] (byte) findcol::diff#3 ← (byte) findcol::diff#4 + (byte~) findcol::$12 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#3 ]
|
||||
to:findcol::@7
|
||||
findcol::@7: scope:[findcol] from findcol::@14 findcol::@6
|
||||
[74] (byte) findcol::diff#6 ← phi( findcol::@14/(byte) findcol::diff#3 findcol::@6/(byte) findcol::diff#2 ) [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 findcol::diff#6 ]
|
||||
[75] if((byte) findcol::diff#6>=(byte) findcol::mindiff#10) goto findcol::@21 [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 findcol::diff#6 ]
|
||||
[74] (byte) findcol::diff#6 ← phi( findcol::@14/(byte) findcol::diff#3 findcol::@6/(byte) findcol::diff#2 ) [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#6 ]
|
||||
[75] if((byte) findcol::diff#6>=(byte) findcol::mindiff#10) goto findcol::@21 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#6 ]
|
||||
to:findcol::@16
|
||||
findcol::@16: scope:[findcol] from findcol::@7
|
||||
[76] (byte) findcol::mincol#1 ← (const byte[]) COLS#0 *idx (byte) findcol::i#12 [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::diff#6 findcol::mincol#1 ]
|
||||
[76] (byte) findcol::mincol#1 ← (const byte[]) COLS#0 *idx (byte) findcol::i#10 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::diff#6 findcol::mincol#1 ]
|
||||
to:findcol::@8
|
||||
findcol::@8: scope:[findcol] from findcol::@16 findcol::@21
|
||||
[77] (byte) findcol::mindiff#11 ← phi( findcol::@16/(byte) findcol::diff#6 findcol::@21/(byte~) findcol::mindiff#14 ) [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mincol#2 findcol::mindiff#11 ]
|
||||
[77] (byte) findcol::mincol#2 ← phi( findcol::@16/(byte) findcol::mincol#1 findcol::@21/(byte) findcol::mincol#11 ) [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mincol#2 findcol::mindiff#11 ]
|
||||
[78] (byte) findcol::i#1 ← ++ (byte) findcol::i#12 [ findcol::x#0 findcol::y#0 findcol::i#1 findcol::mincol#2 findcol::mindiff#11 ]
|
||||
[77] (byte) findcol::mindiff#11 ← phi( findcol::@16/(byte) findcol::diff#6 findcol::@21/(byte~) findcol::mindiff#14 ) [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mincol#2 findcol::mindiff#11 ]
|
||||
[77] (byte) findcol::mincol#2 ← phi( findcol::@16/(byte) findcol::mincol#1 findcol::@21/(byte) findcol::mincol#10 ) [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mincol#2 findcol::mindiff#11 ]
|
||||
[78] (byte) findcol::i#1 ← ++ (byte) findcol::i#10 [ findcol::x#0 findcol::y#0 findcol::i#1 findcol::mincol#2 findcol::mindiff#11 ]
|
||||
[79] if((byte) findcol::i#1<(const byte) numpoints#0) goto findcol::@19 [ findcol::x#0 findcol::y#0 findcol::i#1 findcol::mincol#2 findcol::mindiff#11 ]
|
||||
to:findcol::@return
|
||||
findcol::@19: scope:[findcol] from findcol::@8
|
||||
[80] (byte~) findcol::mindiff#13 ← (byte) findcol::mindiff#11 [ findcol::x#0 findcol::y#0 findcol::i#1 findcol::mindiff#13 findcol::mincol#2 ]
|
||||
to:findcol::@1
|
||||
findcol::@21: scope:[findcol] from findcol::@7
|
||||
[81] (byte~) findcol::mindiff#14 ← (byte) findcol::mindiff#10 [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mincol#11 findcol::mindiff#14 ]
|
||||
[81] (byte~) findcol::mindiff#14 ← (byte) findcol::mindiff#10 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mincol#10 findcol::mindiff#14 ]
|
||||
to:findcol::@8
|
||||
findcol::@6: scope:[findcol] from findcol::@5
|
||||
[82] (byte~) findcol::$14 ← (byte) findcol::y#0 - (byte) findcol::yp#0 [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 findcol::diff#4 findcol::$14 ]
|
||||
[83] (byte) findcol::diff#2 ← (byte) findcol::diff#4 + (byte~) findcol::$14 [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 findcol::diff#2 ]
|
||||
[82] (byte~) findcol::$14 ← (byte) findcol::y#0 - (byte) findcol::yp#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#4 findcol::$14 ]
|
||||
[83] (byte) findcol::diff#2 ← (byte) findcol::diff#4 + (byte~) findcol::$14 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#2 ]
|
||||
to:findcol::@7
|
||||
findcol::@4: scope:[findcol] from findcol::@2
|
||||
[84] (byte) findcol::diff#0 ← (byte) findcol::x#0 - (byte) findcol::xp#0 [ findcol::x#0 findcol::y#0 findcol::i#12 findcol::mindiff#10 findcol::mincol#11 findcol::yp#0 findcol::diff#0 ]
|
||||
[84] (byte) findcol::diff#0 ← (byte) findcol::x#0 - (byte) findcol::xp#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#0 ]
|
||||
to:findcol::@5
|
||||
initscreen: scope:[initscreen] from main
|
||||
[85] phi() [ ]
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -70,10 +70,10 @@
|
||||
(byte) findcol::diff#6 reg byte a 13334.666666666666
|
||||
(byte) findcol::i
|
||||
(byte) findcol::i#1 reg byte x 10001.0
|
||||
(byte) findcol::i#12 reg byte x 2631.842105263158
|
||||
(byte) findcol::i#10 reg byte x 2631.842105263158
|
||||
(byte) findcol::mincol
|
||||
(byte) findcol::mincol#1 reg byte y 20002.0
|
||||
(byte) findcol::mincol#11 reg byte y 1176.5882352941176
|
||||
(byte) findcol::mincol#10 reg byte y 1176.5882352941176
|
||||
(byte) findcol::mincol#2 reg byte y 10001.0
|
||||
(byte) findcol::mindiff
|
||||
(byte) findcol::mindiff#10 mindiff zp ZP_BYTE:6 1875.1875
|
||||
@ -113,20 +113,20 @@
|
||||
(byte) render::col#0 reg byte a 2002.0
|
||||
(byte*) render::colline
|
||||
(byte*) render::colline#1 colline zp ZP_PTR_BYTE:3 67.33333333333333
|
||||
(byte*) render::colline#2 colline zp ZP_PTR_BYTE:3 133.66666666666669
|
||||
(byte*) render::colline#5 colline zp ZP_PTR_BYTE:3 133.66666666666669
|
||||
(byte) render::x
|
||||
(byte) render::x#1 x zp ZP_BYTE:5 1501.5
|
||||
(byte) render::x#2 x zp ZP_BYTE:5 667.3333333333334
|
||||
(byte) render::y
|
||||
(byte) render::y#1 y zp ZP_BYTE:2 151.5
|
||||
(byte) render::y#2 y zp ZP_BYTE:2 120.29999999999998
|
||||
(byte) render::y#4 y zp ZP_BYTE:2 120.29999999999998
|
||||
|
||||
zp ZP_BYTE:2 [ render::y#2 render::y#1 ]
|
||||
zp ZP_PTR_BYTE:3 [ render::colline#2 render::colline#1 initscreen::screen#2 initscreen::screen#1 ]
|
||||
zp ZP_BYTE:2 [ render::y#4 render::y#1 ]
|
||||
zp ZP_PTR_BYTE:3 [ render::colline#5 render::colline#1 initscreen::screen#2 initscreen::screen#1 ]
|
||||
zp ZP_BYTE:5 [ render::x#2 render::x#1 ]
|
||||
reg byte x [ findcol::i#12 findcol::i#1 ]
|
||||
reg byte x [ findcol::i#10 findcol::i#1 ]
|
||||
zp ZP_BYTE:6 [ findcol::mindiff#10 findcol::mindiff#13 ]
|
||||
reg byte y [ findcol::return#0 findcol::mincol#11 findcol::mincol#2 findcol::mincol#1 ]
|
||||
reg byte y [ findcol::return#0 findcol::mincol#10 findcol::mincol#2 findcol::mincol#1 ]
|
||||
zp ZP_BYTE:7 [ findcol::diff#4 findcol::diff#1 findcol::diff#0 findcol::xp#0 ]
|
||||
reg byte a [ findcol::mindiff#11 findcol::diff#6 findcol::diff#3 findcol::diff#2 findcol::mindiff#14 ]
|
||||
reg byte a [ animate::$0 ]
|
||||
|
@ -733,6 +733,63 @@ sum2::@return: scope:[sum2] from sum2
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#0
|
||||
Redundant Phi (byte*) SCREEN2#1 (byte*) SCREEN2#0
|
||||
Succesful SSA optimization Pass2RedundantPhiElimination
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
(byte*) SCREEN#0 ← (word) 1024
|
||||
(byte*) SCREEN2#0 ← (word) 1024 + (byte) 40
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@4
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@4/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) main::i#2 + (byte) 1
|
||||
(byte~) main::$1 ← (byte) main::i#2 + (byte) 2
|
||||
(byte) sum::a#0 ← (byte) main::i#2
|
||||
(byte) sum::b#0 ← (byte~) main::$0
|
||||
(byte) sum::c#0 ← (byte~) main::$1
|
||||
call sum param-assignment
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte~) main::$2 ← (byte) sum::return#0
|
||||
*((byte*) SCREEN#0 + (byte) main::i#2) ← (byte~) main::$2
|
||||
(byte~) main::$3 ← (byte) main::i#2 + (byte) 1
|
||||
(byte~) main::$4 ← (byte) main::i#2 + (byte) 2
|
||||
(byte) sum2::a#0 ← (byte) main::i#2
|
||||
(byte) sum2::b#0 ← (byte~) main::$3
|
||||
(byte) sum2::c#0 ← (byte~) main::$4
|
||||
call sum2 param-assignment
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@3
|
||||
(byte~) main::$5 ← (byte) sum2::return#0
|
||||
*((byte*) SCREEN2#0 + (byte) main::i#2) ← (byte~) main::$5
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
(boolean~) main::$6 ← (byte) main::i#1 != (byte) 11
|
||||
if((boolean~) main::$6) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@4
|
||||
return
|
||||
to:@return
|
||||
sum: scope:[sum] from main::@1
|
||||
(byte~) sum::$0 ← (byte) sum::a#0 + (byte) sum::b#0
|
||||
(byte) sum::return#0 ← (byte~) sum::$0 + (byte) sum::c#0
|
||||
to:sum::@return
|
||||
sum::@return: scope:[sum] from sum
|
||||
return
|
||||
to:@return
|
||||
sum2: scope:[sum2] from main::@3
|
||||
(byte~) sum2::$0 ← (byte) sum2::a#0 + (byte) sum2::b#0
|
||||
(byte) sum2::return#0 ← (byte~) sum2::$0 + (byte) sum2::c#0
|
||||
to:sum2::@return
|
||||
sum2::@return: scope:[sum2] from sum2
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Simple Condition (boolean~) main::$6 if((byte) main::i#1!=(byte) 11) goto main::@1
|
||||
Succesful SSA optimization Pass2ConditionalJumpSimplification
|
||||
CONTROL FLOW GRAPH
|
||||
@ -745,8 +802,6 @@ main: scope:[main] from @begin
|
||||
(byte) main::i#0 ← (byte) 0
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@4
|
||||
(byte*) SCREEN2#1 ← phi( main/(byte*) SCREEN2#0 )
|
||||
(byte*) SCREEN#1 ← phi( main/(byte*) SCREEN#0 )
|
||||
(byte) main::i#2 ← phi( main/(byte) main::i#0 main::@4/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) main::i#2 + (byte) 1
|
||||
(byte~) main::$1 ← (byte) main::i#2 + (byte) 2
|
||||
@ -757,7 +812,7 @@ main::@1: scope:[main] from main main::@4
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte~) main::$2 ← (byte) sum::return#0
|
||||
*((byte*) SCREEN#1 + (byte) main::i#2) ← (byte~) main::$2
|
||||
*((byte*) SCREEN#0 + (byte) main::i#2) ← (byte~) main::$2
|
||||
(byte~) main::$3 ← (byte) main::i#2 + (byte) 1
|
||||
(byte~) main::$4 ← (byte) main::i#2 + (byte) 2
|
||||
(byte) sum2::a#0 ← (byte) main::i#2
|
||||
@ -767,7 +822,7 @@ main::@3: scope:[main] from main::@1
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@3
|
||||
(byte~) main::$5 ← (byte) sum2::return#0
|
||||
*((byte*) SCREEN2#1 + (byte) main::i#2) ← (byte~) main::$5
|
||||
*((byte*) SCREEN2#0 + (byte) main::i#2) ← (byte~) main::$5
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 11) goto main::@1
|
||||
to:main::@return
|
||||
@ -801,8 +856,6 @@ CONTROL FLOW GRAPH
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@4
|
||||
(byte*) SCREEN2#1 ← phi( main/(const byte*) SCREEN2#0 )
|
||||
(byte*) SCREEN#1 ← phi( main/(const byte*) SCREEN#0 )
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@4/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) main::i#2 + (byte) 1
|
||||
(byte~) main::$1 ← (byte) main::i#2 + (byte) 2
|
||||
@ -813,7 +866,7 @@ main::@1: scope:[main] from main main::@4
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte~) main::$2 ← (byte) sum::return#0
|
||||
*((byte*) SCREEN#1 + (byte) main::i#2) ← (byte~) main::$2
|
||||
*((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte~) main::$2
|
||||
(byte~) main::$3 ← (byte) main::i#2 + (byte) 1
|
||||
(byte~) main::$4 ← (byte) main::i#2 + (byte) 2
|
||||
(byte) sum2::a#0 ← (byte) main::i#2
|
||||
@ -823,60 +876,7 @@ main::@3: scope:[main] from main::@1
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@3
|
||||
(byte~) main::$5 ← (byte) sum2::return#0
|
||||
*((byte*) SCREEN2#1 + (byte) main::i#2) ← (byte~) main::$5
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 11) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@4
|
||||
return
|
||||
to:@return
|
||||
sum: scope:[sum] from main::@1
|
||||
(byte~) sum::$0 ← (byte) sum::a#0 + (byte) sum::b#0
|
||||
(byte) sum::return#0 ← (byte~) sum::$0 + (byte) sum::c#0
|
||||
to:sum::@return
|
||||
sum::@return: scope:[sum] from sum
|
||||
return
|
||||
to:@return
|
||||
sum2: scope:[sum2] from main::@3
|
||||
(byte~) sum2::$0 ← (byte) sum2::a#0 + (byte) sum2::b#0
|
||||
(byte) sum2::return#0 ← (byte~) sum2::$0 + (byte) sum2::c#0
|
||||
to:sum2::@return
|
||||
sum2::@return: scope:[sum2] from sum2
|
||||
return
|
||||
to:@return
|
||||
@end: scope:[] from @begin
|
||||
|
||||
Constant (const byte*) SCREEN#1 = SCREEN#0
|
||||
Constant (const byte*) SCREEN2#1 = SCREEN2#0
|
||||
Succesful SSA optimization Pass2ConstantIdentification
|
||||
CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
call main param-assignment
|
||||
to:@end
|
||||
main: scope:[main] from @begin
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@4
|
||||
(byte) main::i#2 ← phi( main/(const byte) main::i#0 main::@4/(byte) main::i#1 )
|
||||
(byte~) main::$0 ← (byte) main::i#2 + (byte) 1
|
||||
(byte~) main::$1 ← (byte) main::i#2 + (byte) 2
|
||||
(byte) sum::a#0 ← (byte) main::i#2
|
||||
(byte) sum::b#0 ← (byte~) main::$0
|
||||
(byte) sum::c#0 ← (byte~) main::$1
|
||||
call sum param-assignment
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1
|
||||
(byte~) main::$2 ← (byte) sum::return#0
|
||||
*((const byte*) SCREEN#1 + (byte) main::i#2) ← (byte~) main::$2
|
||||
(byte~) main::$3 ← (byte) main::i#2 + (byte) 1
|
||||
(byte~) main::$4 ← (byte) main::i#2 + (byte) 2
|
||||
(byte) sum2::a#0 ← (byte) main::i#2
|
||||
(byte) sum2::b#0 ← (byte~) main::$3
|
||||
(byte) sum2::c#0 ← (byte~) main::$4
|
||||
call sum2 param-assignment
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@3
|
||||
(byte~) main::$5 ← (byte) sum2::return#0
|
||||
*((const byte*) SCREEN2#1 + (byte) main::i#2) ← (byte~) main::$5
|
||||
*((const byte*) SCREEN2#0 + (byte) main::i#2) ← (byte~) main::$5
|
||||
(byte) main::i#1 ← ++ (byte) main::i#2
|
||||
if((byte) main::i#1!=(byte) 11) goto main::@1
|
||||
to:main::@return
|
||||
@ -919,8 +919,8 @@ Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Multiple usages for variable. Not optimizing sub-constant (byte) main::i#2
|
||||
Constant inlined SCREEN#1 = (const byte*) SCREEN#0
|
||||
Constant inlined SCREEN2#1 = (const byte*) SCREEN2#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Inlining constant with var siblings (const byte) main::i#0
|
||||
Constant inlined main::i#0 = (byte) 0
|
||||
Succesful SSA optimization Pass2ConstantInlining
|
||||
CONTROL FLOW GRAPH
|
||||
|
Loading…
x
Reference in New Issue
Block a user