Commit 9ff7e162 authored by 徐世桐's avatar 徐世桐
Browse files

sx119: added auto test for const propagate

parent 79f2d5f3
......@@ -67,7 +67,7 @@ test-optimise:
stage: optimise-test
script:
- echo "compile oprimise sample tests and conpair with given .log result file"
# - ./scripts/constantPropagationTest.sh
- ./scripts/constantPropagationTest.sh
- ./scripts/extensionValidTest.sh
artifacts:
paths:
......
optimising using const propagate
{scope size = 52 current scope = utils.frontend.symbolTable.SymbolTable@6a5fc7f7 parent = null
INTEGER a0 = 0
INTEGER a1 = 0
INTEGER a2 = 0
INTEGER a3 = 0
INTEGER a4 = 0
INTEGER a5 = 0
INTEGER b0 = 0
INTEGER b1 = 0
INTEGER b2 = 0
INTEGER b3 = 0
INTEGER b4 = 0
INTEGER b5 = 0
{scope size = 52 current scope = utils.frontend.symbolTable.SymbolTable@edf4efb parent = null
INT a0 = 0
INT a1 = 0
INT a2 = 0
INT a3 = 0
INT a4 = 0
INT a5 = 0
INT b0 = 0
INT b1 = 0
INT b2 = 0
INT b3 = 0
INT b4 = 0
INT b5 = 0
while true :
{scope size = 0 current scope = utils.frontend.symbolTable.SymbolTable@39ba5a14 parent = utils.frontend.symbolTable.SymbolTable@6a5fc7f7
{scope size = 0 current scope = utils.frontend.symbolTable.SymbolTable@6aaa5eb0 parent = utils.frontend.symbolTable.SymbolTable@edf4efb
b1 (32) = 0
a1 (8) = 1
if true :
{scope size = 0 current scope = utils.frontend.symbolTable.SymbolTable@7e0ea639 parent = utils.frontend.symbolTable.SymbolTable@39ba5a14
{scope size = 0 current scope = utils.frontend.symbolTable.SymbolTable@3498ed parent = utils.frontend.symbolTable.SymbolTable@6aaa5eb0
b2 (36) = 0
a2 (12) = 1
CONTINUE
}
else
{scope size = 0 current scope = utils.frontend.symbolTable.SymbolTable@3d24753a parent = utils.frontend.symbolTable.SymbolTable@39ba5a14
{scope size = 0 current scope = utils.frontend.symbolTable.SymbolTable@1a407d53 parent = utils.frontend.symbolTable.SymbolTable@6aaa5eb0
b3 (40) = 0
a3 (16) = 1
if true :
{scope size = 0 current scope = utils.frontend.symbolTable.SymbolTable@59a6e353 parent = utils.frontend.symbolTable.SymbolTable@3d24753a
{scope size = 0 current scope = utils.frontend.symbolTable.SymbolTable@3d8c7aca parent = utils.frontend.symbolTable.SymbolTable@1a407d53
b4 (44) = 0
a4 (20) = 1
BREAK
}
else
{scope size = 0 current scope = utils.frontend.symbolTable.SymbolTable@7a0ac6e3 parent = utils.frontend.symbolTable.SymbolTable@3d24753a
{scope size = 0 current scope = utils.frontend.symbolTable.SymbolTable@5ebec15 parent = utils.frontend.symbolTable.SymbolTable@1a407d53
b5 (48) = 0
a5 (24) = 1
}
......@@ -41,7 +41,7 @@ BREAK
}
}
INTEGER c = 0
INT c = 0
c (52) = a1 (8)
c (52) = a2 (12)
c (52) = a3 (16)
......
optimising using const propagate
{scope
INTEGER a0 = 0
INTEGER b0 = 0
{scope size = 25 current scope = utils.frontend.symbolTable.SymbolTable@26f67b76 parent = null
INT a0 = 0
INT b0 = 0
CHAR c0 = <char:32>
INTEGER d0 = 32
INTEGER i = 0
INTEGER j = 0
for {scope
INT d0 = 32
INT i = 0
INT j = 0
for {scope size = 0 current scope = utils.frontend.symbolTable.SymbolTable@39fb3ab6 parent = utils.frontend.symbolTable.SymbolTable@26f67b76
i (17) = 0
j (21) = 1
}
true {scope
i (17) LESS 1 {scope size = 0 current scope = utils.frontend.symbolTable.SymbolTable@39fb3ab6 parent = utils.frontend.symbolTable.SymbolTable@26f67b76
i (17) = i (17) PLUS 1
}
:
{scope
{scope size = 4 current scope = utils.frontend.symbolTable.SymbolTable@6276ae34 parent = utils.frontend.symbolTable.SymbolTable@39fb3ab6
b0 (8) = 1
while true :
{scope
{scope size = 0 current scope = utils.frontend.symbolTable.SymbolTable@7946e1f4 parent = utils.frontend.symbolTable.SymbolTable@6276ae34
c0 (9) = <char:97>
d0 (13) = 32
}
INTEGER d = 1
INT d = 1
d (4) = 1
d (4) = ORDc0 (9)
d (4) = 32
}
INTEGER d = 1
INT d = 1
d (25) = b0 (8) PLUS 1
d (25) = ORDc0 (9)
d (25) = 32
......
optimising using const propagate
{scope
INTEGER a = 0
INTEGER b = 0
{scope size = 12 current scope = utils.frontend.symbolTable.SymbolTable@6fadae5d parent = null
INT a = 0
INT b = 0
if true :
{scope
{scope size = 8 current scope = utils.frontend.symbolTable.SymbolTable@4411d970 parent = utils.frontend.symbolTable.SymbolTable@6fadae5d
a (4) = 0
b (8) = 0
INTEGER a = 0
INTEGER b = 0
INT a = 0
INT b = 0
}
else
{scope
{scope size = 8 current scope = utils.frontend.symbolTable.SymbolTable@6442b0a6 parent = utils.frontend.symbolTable.SymbolTable@6fadae5d
a (4) = 0
b (8) = 1
INTEGER a = 0
INTEGER b = 0
INT a = 0
INT b = 0
}
INTEGER c = 0
INT c = 0
c (12) = b (8)
}
Assembly file created!
......
optimising using const propagate
{scope
INTEGER a0 = 0
INTEGER b0 = 0
{scope size = 17 current scope = utils.frontend.symbolTable.SymbolTable@4e04a765 parent = null
INT a0 = 0
INT b0 = 0
CHAR c0 = <char:32>
INTEGER d0 = 32
INT d0 = 32
while true :
{scope
{scope size = 4 current scope = utils.frontend.symbolTable.SymbolTable@5315b42e parent = utils.frontend.symbolTable.SymbolTable@4e04a765
b0 (8) = 1
while true :
{scope
{scope size = 0 current scope = utils.frontend.symbolTable.SymbolTable@2ef9b8bc parent = utils.frontend.symbolTable.SymbolTable@5315b42e
c0 (9) = <char:97>
d0 (13) = 32
}
INTEGER d = 1
INT d = 1
d (4) = 1
d (4) = ORDc0 (9)
d (4) = 32
}
INTEGER d = 1
INT d = 1
d (17) = b0 (8) PLUS 1
d (17) = ORDc0 (9)
d (17) = 32
......
optimising using const propagate
{scope
INTEGER a = 0
INTEGER b = 0
INTEGER c = 0
INTEGER d = 0
{scope size = 20 current scope = utils.frontend.symbolTable.SymbolTable@13fee20c parent = null
INT a = 0
INT b = 0
INT c = 0
INT d = 0
switch 3
case 0
b (8) = 1
......@@ -13,7 +13,7 @@ optimising using const propagate
d (16) = 0
default
c (12) = 1
INTEGER e = 1
INT e = 1
e (20) = b (8) PLUS 1
e (20) = c (12) PLUS 1
e (20) = 1
......
optimising using const propagate
{scope
INTEGER a = 0
INTEGER n = 0
INTEGER c = 0
{scope size = 16 current scope = utils.frontend.symbolTable.SymbolTable@6aaa5eb0 parent = null
INT a = 0
INT n = 0
INT c = 0
while true :
{scope
{scope size = 8 current scope = utils.frontend.symbolTable.SymbolTable@7a5d012c parent = utils.frontend.symbolTable.SymbolTable@6aaa5eb0
a (4) = 1
c (12) = 0
INTEGER a = 0
INTEGER b = 0
INT a = 0
INT b = 0
b (8) = n (8)
n (8) = n (8) PLUS 1
}
INTEGER b = 0
INT b = 0
b (16) = a (4) PLUS 1
}
Assembly file created!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment