|
|
|
/* @generated */
|
|
|
|
digraph cfg {
|
|
|
|
"getValue.faa0c7b1433b0c97fcdc15fa47c8180f_1" [label="1: Start getValue\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 137, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getValue.faa0c7b1433b0c97fcdc15fa47c8180f_1" -> "getValue.faa0c7b1433b0c97fcdc15fa47c8180f_3" ;
|
|
|
|
"getValue.faa0c7b1433b0c97fcdc15fa47c8180f_2" [label="2: Exit getValue \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getValue.faa0c7b1433b0c97fcdc15fa47c8180f_3" [label="3: Return Stmt \n *&return:int=1 [line 137, column 18]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getValue.faa0c7b1433b0c97fcdc15fa47c8180f_3" -> "getValue.faa0c7b1433b0c97fcdc15fa47c8180f_2" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_1" [label="1: Start m1\nFormals: \nLocals: x:int value:int \n DECLARE_LOCALS(&return,&x,&value); [line 12, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_1" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_23" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_2" [label="2: Exit m1 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_3" [label="3: Return Stmt \n *&return:int=0 [line 32, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_3" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_2" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_4" [label="4: + \n " ]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_4" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_5" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_5" [label="5: BinaryOperatorStmt: LT \n n$0=*&value:int [line 14, column 10]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_5" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_6" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_5" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_7" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_6" [label="6: Prune (true branch, while) \n PRUNE((n$0 < 10), true); [line 14, column 10]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_6" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_9" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_7" [label="7: Prune (false branch, while) \n PRUNE(!(n$0 < 10), false); [line 14, column 10]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_7" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_3" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_8" [label="8: Call _fun_printf \n n$1=_fun_printf(\"(after_switch)HELLO WORLD!\":char const *) [line 30, column 5]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_8" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_4" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_9" [label="9: Switch_stmt \n n$2=*&value:int [line 15, column 13]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_9" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_18" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_9" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_19" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_10" [label="10: DefaultStmt_placeholder \n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_10" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_11" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_11" [label="11: Call _fun_printf \n n$4=_fun_printf(\"(2/def)HELLO WORLD!\":char const *) [line 27, column 9]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_11" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_4" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_12" [label="12: Prune (true branch, switch) \n PRUNE((n$2 == 2), true); [line 25, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_12" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_11" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_13" [label="13: Prune (false branch, switch) \n PRUNE(!(n$2 == 2), false); [line 25, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_13" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_10" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_14" [label="14: Call _fun_printf \n n$6=_fun_printf(\"(1)HELLO WORLD!\":char const *) [line 23, column 9]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_14" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_4" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_15" [label="15: Prune (true branch, switch) \n PRUNE((n$2 == 1), true); [line 22, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_15" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_14" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_16" [label="16: Prune (false branch, switch) \n PRUNE(!(n$2 == 1), false); [line 22, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_16" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_12" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_16" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_13" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_17" [label="17: Call _fun_printf \n n$8=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 20, column 9]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_17" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_8" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_18" [label="18: Prune (true branch, switch) \n PRUNE((n$2 == 0), true); [line 19, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_18" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_17" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_19" [label="19: Prune (false branch, switch) \n PRUNE(!(n$2 == 0), false); [line 19, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_19" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_15" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_19" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_16" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_20" [label="20: BinaryOperatorStmt: Assign \n n$9=*&value:int [line 18, column 11]\n *&x:int=(n$9 + 1) [line 18, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_20" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_17" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_21" [label="21: Call _fun_printf \n n$10=_fun_printf(\"(out)HELLO WORLD!\":char const *) [line 17, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_21" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_20" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_22" [label="22: DeclStmt \n *&x:int=1 [line 16, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_22" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_21" ;
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_23" [label="23: DeclStmt \n *&value:int=0 [line 13, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m1.ae7be26cdaa742ca148068d5ac90eaca_23" -> "m1.ae7be26cdaa742ca148068d5ac90eaca_4" ;
|
|
|
|
"m10.e66050aa5d0a7e0ecb49429ea4b0a32b_1" [label="1: Start m10\nFormals: \nLocals: value:int \n DECLARE_LOCALS(&return,&value); [line 185, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m10.e66050aa5d0a7e0ecb49429ea4b0a32b_1" -> "m10.e66050aa5d0a7e0ecb49429ea4b0a32b_5" ;
|
|
|
|
"m10.e66050aa5d0a7e0ecb49429ea4b0a32b_2" [label="2: Exit m10 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m10.e66050aa5d0a7e0ecb49429ea4b0a32b_3" [label="3: Return Stmt \n *&return:int=0 [line 188, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m10.e66050aa5d0a7e0ecb49429ea4b0a32b_3" -> "m10.e66050aa5d0a7e0ecb49429ea4b0a32b_2" ;
|
|
|
|
"m10.e66050aa5d0a7e0ecb49429ea4b0a32b_4" [label="4: Switch_stmt \n *&value:int=7 [line 187, column 11]\n n$0=*&value:int [line 187, column 11]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m10.e66050aa5d0a7e0ecb49429ea4b0a32b_4" -> "m10.e66050aa5d0a7e0ecb49429ea4b0a32b_3" ;
|
|
|
|
"m10.e66050aa5d0a7e0ecb49429ea4b0a32b_5" [label="5: DeclStmt \n *&value:int=0 [line 186, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m10.e66050aa5d0a7e0ecb49429ea4b0a32b_5" -> "m10.e66050aa5d0a7e0ecb49429ea4b0a32b_4" ;
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_1" [label="1: Start m11\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int value:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0,&value); [line 191, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_1" -> "m11.c4534fe0ca256b331e9a3f14fe17229d_14" ;
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_2" [label="2: Exit m11 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_3" [label="3: Return Stmt \n *&return:int=0 [line 197, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_3" -> "m11.c4534fe0ca256b331e9a3f14fe17229d_2" ;
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_4" [label="4: + \n " ]
|
|
|
|
|
|
|
|
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_4" -> "m11.c4534fe0ca256b331e9a3f14fe17229d_10" ;
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_5" [label="5: BinaryOperatorStmt: EQ \n n$1=*&value:int [line 193, column 20]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_5" -> "m11.c4534fe0ca256b331e9a3f14fe17229d_6" ;
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_5" -> "m11.c4534fe0ca256b331e9a3f14fe17229d_7" ;
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_6" [label="6: Prune (true branch, boolean exp) \n PRUNE((n$1 == 0), true); [line 193, column 20]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_6" -> "m11.c4534fe0ca256b331e9a3f14fe17229d_8" ;
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_7" [label="7: Prune (false branch, boolean exp) \n PRUNE(!(n$1 == 0), false); [line 193, column 20]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_7" -> "m11.c4534fe0ca256b331e9a3f14fe17229d_9" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_8" [label="8: ConditionalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int=7 [line 193, column 20]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_8" -> "m11.c4534fe0ca256b331e9a3f14fe17229d_4" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_9" [label="9: ConditionalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int=9 [line 193, column 20]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_9" -> "m11.c4534fe0ca256b331e9a3f14fe17229d_4" ;
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_10" [label="10: Switch_stmt \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 193, column 20]\n *&value:int=n$2 [line 193, column 11]\n n$3=*&value:int [line 193, column 11]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_10" -> "m11.c4534fe0ca256b331e9a3f14fe17229d_12" ;
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_10" -> "m11.c4534fe0ca256b331e9a3f14fe17229d_13" ;
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_11" [label="11: Call _fun_printf \n n$4=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 195, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_11" -> "m11.c4534fe0ca256b331e9a3f14fe17229d_3" ;
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_12" [label="12: Prune (true branch, switch) \n PRUNE((n$3 == 0), true); [line 194, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_12" -> "m11.c4534fe0ca256b331e9a3f14fe17229d_11" ;
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_13" [label="13: Prune (false branch, switch) \n PRUNE(!(n$3 == 0), false); [line 194, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_13" -> "m11.c4534fe0ca256b331e9a3f14fe17229d_3" ;
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_14" [label="14: DeclStmt \n *&value:int=0 [line 192, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m11.c4534fe0ca256b331e9a3f14fe17229d_14" -> "m11.c4534fe0ca256b331e9a3f14fe17229d_5" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_1" [label="1: Start m2\nFormals: \nLocals: something:int z:int x:int value:int \n DECLARE_LOCALS(&return,&something,&z,&x,&value); [line 35, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_1" -> "m2.aaf2f89992379705dac844c0a2a1d45f_22" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_2" [label="2: Exit m2 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_3" [label="3: Return Stmt \n *&return:int=0 [line 57, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_3" -> "m2.aaf2f89992379705dac844c0a2a1d45f_2" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_4" [label="4: Switch_stmt \n n$0=*&value:int [line 37, column 11]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_4" -> "m2.aaf2f89992379705dac844c0a2a1d45f_17" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_4" -> "m2.aaf2f89992379705dac844c0a2a1d45f_18" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_5" [label="5: DefaultStmt_placeholder \n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_5" -> "m2.aaf2f89992379705dac844c0a2a1d45f_12" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_6" [label="6: Prune (true branch, switch) \n PRUNE((n$0 == 3), true); [line 54, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_6" -> "m2.aaf2f89992379705dac844c0a2a1d45f_3" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_7" [label="7: Prune (false branch, switch) \n PRUNE(!(n$0 == 3), false); [line 54, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_7" -> "m2.aaf2f89992379705dac844c0a2a1d45f_5" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_8" [label="8: Prune (true branch, switch) \n PRUNE((n$0 == 2), true); [line 53, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_8" -> "m2.aaf2f89992379705dac844c0a2a1d45f_3" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_9" [label="9: Prune (false branch, switch) \n PRUNE(!(n$0 == 2), false); [line 53, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_9" -> "m2.aaf2f89992379705dac844c0a2a1d45f_6" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_9" -> "m2.aaf2f89992379705dac844c0a2a1d45f_7" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_10" [label="10: BinaryOperatorStmt: Assign \n *&z:int=42 [line 51, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_10" -> "m2.aaf2f89992379705dac844c0a2a1d45f_3" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_11" [label="11: UnaryOperator \n n$3=*&something:int [line 49, column 7]\n *&something:int=(n$3 + 1) [line 49, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_11" -> "m2.aaf2f89992379705dac844c0a2a1d45f_10" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_12" [label="12: DeclStmt \n *&something:int=1 [line 48, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_12" -> "m2.aaf2f89992379705dac844c0a2a1d45f_11" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_13" [label="13: Prune (true branch, switch) \n PRUNE((n$0 == 1), true); [line 47, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_13" -> "m2.aaf2f89992379705dac844c0a2a1d45f_12" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_14" [label="14: Prune (false branch, switch) \n PRUNE(!(n$0 == 1), false); [line 47, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_14" -> "m2.aaf2f89992379705dac844c0a2a1d45f_8" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_14" -> "m2.aaf2f89992379705dac844c0a2a1d45f_9" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_15" [label="15: DeclStmt \n *&z:int=9 [line 44, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_15" -> "m2.aaf2f89992379705dac844c0a2a1d45f_12" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_16" [label="16: Call _fun_printf \n n$5=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 42, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_16" -> "m2.aaf2f89992379705dac844c0a2a1d45f_3" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_17" [label="17: Prune (true branch, switch) \n PRUNE((n$0 == 0), true); [line 41, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_17" -> "m2.aaf2f89992379705dac844c0a2a1d45f_16" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_18" [label="18: Prune (false branch, switch) \n PRUNE(!(n$0 == 0), false); [line 41, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_18" -> "m2.aaf2f89992379705dac844c0a2a1d45f_13" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_18" -> "m2.aaf2f89992379705dac844c0a2a1d45f_14" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_19" [label="19: BinaryOperatorStmt: Assign \n n$6=*&value:int [line 40, column 9]\n *&x:int=(n$6 + 1) [line 40, column 5]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_19" -> "m2.aaf2f89992379705dac844c0a2a1d45f_16" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_20" [label="20: Call _fun_printf \n n$7=_fun_printf(\"(out)HELLO WORLD!\":char const *) [line 39, column 5]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_20" -> "m2.aaf2f89992379705dac844c0a2a1d45f_19" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_21" [label="21: DeclStmt \n *&x:int=1 [line 38, column 5]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_21" -> "m2.aaf2f89992379705dac844c0a2a1d45f_20" ;
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_22" [label="22: DeclStmt \n *&value:int=0 [line 36, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m2.aaf2f89992379705dac844c0a2a1d45f_22" -> "m2.aaf2f89992379705dac844c0a2a1d45f_4" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_1" [label="1: Start m3\nFormals: \nLocals: z:int something:int value:int \n DECLARE_LOCALS(&return,&z,&something,&value); [line 60, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_1" -> "m3.9678f7a7939f457fa0d9353761e189c7_17" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_2" [label="2: Exit m3 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_3" [label="3: Return Stmt \n *&return:int=0 [line 75, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_3" -> "m3.9678f7a7939f457fa0d9353761e189c7_2" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_4" [label="4: Switch_stmt \n n$0=*&value:int [line 62, column 11]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_4" -> "m3.9678f7a7939f457fa0d9353761e189c7_15" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_4" -> "m3.9678f7a7939f457fa0d9353761e189c7_16" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_5" [label="5: Prune (true branch, switch) \n PRUNE((n$0 == 3), true); [line 72, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_5" -> "m3.9678f7a7939f457fa0d9353761e189c7_3" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_6" [label="6: Prune (false branch, switch) \n PRUNE(!(n$0 == 3), false); [line 72, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_6" -> "m3.9678f7a7939f457fa0d9353761e189c7_3" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_7" [label="7: Prune (true branch, switch) \n PRUNE((n$0 == 2), true); [line 71, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_7" -> "m3.9678f7a7939f457fa0d9353761e189c7_3" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_8" [label="8: Prune (false branch, switch) \n PRUNE(!(n$0 == 2), false); [line 71, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_8" -> "m3.9678f7a7939f457fa0d9353761e189c7_5" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_8" -> "m3.9678f7a7939f457fa0d9353761e189c7_6" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_9" [label="9: DeclStmt \n *&z:int=9 [line 70, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_9" -> "m3.9678f7a7939f457fa0d9353761e189c7_3" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_10" [label="10: UnaryOperator \n n$3=*&something:int [line 68, column 7]\n *&something:int=(n$3 + 1) [line 68, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_10" -> "m3.9678f7a7939f457fa0d9353761e189c7_3" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_11" [label="11: DeclStmt \n *&something:int=1 [line 67, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_11" -> "m3.9678f7a7939f457fa0d9353761e189c7_10" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_12" [label="12: Prune (true branch, switch) \n PRUNE((n$0 == 1), true); [line 66, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_12" -> "m3.9678f7a7939f457fa0d9353761e189c7_11" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_13" [label="13: Prune (false branch, switch) \n PRUNE(!(n$0 == 1), false); [line 66, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_13" -> "m3.9678f7a7939f457fa0d9353761e189c7_7" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_13" -> "m3.9678f7a7939f457fa0d9353761e189c7_8" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_14" [label="14: Call _fun_printf \n n$5=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 64, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_14" -> "m3.9678f7a7939f457fa0d9353761e189c7_3" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_15" [label="15: Prune (true branch, switch) \n PRUNE((n$0 == 0), true); [line 63, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_15" -> "m3.9678f7a7939f457fa0d9353761e189c7_14" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_16" [label="16: Prune (false branch, switch) \n PRUNE(!(n$0 == 0), false); [line 63, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_16" -> "m3.9678f7a7939f457fa0d9353761e189c7_12" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_16" -> "m3.9678f7a7939f457fa0d9353761e189c7_13" ;
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_17" [label="17: DeclStmt \n *&value:int=0 [line 61, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m3.9678f7a7939f457fa0d9353761e189c7_17" -> "m3.9678f7a7939f457fa0d9353761e189c7_4" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_1" [label="1: Start m4\nFormals: \nLocals: something:int z:int x:int value:int \n DECLARE_LOCALS(&return,&something,&z,&x,&value); [line 78, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_1" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_22" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_2" [label="2: Exit m4 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_3" [label="3: Return Stmt \n *&return:int=0 [line 100, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_3" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_2" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_4" [label="4: Switch_stmt \n n$0=*&value:int [line 80, column 11]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_4" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_17" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_4" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_18" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_5" [label="5: DefaultStmt_placeholder \n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_5" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_12" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_6" [label="6: Prune (true branch, switch) \n PRUNE((n$0 == 3), true); [line 97, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_6" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_3" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_7" [label="7: Prune (false branch, switch) \n PRUNE(!(n$0 == 3), false); [line 97, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_7" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_5" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_8" [label="8: Prune (true branch, switch) \n PRUNE((n$0 == 2), true); [line 96, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_8" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_3" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_9" [label="9: Prune (false branch, switch) \n PRUNE(!(n$0 == 2), false); [line 96, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_9" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_6" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_9" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_7" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_10" [label="10: BinaryOperatorStmt: Assign \n *&z:int=42 [line 94, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_10" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_3" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_11" [label="11: UnaryOperator \n n$3=*&something:int [line 92, column 7]\n *&something:int=(n$3 + 1) [line 92, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_11" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_10" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_12" [label="12: DeclStmt \n *&something:int=1 [line 91, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_12" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_11" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_13" [label="13: Prune (true branch, switch) \n PRUNE((n$0 == 1), true); [line 90, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_13" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_12" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_14" [label="14: Prune (false branch, switch) \n PRUNE(!(n$0 == 1), false); [line 90, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_14" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_8" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_14" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_9" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_15" [label="15: DeclStmt \n *&z:int=9 [line 87, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_15" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_12" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_16" [label="16: Call _fun_printf \n n$5=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 85, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_16" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_3" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_17" [label="17: Prune (true branch, switch) \n PRUNE((n$0 == 0), true); [line 84, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_17" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_16" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_18" [label="18: Prune (false branch, switch) \n PRUNE(!(n$0 == 0), false); [line 84, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_18" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_13" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_18" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_14" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_19" [label="19: BinaryOperatorStmt: Assign \n n$6=*&value:int [line 83, column 9]\n *&x:int=(n$6 + 1) [line 83, column 5]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_19" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_16" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_20" [label="20: Call _fun_printf \n n$7=_fun_printf(\"(out)HELLO WORLD!\":char const *) [line 82, column 5]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_20" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_19" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_21" [label="21: DeclStmt \n *&x:int=1 [line 81, column 5]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_21" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_20" ;
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_22" [label="22: DeclStmt \n *&value:int=0 [line 79, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m4.fd6b6fc9220b72d21683ae8e4f50a210_22" -> "m4.fd6b6fc9220b72d21683ae8e4f50a210_4" ;
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_1" [label="1: Start m5\nFormals: \nLocals: x:int value:int \n DECLARE_LOCALS(&return,&x,&value); [line 103, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_1" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_15" ;
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_2" [label="2: Exit m5 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_3" [label="3: Return Stmt \n *&return:int=0 [line 116, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_3" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_2" ;
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_4" [label="4: + \n " ]
|
|
|
|
|
|
|
|
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_4" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_5" ;
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_5" [label="5: BinaryOperatorStmt: LT \n n$0=*&value:int [line 105, column 10]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_5" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_6" ;
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_5" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_7" ;
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_6" [label="6: Prune (true branch, while) \n PRUNE((n$0 < 10), true); [line 105, column 10]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_6" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_8" ;
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_7" [label="7: Prune (false branch, while) \n PRUNE(!(n$0 < 10), false); [line 105, column 10]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_7" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_3" ;
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_8" [label="8: Switch_stmt \n n$1=*&value:int [line 106, column 13]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_8" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_10" ;
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_8" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_11" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_9" [label="9: Call _fun_printf \n n$3=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 112, column 9]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_9" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_4" ;
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_10" [label="10: Prune (true branch, switch) \n PRUNE((n$1 == 0), true); [line 111, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_10" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_9" ;
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_11" [label="11: Prune (false branch, switch) \n PRUNE(!(n$1 == 0), false); [line 111, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_11" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_4" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_12" [label="12: BinaryOperatorStmt: Assign \n n$5=*&value:int [line 109, column 11]\n *&x:int=(n$5 + 1) [line 109, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_12" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_4" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_13" [label="13: Call _fun_printf \n n$6=_fun_printf(\"(out)HELLO WORLD!\":char const *) [line 108, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_13" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_12" ;
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_14" [label="14: DeclStmt \n *&x:int=1 [line 107, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_14" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_13" ;
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_15" [label="15: DeclStmt \n *&value:int=0 [line 104, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m5.7b1f6dff14d8c2dfeb7da9487be0612d_15" -> "m5.7b1f6dff14d8c2dfeb7da9487be0612d_4" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_1" [label="1: Start m6\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int z:int something:int value:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0,&z,&something,&value); [line 119, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_1" -> "m6.36604411a85db2bd9e97e22bfb5b692d_23" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_2" [label="2: Exit m6 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_3" [label="3: Return Stmt \n *&return:int=0 [line 134, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_3" -> "m6.36604411a85db2bd9e97e22bfb5b692d_2" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_4" [label="4: + \n " ]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_4" -> "m6.36604411a85db2bd9e97e22bfb5b692d_10" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_5" [label="5: BinaryOperatorStmt: GT \n n$1=*&value:int [line 121, column 11]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_5" -> "m6.36604411a85db2bd9e97e22bfb5b692d_6" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_5" -> "m6.36604411a85db2bd9e97e22bfb5b692d_7" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_6" [label="6: Prune (true branch, boolean exp) \n PRUNE((n$1 > 0), true); [line 121, column 11]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_6" -> "m6.36604411a85db2bd9e97e22bfb5b692d_8" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_7" [label="7: Prune (false branch, boolean exp) \n PRUNE(!(n$1 > 0), false); [line 121, column 11]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_7" -> "m6.36604411a85db2bd9e97e22bfb5b692d_9" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_8" [label="8: ConditionalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int=1 [line 121, column 11]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_8" -> "m6.36604411a85db2bd9e97e22bfb5b692d_4" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_9" [label="9: ConditionalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int=0 [line 121, column 11]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_9" -> "m6.36604411a85db2bd9e97e22bfb5b692d_4" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_10" [label="10: Switch_stmt \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 121, column 11]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_10" -> "m6.36604411a85db2bd9e97e22bfb5b692d_21" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_10" -> "m6.36604411a85db2bd9e97e22bfb5b692d_22" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_11" [label="11: Prune (true branch, switch) \n PRUNE((n$2 == 3), true); [line 131, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_11" -> "m6.36604411a85db2bd9e97e22bfb5b692d_3" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_12" [label="12: Prune (false branch, switch) \n PRUNE(!(n$2 == 3), false); [line 131, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_12" -> "m6.36604411a85db2bd9e97e22bfb5b692d_3" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_13" [label="13: Prune (true branch, switch) \n PRUNE((n$2 == 2), true); [line 130, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_13" -> "m6.36604411a85db2bd9e97e22bfb5b692d_3" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_14" [label="14: Prune (false branch, switch) \n PRUNE(!(n$2 == 2), false); [line 130, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_14" -> "m6.36604411a85db2bd9e97e22bfb5b692d_11" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_14" -> "m6.36604411a85db2bd9e97e22bfb5b692d_12" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_15" [label="15: DeclStmt \n *&z:int=9 [line 129, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_15" -> "m6.36604411a85db2bd9e97e22bfb5b692d_3" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_16" [label="16: UnaryOperator \n n$5=*&something:int [line 127, column 7]\n *&something:int=(n$5 + 1) [line 127, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_16" -> "m6.36604411a85db2bd9e97e22bfb5b692d_3" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_17" [label="17: DeclStmt \n *&something:int=1 [line 126, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_17" -> "m6.36604411a85db2bd9e97e22bfb5b692d_16" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_18" [label="18: Prune (true branch, switch) \n PRUNE((n$2 == 1), true); [line 125, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_18" -> "m6.36604411a85db2bd9e97e22bfb5b692d_17" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_19" [label="19: Prune (false branch, switch) \n PRUNE(!(n$2 == 1), false); [line 125, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_19" -> "m6.36604411a85db2bd9e97e22bfb5b692d_13" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_19" -> "m6.36604411a85db2bd9e97e22bfb5b692d_14" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_20" [label="20: Call _fun_printf \n n$7=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 123, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_20" -> "m6.36604411a85db2bd9e97e22bfb5b692d_3" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_21" [label="21: Prune (true branch, switch) \n PRUNE((n$2 == 0), true); [line 122, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_21" -> "m6.36604411a85db2bd9e97e22bfb5b692d_20" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_22" [label="22: Prune (false branch, switch) \n PRUNE(!(n$2 == 0), false); [line 122, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_22" -> "m6.36604411a85db2bd9e97e22bfb5b692d_18" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_22" -> "m6.36604411a85db2bd9e97e22bfb5b692d_19" ;
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_23" [label="23: DeclStmt \n *&value:int=0 [line 120, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m6.36604411a85db2bd9e97e22bfb5b692d_23" -> "m6.36604411a85db2bd9e97e22bfb5b692d_5" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_1" [label="1: Start m7\nFormals: \nLocals: z:int something:int value:int \n DECLARE_LOCALS(&return,&z,&something,&value); [line 139, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_1" -> "m7.0449904fbf32607bf8ce5c26823dbc29_17" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_2" [label="2: Exit m7 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_3" [label="3: Return Stmt \n *&return:int=0 [line 154, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_3" -> "m7.0449904fbf32607bf8ce5c26823dbc29_2" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_4" [label="4: Switch_stmt \n n$0=_fun_getValue() [line 141, column 11]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_4" -> "m7.0449904fbf32607bf8ce5c26823dbc29_15" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_4" -> "m7.0449904fbf32607bf8ce5c26823dbc29_16" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_5" [label="5: Prune (true branch, switch) \n PRUNE((n$0 == 3), true); [line 151, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_5" -> "m7.0449904fbf32607bf8ce5c26823dbc29_3" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_6" [label="6: Prune (false branch, switch) \n PRUNE(!(n$0 == 3), false); [line 151, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_6" -> "m7.0449904fbf32607bf8ce5c26823dbc29_3" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_7" [label="7: Prune (true branch, switch) \n PRUNE((n$0 == 2), true); [line 150, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_7" -> "m7.0449904fbf32607bf8ce5c26823dbc29_3" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_8" [label="8: Prune (false branch, switch) \n PRUNE(!(n$0 == 2), false); [line 150, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_8" -> "m7.0449904fbf32607bf8ce5c26823dbc29_5" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_8" -> "m7.0449904fbf32607bf8ce5c26823dbc29_6" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_9" [label="9: DeclStmt \n *&z:int=9 [line 149, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_9" -> "m7.0449904fbf32607bf8ce5c26823dbc29_3" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_10" [label="10: UnaryOperator \n n$3=*&something:int [line 147, column 7]\n *&something:int=(n$3 + 1) [line 147, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_10" -> "m7.0449904fbf32607bf8ce5c26823dbc29_3" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_11" [label="11: DeclStmt \n *&something:int=1 [line 146, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_11" -> "m7.0449904fbf32607bf8ce5c26823dbc29_10" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_12" [label="12: Prune (true branch, switch) \n PRUNE((n$0 == 1), true); [line 145, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_12" -> "m7.0449904fbf32607bf8ce5c26823dbc29_11" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_13" [label="13: Prune (false branch, switch) \n PRUNE(!(n$0 == 1), false); [line 145, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_13" -> "m7.0449904fbf32607bf8ce5c26823dbc29_7" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_13" -> "m7.0449904fbf32607bf8ce5c26823dbc29_8" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_14" [label="14: Call _fun_printf \n n$5=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 143, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_14" -> "m7.0449904fbf32607bf8ce5c26823dbc29_3" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_15" [label="15: Prune (true branch, switch) \n PRUNE((n$0 == 0), true); [line 142, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_15" -> "m7.0449904fbf32607bf8ce5c26823dbc29_14" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_16" [label="16: Prune (false branch, switch) \n PRUNE(!(n$0 == 0), false); [line 142, column 5]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_16" -> "m7.0449904fbf32607bf8ce5c26823dbc29_12" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_16" -> "m7.0449904fbf32607bf8ce5c26823dbc29_13" ;
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_17" [label="17: DeclStmt \n *&value:int=0 [line 140, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m7.0449904fbf32607bf8ce5c26823dbc29_17" -> "m7.0449904fbf32607bf8ce5c26823dbc29_4" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_1" [label="1: Start m8\nFormals: \nLocals: a:int 0$?%__sil_tmpSIL_temp_conditional___n$1:int z:int something:int value:int \n DECLARE_LOCALS(&return,&a,&0$?%__sil_tmpSIL_temp_conditional___n$1,&z,&something,&value); [line 157, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_1" -> "m8.980b79c2a71b9bcc117e08a990b5b332_29" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_2" [label="2: Exit m8 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_3" [label="3: Return Stmt \n *&return:int=0 [line 176, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_3" -> "m8.980b79c2a71b9bcc117e08a990b5b332_2" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_4" [label="4: + \n " ]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_4" -> "m8.980b79c2a71b9bcc117e08a990b5b332_5" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_5" [label="5: BinaryOperatorStmt: LT \n n$0=*&value:int [line 159, column 10]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_5" -> "m8.980b79c2a71b9bcc117e08a990b5b332_6" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_5" -> "m8.980b79c2a71b9bcc117e08a990b5b332_7" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_6" [label="6: Prune (true branch, while) \n PRUNE((n$0 < 10), true); [line 159, column 10]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_6" -> "m8.980b79c2a71b9bcc117e08a990b5b332_10" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_7" [label="7: Prune (false branch, while) \n PRUNE(!(n$0 < 10), false); [line 159, column 10]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_7" -> "m8.980b79c2a71b9bcc117e08a990b5b332_3" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_8" [label="8: DeclStmt \n *&a:int=0 [line 174, column 5]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_8" -> "m8.980b79c2a71b9bcc117e08a990b5b332_4" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_9" [label="9: + \n " ]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_9" -> "m8.980b79c2a71b9bcc117e08a990b5b332_15" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_10" [label="10: BinaryOperatorStmt: EQ \n n$2=_fun_getValue() [line 160, column 13]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_10" -> "m8.980b79c2a71b9bcc117e08a990b5b332_11" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_10" -> "m8.980b79c2a71b9bcc117e08a990b5b332_12" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_11" [label="11: Prune (true branch, boolean exp) \n PRUNE((n$2 == 0), true); [line 160, column 13]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_11" -> "m8.980b79c2a71b9bcc117e08a990b5b332_13" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_12" [label="12: Prune (false branch, boolean exp) \n PRUNE(!(n$2 == 0), false); [line 160, column 13]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_12" -> "m8.980b79c2a71b9bcc117e08a990b5b332_14" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_13" [label="13: ConditionalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int=1 [line 160, column 13]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_13" -> "m8.980b79c2a71b9bcc117e08a990b5b332_9" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_14" [label="14: ConditionalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int=2 [line 160, column 13]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_14" -> "m8.980b79c2a71b9bcc117e08a990b5b332_9" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_15" [label="15: Switch_stmt \n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int [line 160, column 13]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_15" -> "m8.980b79c2a71b9bcc117e08a990b5b332_27" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_15" -> "m8.980b79c2a71b9bcc117e08a990b5b332_28" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_16" [label="16: Prune (true branch, switch) \n PRUNE((n$3 == 3), true); [line 171, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_16" -> "m8.980b79c2a71b9bcc117e08a990b5b332_8" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_17" [label="17: Prune (false branch, switch) \n PRUNE(!(n$3 == 3), false); [line 171, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_17" -> "m8.980b79c2a71b9bcc117e08a990b5b332_8" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_18" [label="18: Prune (true branch, switch) \n PRUNE((n$3 == 2), true); [line 170, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_18" -> "m8.980b79c2a71b9bcc117e08a990b5b332_8" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_19" [label="19: Prune (false branch, switch) \n PRUNE(!(n$3 == 2), false); [line 170, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_19" -> "m8.980b79c2a71b9bcc117e08a990b5b332_16" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_19" -> "m8.980b79c2a71b9bcc117e08a990b5b332_17" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_20" [label="20: DeclStmt \n *&z:int=9 [line 169, column 9]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_20" -> "m8.980b79c2a71b9bcc117e08a990b5b332_8" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_21" [label="21: UnaryOperator \n n$7=*&something:int [line 166, column 9]\n *&something:int=(n$7 + 1) [line 166, column 9]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_21" -> "m8.980b79c2a71b9bcc117e08a990b5b332_4" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_22" [label="22: DeclStmt \n *&something:int=1 [line 165, column 9]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_22" -> "m8.980b79c2a71b9bcc117e08a990b5b332_21" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_23" [label="23: Prune (true branch, switch) \n PRUNE((n$3 == 1), true); [line 164, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_23" -> "m8.980b79c2a71b9bcc117e08a990b5b332_22" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_24" [label="24: Prune (false branch, switch) \n PRUNE(!(n$3 == 1), false); [line 164, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_24" -> "m8.980b79c2a71b9bcc117e08a990b5b332_18" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_24" -> "m8.980b79c2a71b9bcc117e08a990b5b332_19" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_25" [label="25: Return Stmt \n *&return:int=0 [line 163, column 9]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_25" -> "m8.980b79c2a71b9bcc117e08a990b5b332_2" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_26" [label="26: Call _fun_printf \n n$8=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 162, column 9]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_26" -> "m8.980b79c2a71b9bcc117e08a990b5b332_25" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_27" [label="27: Prune (true branch, switch) \n PRUNE((n$3 == 0), true); [line 161, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_27" -> "m8.980b79c2a71b9bcc117e08a990b5b332_26" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_28" [label="28: Prune (false branch, switch) \n PRUNE(!(n$3 == 0), false); [line 161, column 7]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_28" -> "m8.980b79c2a71b9bcc117e08a990b5b332_23" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_28" -> "m8.980b79c2a71b9bcc117e08a990b5b332_24" ;
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_29" [label="29: DeclStmt \n *&value:int=0 [line 158, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m8.980b79c2a71b9bcc117e08a990b5b332_29" -> "m8.980b79c2a71b9bcc117e08a990b5b332_4" ;
|
|
|
|
"m9.5bbb291cc1e38a051365ee9edb7cbd14_1" [label="1: Start m9\nFormals: \nLocals: value:int \n DECLARE_LOCALS(&return,&value); [line 179, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m9.5bbb291cc1e38a051365ee9edb7cbd14_1" -> "m9.5bbb291cc1e38a051365ee9edb7cbd14_5" ;
|
|
|
|
"m9.5bbb291cc1e38a051365ee9edb7cbd14_2" [label="2: Exit m9 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"m9.5bbb291cc1e38a051365ee9edb7cbd14_3" [label="3: Return Stmt \n *&return:int=0 [line 182, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m9.5bbb291cc1e38a051365ee9edb7cbd14_3" -> "m9.5bbb291cc1e38a051365ee9edb7cbd14_2" ;
|
|
|
|
"m9.5bbb291cc1e38a051365ee9edb7cbd14_4" [label="4: Switch_stmt \n n$0=*&value:int [line 181, column 11]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m9.5bbb291cc1e38a051365ee9edb7cbd14_4" -> "m9.5bbb291cc1e38a051365ee9edb7cbd14_3" ;
|
|
|
|
"m9.5bbb291cc1e38a051365ee9edb7cbd14_5" [label="5: DeclStmt \n *&value:int=0 [line 180, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"m9.5bbb291cc1e38a051365ee9edb7cbd14_5" -> "m9.5bbb291cc1e38a051365ee9edb7cbd14_4" ;
|
|
|
|
}
|