diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-21 13:09:36 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-21 23:05:03 +0100 |
| commit | 45e0e859a9cf2d14546dd5597a777926087928f0 (patch) | |
| tree | ae6bd62a48241896b4708b704f37251973aecd50 /Documentation | |
| parent | 1221dc1c8c4299c57bb53a7b0b8a8e4e8729f9d6 (diff) | |
| download | sparse-dev-45e0e859a9cf2d14546dd5597a777926087928f0.tar.gz | |
add a new instruction for label-as-value
Convert OP_SETVAL of a label into a new instruction: OP_LABEL.
There is 2 reasons to do this:
*) there is slightly less checking to be done in later phases
(since OP_SETVAL can be for labels but also strings)
*) OP_SETVAL is CSEd but this is largely useless because this
instruction is hashed on the expression's address and these
are (most) often not shared. With a separate instruction
for label expressions, their CSE is now OK because the hashing
is done on the BB.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/IR.rst | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Documentation/IR.rst b/Documentation/IR.rst index 6330ee9c..38df84ff 100644 --- a/Documentation/IR.rst +++ b/Documentation/IR.rst @@ -352,13 +352,20 @@ Others * .type: type of the literal & .target .. op:: OP_SETVAL - Create a pseudo corresponding to a string literal or a label-as-value. - The value is given as an expression EXPR_STRING or EXPR_LABEL. + Create a pseudo corresponding to a string literal. + The value is given as an expression EXPR_STRING. * .val: (expression) input expression * .target: the resulting value * .type: type of .target, the value +.. op:: OP_LABEL + Create a pseudo corresponding to a label-as-value. + + * .bb_true: the BB corresponding to the label + * .target: the resulting value + * .type: type of .target (void \*) + .. op:: OP_PHI Phi-node (for SSA form). |
