|
|
|
/* @generated */
|
|
|
|
digraph cfg {
|
|
|
|
"using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_1" [label="1: Start using_ref\nFormals: \nLocals: q:int& r:int& vr:int& v:int \n DECLARE_LOCALS(&return,&q,&r,&vr,&v); [line 16, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_1" -> "using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_6" ;
|
|
|
|
"using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_2" [label="2: Exit using_ref \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
[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
|
|
|
"using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_3" [label="3: DeclStmt \n n$1=*&vr:int& [line 20, column 14]\n n$2=*n$1:int [line 20, column 12]\n *n$1:int=(n$2 - 1) [line 20, column 12]\n *&q:int&=n$1 [line 20, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_3" -> "using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_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
|
|
|
"using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_4" [label="4: DeclStmt \n n$3=*&vr:int& [line 19, column 14]\n n$4=*n$3:int [line 19, column 12]\n *n$3:int=(n$4 + 1) [line 19, column 12]\n *&r:int&=n$3 [line 19, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_4" -> "using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_3" ;
|
|
|
|
"using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_5" [label="5: DeclStmt \n *&vr:int&=&v [line 18, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_5" -> "using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_4" ;
|
|
|
|
"using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_6" [label="6: DeclStmt \n *&v:int=3 [line 17, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_6" -> "using_ref#11585308534136333375.096010b8466cdacb12ca24c30d2a7334_5" ;
|
|
|
|
"using_value#13692921440907975250.fad67099f85ea68eb3281c85bd0ca170_1" [label="1: Start using_value\nFormals: \nLocals: q:int& r:int& v:int \n DECLARE_LOCALS(&return,&q,&r,&v); [line 10, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"using_value#13692921440907975250.fad67099f85ea68eb3281c85bd0ca170_1" -> "using_value#13692921440907975250.fad67099f85ea68eb3281c85bd0ca170_5" ;
|
|
|
|
"using_value#13692921440907975250.fad67099f85ea68eb3281c85bd0ca170_2" [label="2: Exit using_value \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
[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
|
|
|
"using_value#13692921440907975250.fad67099f85ea68eb3281c85bd0ca170_3" [label="3: DeclStmt \n n$1=*&v:int [line 13, column 12]\n *&v:int=(n$1 - 1) [line 13, column 12]\n *&q:int&=&v [line 13, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"using_value#13692921440907975250.fad67099f85ea68eb3281c85bd0ca170_3" -> "using_value#13692921440907975250.fad67099f85ea68eb3281c85bd0ca170_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
|
|
|
"using_value#13692921440907975250.fad67099f85ea68eb3281c85bd0ca170_4" [label="4: DeclStmt \n n$2=*&v:int [line 12, column 12]\n *&v:int=(n$2 + 1) [line 12, column 12]\n *&r:int&=&v [line 12, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"using_value#13692921440907975250.fad67099f85ea68eb3281c85bd0ca170_4" -> "using_value#13692921440907975250.fad67099f85ea68eb3281c85bd0ca170_3" ;
|
|
|
|
"using_value#13692921440907975250.fad67099f85ea68eb3281c85bd0ca170_5" [label="5: DeclStmt \n *&v:int=3 [line 11, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"using_value#13692921440907975250.fad67099f85ea68eb3281c85bd0ca170_5" -> "using_value#13692921440907975250.fad67099f85ea68eb3281c85bd0ca170_4" ;
|
|
|
|
}
|