]>
Commit | Line | Data |
---|---|---|
c63539ff ML |
1 | .. |
2 | Copyright 1988-2022 Free Software Foundation, Inc. | |
3 | This is part of the GCC manual. | |
4 | For copying conditions, see the copyright.rst file. | |
5 | ||
6 | .. index:: GIMPLE_COND | |
7 | ||
8 | GIMPLE_COND | |
9 | ^^^^^^^^^^^ | |
10 | ||
11 | .. function:: gcond *gimple_build_cond ( enum tree_code pred_code, tree lhs, tree rhs, tree t_label, tree f_label) | |
12 | ||
13 | Build a ``GIMPLE_COND`` statement. ``A`` ``GIMPLE_COND`` statement compares | |
14 | ``LHS`` and ``RHS`` and if the condition in ``PRED_CODE`` is true, jump to | |
15 | the label in ``t_label``, otherwise jump to the label in ``f_label``. | |
16 | ``PRED_CODE`` are relational operator tree codes like ``EQ_EXPR``, | |
17 | ``LT_EXPR``, ``LE_EXPR``, ``NE_EXPR``, etc. | |
18 | ||
19 | .. function:: gcond *gimple_build_cond_from_tree (tree cond, tree t_label, tree f_label) | |
20 | ||
21 | Build a ``GIMPLE_COND`` statement from the conditional expression | |
22 | tree ``COND``. ``T_LABEL`` and ``F_LABEL`` are as in ``gimple_build_cond``. | |
23 | ||
24 | .. function:: enum tree_code gimple_cond_code (gimple g) | |
25 | ||
26 | Return the code of the predicate computed by conditional | |
27 | statement ``G``. | |
28 | ||
29 | .. function:: void gimple_cond_set_code (gcond *g, enum tree_code code) | |
30 | ||
31 | Set ``CODE`` to be the predicate code for the conditional statement | |
32 | ``G``. | |
33 | ||
34 | .. function:: tree gimple_cond_lhs (gimple g) | |
35 | ||
36 | Return the ``LHS`` of the predicate computed by conditional statement | |
37 | ``G``. | |
38 | ||
39 | .. function:: void gimple_cond_set_lhs (gcond *g, tree lhs) | |
40 | ||
41 | Set ``LHS`` to be the ``LHS`` operand of the predicate computed by | |
42 | conditional statement ``G``. | |
43 | ||
44 | .. function:: tree gimple_cond_rhs (gimple g) | |
45 | ||
46 | Return the ``RHS`` operand of the predicate computed by conditional | |
47 | ``G``. | |
48 | ||
49 | .. function:: void gimple_cond_set_rhs (gcond *g, tree rhs) | |
50 | ||
51 | Set ``RHS`` to be the ``RHS`` operand of the predicate computed by | |
52 | conditional statement ``G``. | |
53 | ||
54 | .. function:: tree gimple_cond_true_label (const gcond *g) | |
55 | ||
56 | Return the label used by conditional statement ``G`` when its | |
57 | predicate evaluates to true. | |
58 | ||
59 | .. function:: void gimple_cond_set_true_label (gcond *g, tree label) | |
60 | ||
61 | Set ``LABEL`` to be the label used by conditional statement ``G`` when | |
62 | its predicate evaluates to true. | |
63 | ||
64 | .. function:: void gimple_cond_set_false_label (gcond *g, tree label) | |
65 | ||
66 | Set ``LABEL`` to be the label used by conditional statement ``G`` when | |
67 | its predicate evaluates to false. | |
68 | ||
69 | .. function:: tree gimple_cond_false_label (const gcond *g) | |
70 | ||
71 | Return the label used by conditional statement ``G`` when its | |
72 | predicate evaluates to false. | |
73 | ||
74 | .. function:: void gimple_cond_make_false (gcond *g) | |
75 | ||
76 | Set the conditional ``COND_STMT`` to be of the form 'if (1 == 0)'. | |
77 | ||
78 | .. function:: void gimple_cond_make_true (gcond *g) | |
79 | ||
3ed1b4ce | 80 | Set the conditional ``COND_STMT`` to be of the form 'if (1 == 1)'. |