123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388 |
- ===== AST after parser =====
- f(cond1, cond2):
- TreeList
- IfBranch
- UnresolvedReference cond1
- TreeList
- BinaryOperation Declaration
- UnresolvedReference a
- MathematicalConstant 1
- IfBranch
- UnresolvedReference cond2
- TreeList
- BinaryOperation Declaration
- UnresolvedReference b
- UnresolvedReference a
- ElseIfBranch Else
- TreeList
- BinaryOperation Declaration
- UnresolvedReference b
- MathematicalConstant 3
- ElseIfBranch Else
- TreeList
- BinaryOperation Declaration
- UnresolvedReference b
- MathematicalConstant 4
- ReturnNode
- UnresolvedReference b
- ===== AST after function-call-canonicalization =====
- f(cond1, cond2):
- TreeList
- IfBranch
- UnresolvedReference cond1
- TreeList
- BinaryOperation Declaration
- UnresolvedReference a
- MathematicalConstant 1
- IfBranch
- UnresolvedReference cond2
- TreeList
- BinaryOperation Declaration
- UnresolvedReference b
- UnresolvedReference a
- ElseIfBranch Else
- TreeList
- BinaryOperation Declaration
- UnresolvedReference b
- MathematicalConstant 3
- ElseIfBranch Else
- TreeList
- BinaryOperation Declaration
- UnresolvedReference b
- MathematicalConstant 4
- ReturnNode
- UnresolvedReference b
- ===== AST after if-branch-merging =====
- f(cond1, cond2):
- TreeList
- IfElseIfChain
- UnresolvedReference cond1
- TreeList
- BinaryOperation Declaration
- UnresolvedReference a
- MathematicalConstant 1
- IfElseIfChain
- UnresolvedReference cond2
- TreeList
- BinaryOperation Declaration
- UnresolvedReference b
- UnresolvedReference a
- TreeList
- BinaryOperation Declaration
- UnresolvedReference b
- MathematicalConstant 3
- TreeList
- BinaryOperation Declaration
- UnresolvedReference b
- MathematicalConstant 4
- ReturnNode
- UnresolvedReference b
- ===== AST after reference-resolving =====
- f(cond1, cond2):
- TreeList
- IfElseIfChain
- Var cond1
- TreeList
- BinaryOperation Assignment
- Var a
- MathematicalConstant 1
- IfElseIfChain
- Var cond2
- TreeList
- BinaryOperation Assignment
- Var b
- Var a
- TreeList
- BinaryOperation Assignment
- Var b
- MathematicalConstant 3
- TreeList
- BinaryOperation Assignment
- Var b
- MathematicalConstant 4
- ReturnNode
- Var b
- ===== AST after cfg-building =====
- f(cond1, cond2):
- TreeList
- IfElseIfChain
- Var cond1
- TreeList
- BinaryOperation Assignment
- Var a
- MathematicalConstant 1
- IfElseIfChain
- Var cond2
- TreeList
- BinaryOperation Assignment
- Var b
- Var a
- TreeList
- BinaryOperation Assignment
- Var b
- MathematicalConstant 3
- TreeList
- BinaryOperation Assignment
- Var b
- MathematicalConstant 4
- ReturnNode
- Var b
- ===== CFG after cfg-building =====
- f(cond1, cond2):
- 0:
- ControlFlowBranch true=3 false=7
- Var cond1
- 1:
- ControlFlowFunctionReturn
- Var $return
- 2:
- BinaryOperation Assignment
- Var $return
- Var b
- ControlFlowJump jump=1
- 3:
- BinaryOperation Assignment
- Var a
- MathematicalConstant 1
- ControlFlowBranch true=5 false=6
- Var cond2
- 4:
- ControlFlowJump jump=2
- 5:
- BinaryOperation Assignment
- Var b
- Var a
- ControlFlowJump jump=4
- 6:
- BinaryOperation Assignment
- Var b
- MathematicalConstant 3
- ControlFlowJump jump=4
- 7:
- BinaryOperation Assignment
- Var b
- MathematicalConstant 4
- ControlFlowJump jump=2
- 8:
- BinaryOperation Assignment
- Var $return
- Error ""
- ControlFlowJump jump=1
- ===== AST after cfg-simplification =====
- f(cond1, cond2):
- TreeList
- IfElseIfChain
- Var cond1
- TreeList
- BinaryOperation Assignment
- Var a
- MathematicalConstant 1
- IfElseIfChain
- Var cond2
- TreeList
- BinaryOperation Assignment
- Var b
- Var a
- TreeList
- BinaryOperation Assignment
- Var b
- MathematicalConstant 3
- TreeList
- BinaryOperation Assignment
- Var b
- MathematicalConstant 4
- ReturnNode
- Var b
- ===== CFG after cfg-simplification =====
- f(cond1, cond2):
- 0:
- ControlFlowBranch true=3 false=6
- Var cond1
- 1:
- ControlFlowFunctionReturn
- Var $return
- 2:
- BinaryOperation Assignment
- Var $return
- Var b
- ControlFlowJump jump=1
- 3:
- BinaryOperation Assignment
- Var a
- MathematicalConstant 1
- ControlFlowBranch true=4 false=5
- Var cond2
- 4:
- BinaryOperation Assignment
- Var b
- Var a
- ControlFlowJump jump=2
- 5:
- BinaryOperation Assignment
- Var b
- MathematicalConstant 3
- ControlFlowJump jump=2
- 6:
- BinaryOperation Assignment
- Var b
- MathematicalConstant 4
- ControlFlowJump jump=2
- ===== AST after ssa-building =====
- f(cond1, cond2):
- TreeList
- IfElseIfChain
- Var cond1@0
- TreeList
- BinaryOperation Assignment
- Var a@1
- MathematicalConstant 1
- IfElseIfChain
- Var cond2@0
- TreeList
- BinaryOperation Assignment
- Var b@1
- Var a@1
- TreeList
- BinaryOperation Assignment
- Var b@3
- MathematicalConstant 3
- TreeList
- BinaryOperation Assignment
- Var b@4
- MathematicalConstant 4
- ReturnNode
- Var b@2
- ===== CFG after ssa-building =====
- f(cond1, cond2):
- 0:
- ControlFlowBranch true=1 false=6
- Var cond1@0
- 1:
- BinaryOperation Assignment
- Var a@1
- MathematicalConstant 1
- ControlFlowBranch true=2 false=5
- Var cond2@0
- 2:
- BinaryOperation Assignment
- Var b@1
- Var a@1
- ControlFlowJump jump=3
- 3:
- a@2 = phi(2: a@1, 5: a@1, 6: a@0)
- b@2 = phi(2: b@1, 5: b@3, 6: b@4)
- BinaryOperation Assignment
- Var $return@1
- Var b@2
- ControlFlowJump jump=4
- 4:
- ControlFlowFunctionReturn
- Var $return@1
- 5:
- BinaryOperation Assignment
- Var b@3
- MathematicalConstant 3
- ControlFlowJump jump=3
- 6:
- BinaryOperation Assignment
- Var b@4
- MathematicalConstant 4
- ControlFlowJump jump=3
- ===== AST after dce =====
- f(cond1, cond2):
- TreeList
- IfElseIfChain
- Var cond1@0
- TreeList
- BinaryOperation Assignment
- Var a@1
- MathematicalConstant 1
- IfElseIfChain
- Var cond2@0
- TreeList
- BinaryOperation Assignment
- Var b@1
- Var a@1
- TreeList
- BinaryOperation Assignment
- Var b@3
- MathematicalConstant 3
- TreeList
- BinaryOperation Assignment
- Var b@4
- MathematicalConstant 4
- ReturnNode
- Var b@2
- ===== CFG after dce =====
- f(cond1, cond2):
- 0:
- ControlFlowBranch true=1 false=6
- Var cond1@0
- 1:
- BinaryOperation Assignment
- Var a@1
- MathematicalConstant 1
- ControlFlowBranch true=2 false=5
- Var cond2@0
- 2:
- BinaryOperation Assignment
- Var b@1
- Var a@1
- ControlFlowJump jump=3
- 3:
- b@2 = phi(2: b@1, 5: b@3, 6: b@4)
- BinaryOperation Assignment
- Var $return@1
- Var b@2
- ControlFlowJump jump=4
- 4:
- ControlFlowFunctionReturn
- Var $return@1
- 5:
- BinaryOperation Assignment
- Var b@3
- MathematicalConstant 3
- ControlFlowJump jump=3
- 6:
- BinaryOperation Assignment
- Var b@4
- MathematicalConstant 4
- ControlFlowJump jump=3
|