|
|
|
/* @generated */
|
|
|
|
digraph cfg {
|
|
|
|
"__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_1" [label="1: Start __infer_globals_initializer_y\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 15, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_1" -> "__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_3" ;
|
|
|
|
"__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_2" [label="2: Exit __infer_globals_initializer_y \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_3" [label="3: DeclStmt \n n$0=_fun_anonymous_union_nestedoperators_union.cpp:15:1_(&#GB<codetoanalyze/cpp/frontend/nestedoperators/union.cpp>$y:anonymous_union_nestedoperators_union.cpp:15:1*) [line 25, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_3" -> "__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_2" ;
|
|
|
|
"main.fad58de7366495db4650cfefac2fcd61_1" [label="1: Start main\nFormals: \nLocals: l:int \n DECLARE_LOCALS(&return,&l); [line 27, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"main.fad58de7366495db4650cfefac2fcd61_1" -> "main.fad58de7366495db4650cfefac2fcd61_7" ;
|
|
|
|
"main.fad58de7366495db4650cfefac2fcd61_2" [label="2: Exit main \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"main.fad58de7366495db4650cfefac2fcd61_3" [label="3: Return Stmt \n *&return:int=0 [line 35, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"main.fad58de7366495db4650cfefac2fcd61_3" -> "main.fad58de7366495db4650cfefac2fcd61_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
|
|
|
"main.fad58de7366495db4650cfefac2fcd61_4" [label="4: BinaryOperatorStmt: Assign \n n$1=*&#GB<codetoanalyze/cpp/frontend/nestedoperators/union.cpp>$x:anonymous_struct_nestedoperators_union.cpp:10:1* [line 34, column 11]\n n$2=*n$1.b:int [line 34, column 11]\n *&#GB<codetoanalyze/cpp/frontend/nestedoperators/union.cpp>$y.g.w:int=n$2 [line 34, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"main.fad58de7366495db4650cfefac2fcd61_4" -> "main.fad58de7366495db4650cfefac2fcd61_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
|
|
|
"main.fad58de7366495db4650cfefac2fcd61_5" [label="5: BinaryOperatorStmt: Assign \n n$3=*&#GB<codetoanalyze/cpp/frontend/nestedoperators/union.cpp>$y.f:int [line 32, column 11]\n *&#GB<codetoanalyze/cpp/frontend/nestedoperators/union.cpp>$y.g.u:int=n$3 [line 32, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"main.fad58de7366495db4650cfefac2fcd61_5" -> "main.fad58de7366495db4650cfefac2fcd61_4" ;
|
|
|
|
"main.fad58de7366495db4650cfefac2fcd61_6" [label="6: BinaryOperatorStmt: Assign \n *&#GB<codetoanalyze/cpp/frontend/nestedoperators/union.cpp>$y.f:int=7 [line 31, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"main.fad58de7366495db4650cfefac2fcd61_6" -> "main.fad58de7366495db4650cfefac2fcd61_5" ;
|
[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
|
|
|
"main.fad58de7366495db4650cfefac2fcd61_7" [label="7: BinaryOperatorStmt: Assign \n n$4=*&#GB<codetoanalyze/cpp/frontend/nestedoperators/union.cpp>$x:anonymous_struct_nestedoperators_union.cpp:10:1* [line 30, column 3]\n *n$4.a:int=1 [line 30, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"main.fad58de7366495db4650cfefac2fcd61_7" -> "main.fad58de7366495db4650cfefac2fcd61_6" ;
|
|
|
|
"#anonymous_union_nestedoperators_union.cpp:15:1#{12517556114589879497}.4d96ad7522b6448f22454f6bd6e9a42f_1" [label="1: Start anonymous_union_nestedoperators_union.cpp:15:1_\nFormals: this:anonymous_union_nestedoperators_union.cpp:15:1*\nLocals: \n DECLARE_LOCALS(&return); [line 15, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"#anonymous_union_nestedoperators_union.cpp:15:1#{12517556114589879497}.4d96ad7522b6448f22454f6bd6e9a42f_1" -> "#anonymous_union_nestedoperators_union.cpp:15:1#{12517556114589879497}.4d96ad7522b6448f22454f6bd6e9a42f_2" ;
|
|
|
|
"#anonymous_union_nestedoperators_union.cpp:15:1#{12517556114589879497}.4d96ad7522b6448f22454f6bd6e9a42f_2" [label="2: Exit anonymous_union_nestedoperators_union.cpp:15:1_ \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
}
|