@@ -90,14 +90,14 @@ complicated behavior in a single node (rotate).
90
90
91
91
Add an enum value for the new SelectionDAG node.
92
92
93
- #. ``lib/CodeGen/SelectionDAG/SelectionDAG .cpp ``:
93
+ #. ``lib/CodeGen/SelectionDAG/SelectionDAGDumper .cpp ``:
94
94
95
95
Add code to print the node to ``getOperationName ``. If your new node can be
96
- evaluated at compile time when given constant arguments (such as an add of a
97
- constant with another constant), find the ``getNode `` method that takes the
98
- appropriate number of arguments, and add a case for your node to the switch
99
- statement that performs constant folding for nodes that take the same number
100
- of arguments as your new node.
96
+ evaluated at compile time when given constant arguments (such as an add of a
97
+ constant with another constant), find the ``getNode `` method that takes the
98
+ appropriate number of arguments, and add a case for your node to the switch
99
+ statement that performs constant folding for nodes that take the same number
100
+ of arguments as your new node.
101
101
102
102
#. ``lib/CodeGen/SelectionDAG/LegalizeDAG.cpp ``:
103
103
@@ -115,12 +115,12 @@ complicated behavior in a single node (rotate).
115
115
#. ``lib/CodeGen/SelectionDAG/LegalizeDAG.cpp ``:
116
116
117
117
If targets may support the new node being added only at certain sizes, you
118
- will also need to add code to your node's case statement in ``LegalizeOp ``
119
- to Promote your node's operands to a larger size, and perform the correct
120
- operation. You will also need to add code to ``PromoteOp `` to do this as
121
- well. For a good example, see ``ISD::BSWAP ``, which promotes its operand to
122
- a wider size, performs the byteswap, and then shifts the correct bytes right
123
- to emulate the narrower byteswap in the wider type.
118
+ will also need to add code to your node's case statement in ``LegalizeOp ``
119
+ to Promote your node's operands to a larger size, and perform the correct
120
+ operation. You will also need to add code to ``PromoteOp `` to do this as
121
+ well. For a good example, see ``ISD::BSWAP ``, which promotes its operand to
122
+ a wider size, performs the byteswap, and then shifts the correct bytes right
123
+ to emulate the narrower byteswap in the wider type.
124
124
125
125
#. ``lib/CodeGen/SelectionDAG/LegalizeDAG.cpp ``:
126
126
0 commit comments