|
|
|
/* @generated */
|
|
|
|
digraph cfg {
|
|
|
|
"__infer_globals_initializer_global.bdc08c089842ce08b974b22a75daf78e_1" [label="1: Start __infer_globals_initializer_global\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 13, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"__infer_globals_initializer_global.bdc08c089842ce08b974b22a75daf78e_1" -> "__infer_globals_initializer_global.bdc08c089842ce08b974b22a75daf78e_3" ;
|
|
|
|
"__infer_globals_initializer_global.bdc08c089842ce08b974b22a75daf78e_2" [label="2: Exit __infer_globals_initializer_global \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"__infer_globals_initializer_global.bdc08c089842ce08b974b22a75daf78e_3" [label="3: DeclStmt \n n$0=_fun_X_X(&#GB<codetoanalyze/cpp/frontend/globals/global_const1.cpp|!pod>$global:X const *) [line 13, column 9]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"__infer_globals_initializer_global.bdc08c089842ce08b974b22a75daf78e_3" -> "__infer_globals_initializer_global.bdc08c089842ce08b974b22a75daf78e_2" ;
|
|
|
|
"__infer_globals_initializer_v#708fabe5dc8ff523caaa5f44184921e8.588095fa475e4a9e8c83f50f26a48ea9_1" [label="1: Start __infer_globals_initializer_v\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 17, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"__infer_globals_initializer_v#708fabe5dc8ff523caaa5f44184921e8.588095fa475e4a9e8c83f50f26a48ea9_1" -> "__infer_globals_initializer_v#708fabe5dc8ff523caaa5f44184921e8.588095fa475e4a9e8c83f50f26a48ea9_3" ;
|
|
|
|
"__infer_globals_initializer_v#708fabe5dc8ff523caaa5f44184921e8.588095fa475e4a9e8c83f50f26a48ea9_2" [label="2: Exit __infer_globals_initializer_v \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"__infer_globals_initializer_v#708fabe5dc8ff523caaa5f44184921e8.588095fa475e4a9e8c83f50f26a48ea9_3" [label="3: DeclStmt \n *&#GB<codetoanalyze/cpp/frontend/globals/global_const1.cpp>$v:int=2 [line 17, column 1]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"__infer_globals_initializer_v#708fabe5dc8ff523caaa5f44184921e8.588095fa475e4a9e8c83f50f26a48ea9_3" -> "__infer_globals_initializer_v#708fabe5dc8ff523caaa5f44184921e8.588095fa475e4a9e8c83f50f26a48ea9_2" ;
|
|
|
|
"test#18241244337164948030.afc14f193ad97442f67ac7183be789bc_1" [label="1: Start test\nFormals: __return_param:X*\nLocals: \n DECLARE_LOCALS(&return); [line 15, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"test#18241244337164948030.afc14f193ad97442f67ac7183be789bc_1" -> "test#18241244337164948030.afc14f193ad97442f67ac7183be789bc_3" ;
|
|
|
|
"test#18241244337164948030.afc14f193ad97442f67ac7183be789bc_2" [label="2: Exit test \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"test#18241244337164948030.afc14f193ad97442f67ac7183be789bc_3" [label="3: Return Stmt \n n$0=*&__return_param:X* [line 15, column 12]\n n$1=_fun_X_X(n$0:X*,&#GB<codetoanalyze/cpp/frontend/globals/global_const1.cpp|!pod>$global:X const &) [line 15, column 19]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"test#18241244337164948030.afc14f193ad97442f67ac7183be789bc_3" -> "test#18241244337164948030.afc14f193ad97442f67ac7183be789bc_2" ;
|
|
|
|
"test2#3587805488049044947.69e45cfdc4e36a6f741ce3985858724b_1" [label="1: Start test2\nFormals: \nLocals: local:int \n DECLARE_LOCALS(&return,&local); [line 19, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"test2#3587805488049044947.69e45cfdc4e36a6f741ce3985858724b_1" -> "test2#3587805488049044947.69e45cfdc4e36a6f741ce3985858724b_4" ;
|
|
|
|
"test2#3587805488049044947.69e45cfdc4e36a6f741ce3985858724b_2" [label="2: Exit test2 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"test2#3587805488049044947.69e45cfdc4e36a6f741ce3985858724b_3" [label="3: Return Stmt \n n$0=*&#GB<codetoanalyze/cpp/frontend/globals/global_const1.cpp>$v:int [line 21, column 10]\n *&return:int=n$0 [line 21, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"test2#3587805488049044947.69e45cfdc4e36a6f741ce3985858724b_3" -> "test2#3587805488049044947.69e45cfdc4e36a6f741ce3985858724b_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
|
|
|
"test2#3587805488049044947.69e45cfdc4e36a6f741ce3985858724b_4" [label="4: DeclStmt \n n$2=*&#GB<codetoanalyze/cpp/frontend/globals/global_const1.cpp>$v:int [line 20, column 15]\n *&local:int=n$2 [line 20, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"test2#3587805488049044947.69e45cfdc4e36a6f741ce3985858724b_4" -> "test2#3587805488049044947.69e45cfdc4e36a6f741ce3985858724b_3" ;
|
|
|
|
"X#X#{11474741413113936247|constexpr}.31759ca8626d769f5d4e50690b180278_1" [label="1: Start X_X\nFormals: this:X* __param_0:X const &\nLocals: \n DECLARE_LOCALS(&return); [line 10, column 8]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"X#X#{11474741413113936247|constexpr}.31759ca8626d769f5d4e50690b180278_1" -> "X#X#{11474741413113936247|constexpr}.31759ca8626d769f5d4e50690b180278_2" ;
|
|
|
|
"X#X#{11474741413113936247|constexpr}.31759ca8626d769f5d4e50690b180278_2" [label="2: Exit X_X \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"X#X#{4951618003533511344}.a6c75b361b5e04dddb518f7e116a9ca2_1" [label="1: Start X_X\nFormals: this:X*\nLocals: \n DECLARE_LOCALS(&return); [line 11, column 3]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"X#X#{4951618003533511344}.a6c75b361b5e04dddb518f7e116a9ca2_1" -> "X#X#{4951618003533511344}.a6c75b361b5e04dddb518f7e116a9ca2_2" ;
|
|
|
|
"X#X#{4951618003533511344}.a6c75b361b5e04dddb518f7e116a9ca2_2" [label="2: Exit X_X \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
}
|