|
29 | 29 |
|
30 | 30 | namespace llvm { |
31 | 31 |
|
32 | | -namespace HexagonISD { |
33 | | - |
34 | | -enum NodeType : unsigned { |
35 | | - OP_BEGIN = ISD::BUILTIN_OP_END, |
36 | | - |
37 | | - CONST32 = OP_BEGIN, |
38 | | - CONST32_GP, // For marking data present in GP. |
39 | | - ADDC, // Add with carry: (X, Y, Cin) -> (X+Y, Cout). |
40 | | - SUBC, // Sub with carry: (X, Y, Cin) -> (X+~Y+Cin, Cout). |
41 | | - ALLOCA, |
42 | | - |
43 | | - AT_GOT, // Index in GOT. |
44 | | - AT_PCREL, // Offset relative to PC. |
45 | | - |
46 | | - CALL, // Function call. |
47 | | - CALLnr, // Function call that does not return. |
48 | | - CALLR, |
49 | | - |
50 | | - RET_GLUE, // Return with a glue operand. |
51 | | - BARRIER, // Memory barrier. |
52 | | - JT, // Jump table. |
53 | | - CP, // Constant pool. |
54 | | - |
55 | | - COMBINE, |
56 | | - VASL, // Vector shifts by a scalar value |
57 | | - VASR, |
58 | | - VLSR, |
59 | | - MFSHL, // Funnel shifts with the shift amount guaranteed to be |
60 | | - MFSHR, // within the range of the bit width of the element. |
61 | | - |
62 | | - SSAT, // Signed saturate. |
63 | | - USAT, // Unsigned saturate. |
64 | | - SMUL_LOHI, // Same as ISD::SMUL_LOHI, but opaque to the combiner. |
65 | | - UMUL_LOHI, // Same as ISD::UMUL_LOHI, but opaque to the combiner. |
66 | | - // We want to legalize MULH[SU] to [SU]MUL_LOHI, but the |
67 | | - // combiner will keep rewriting it back to MULH[SU]. |
68 | | - USMUL_LOHI, // Like SMUL_LOHI, but unsigned*signed. |
69 | | - |
70 | | - TSTBIT, |
71 | | - INSERT, |
72 | | - EXTRACTU, |
73 | | - VEXTRACTW, |
74 | | - VINSERTW0, |
75 | | - VROR, |
76 | | - TC_RETURN, |
77 | | - EH_RETURN, |
78 | | - DCFETCH, |
79 | | - READCYCLE, |
80 | | - READTIMER, |
81 | | - PTRUE, |
82 | | - PFALSE, |
83 | | - D2P, // Convert 8-byte value to 8-bit predicate register. [*] |
84 | | - P2D, // Convert 8-bit predicate register to 8-byte value. [*] |
85 | | - V2Q, // Convert HVX vector to a vector predicate reg. [*] |
86 | | - Q2V, // Convert vector predicate to an HVX vector. [*] |
87 | | - // [*] The equivalence is defined as "Q <=> (V != 0)", |
88 | | - // where the != operation compares bytes. |
89 | | - // Note: V != 0 is implemented as V >u 0. |
90 | | - QCAT, |
91 | | - QTRUE, |
92 | | - QFALSE, |
93 | | - |
94 | | - TL_EXTEND, // Wrappers for ISD::*_EXTEND and ISD::TRUNCATE to prevent DAG |
95 | | - TL_TRUNCATE, // from auto-folding operations, e.g. |
96 | | - // (i32 ext (i16 ext i8)) would be folded to (i32 ext i8). |
97 | | - // To simplify the type legalization, we want to keep these |
98 | | - // single steps separate during type legalization. |
99 | | - // TL_[EXTEND|TRUNCATE] Inp, i128 _, i32 Opc |
100 | | - // * Inp is the original input to extend/truncate, |
101 | | - // * _ is a dummy operand with an illegal type (can be undef), |
102 | | - // * Opc is the original opcode. |
103 | | - // The legalization process (in Hexagon lowering code) will |
104 | | - // first deal with the "real" types (i.e. Inp and the result), |
105 | | - // and once all of them are processed, the wrapper node will |
106 | | - // be replaced with the original ISD node. The dummy illegal |
107 | | - // operand is there to make sure that the legalization hooks |
108 | | - // are called again after everything else is legal, giving |
109 | | - // us the opportunity to undo the wrapping. |
110 | | - |
111 | | - TYPECAST, // No-op that's used to convert between different legal |
112 | | - // types in a register. |
113 | | - VALIGN, // Align two vectors (in Op0, Op1) to one that would have |
114 | | - // been loaded from address in Op2. |
115 | | - VALIGNADDR, // Align vector address: Op0 & -Op1, except when it is |
116 | | - // an address in a vector load, then it's a no-op. |
117 | | - ISEL, // Marker for nodes that were created during ISel, and |
118 | | - // which need explicit selection (would have been left |
119 | | - // unselected otherwise). |
120 | | - OP_END |
121 | | -}; |
122 | | - |
123 | | -} // end namespace HexagonISD |
124 | | - |
125 | 32 | class HexagonSubtarget; |
126 | 33 |
|
127 | 34 | class HexagonTargetLowering : public TargetLowering { |
@@ -182,8 +89,6 @@ class HexagonTargetLowering : public TargetLowering { |
182 | 89 | void ReplaceNodeResults(SDNode *N, SmallVectorImpl<SDValue> &Results, |
183 | 90 | SelectionDAG &DAG) const override; |
184 | 91 |
|
185 | | - const char *getTargetNodeName(unsigned Opcode) const override; |
186 | | - |
187 | 92 | SDValue LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const; |
188 | 93 | SDValue LowerCONCAT_VECTORS(SDValue Op, SelectionDAG &DAG) const; |
189 | 94 | SDValue LowerEXTRACT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const; |
|
0 commit comments