@@ -116,8 +116,8 @@ TargetLowering::makeLibCall(SelectionDAG &DAG,
116
116
return LowerCallTo (CLI);
117
117
}
118
118
119
- // / SoftenSetCCOperands - Soften the operands of a comparison. This code is
120
- // / shared among BR_CC, SELECT_CC, and SETCC handlers.
119
+ // / Soften the operands of a comparison. This code is shared among BR_CC,
120
+ // / SELECT_CC, and SETCC handlers.
121
121
void TargetLowering::softenSetCCOperands (SelectionDAG &DAG, EVT VT,
122
122
SDValue &NewLHS, SDValue &NewRHS,
123
123
ISD::CondCode &CCCode,
@@ -231,9 +231,8 @@ void TargetLowering::softenSetCCOperands(SelectionDAG &DAG, EVT VT,
231
231
}
232
232
}
233
233
234
- // / getJumpTableEncoding - Return the entry encoding for a jump table in the
235
- // / current function. The returned value is a member of the
236
- // / MachineJumpTableInfo::JTEntryKind enum.
234
+ // / Return the entry encoding for a jump table in the current function. The
235
+ // / returned value is a member of the MachineJumpTableInfo::JTEntryKind enum.
237
236
unsigned TargetLowering::getJumpTableEncoding () const {
238
237
// In non-pic modes, just use the address of a block.
239
238
if (getTargetMachine ().getRelocationModel () != Reloc::PIC_)
@@ -259,9 +258,8 @@ SDValue TargetLowering::getPICJumpTableRelocBase(SDValue Table,
259
258
return Table;
260
259
}
261
260
262
- // / getPICJumpTableRelocBaseExpr - This returns the relocation base for the
263
- // / given PIC jumptable, the same as getPICJumpTableRelocBase, but as an
264
- // / MCExpr.
261
+ // / This returns the relocation base for the given PIC jumptable, the same as
262
+ // / getPICJumpTableRelocBase, but as an MCExpr.
265
263
const MCExpr *
266
264
TargetLowering::getPICJumpTableRelocBaseExpr (const MachineFunction *MF,
267
265
unsigned JTI,MCContext &Ctx) const {
@@ -288,10 +286,9 @@ TargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const {
288
286
// Optimization Methods
289
287
// ===----------------------------------------------------------------------===//
290
288
291
- // / ShrinkDemandedConstant - Check to see if the specified operand of the
292
- // / specified instruction is a constant integer. If so, check to see if there
293
- // / are any bits set in the constant that are not demanded. If so, shrink the
294
- // / constant and return true.
289
+ // / Check to see if the specified operand of the specified instruction is a
290
+ // / constant integer. If so, check to see if there are any bits set in the
291
+ // / constant that are not demanded. If so, shrink the constant and return true.
295
292
bool TargetLowering::TargetLoweringOpt::ShrinkDemandedConstant (SDValue Op,
296
293
const APInt &Demanded) {
297
294
SDLoc dl (Op);
@@ -326,10 +323,9 @@ bool TargetLowering::TargetLoweringOpt::ShrinkDemandedConstant(SDValue Op,
326
323
return false ;
327
324
}
328
325
329
- // / ShrinkDemandedOp - Convert x+y to (VT)((SmallVT)x+(SmallVT)y) if the
330
- // / casts are free. This uses isZExtFree and ZERO_EXTEND for the widening
331
- // / cast, but it could be generalized for targets with other types of
332
- // / implicit widening casts.
326
+ // / Convert x+y to (VT)((SmallVT)x+(SmallVT)y) if the casts are free.
327
+ // / This uses isZExtFree and ZERO_EXTEND for the widening cast, but it could be
328
+ // / generalized for targets with other types of implicit widening casts.
333
329
bool
334
330
TargetLowering::TargetLoweringOpt::ShrinkDemandedOp (SDValue Op,
335
331
unsigned BitWidth,
@@ -375,13 +371,13 @@ TargetLowering::TargetLoweringOpt::ShrinkDemandedOp(SDValue Op,
375
371
return false ;
376
372
}
377
373
378
- // / SimplifyDemandedBits - Look at Op. At this point, we know that only the
379
- // / DemandedMask bits of the result of Op are ever used downstream. If we can
380
- // / use this information to simplify Op, create a new simplified DAG node and
381
- // / return true, returning the original and new nodes in Old and New. Otherwise,
382
- // / analyze the expression and return a mask of KnownOne and KnownZero bits for
383
- // / the expression (used to simplify the caller). The KnownZero/One bits may
384
- // / only be accurate for those bits in the DemandedMask.
374
+ // / Look at Op. At this point, we know that only the DemandedMask bits of the
375
+ // / result of Op are ever used downstream. If we can use this information to
376
+ // / simplify Op, create a new simplified DAG node and return true, returning the
377
+ // / original and new nodes in Old and New. Otherwise, analyze the expression and
378
+ // / return a mask of KnownOne and KnownZero bits for the expression (used to
379
+ // / simplify the caller). The KnownZero/One bits may only be accurate for those
380
+ // / bits in the DemandedMask.
385
381
bool TargetLowering::SimplifyDemandedBits (SDValue Op,
386
382
const APInt &DemandedMask,
387
383
APInt &KnownZero,
@@ -1131,9 +1127,8 @@ bool TargetLowering::SimplifyDemandedBits(SDValue Op,
1131
1127
return false ;
1132
1128
}
1133
1129
1134
- // / computeKnownBitsForTargetNode - Determine which of the bits specified
1135
- // / in Mask are known to be either zero or one and return them in the
1136
- // / KnownZero/KnownOne bitsets.
1130
+ // / Determine which of the bits specified in Mask are known to be either zero or
1131
+ // / one and return them in the KnownZero/KnownOne bitsets.
1137
1132
void TargetLowering::computeKnownBitsForTargetNode (const SDValue Op,
1138
1133
APInt &KnownZero,
1139
1134
APInt &KnownOne,
@@ -1148,9 +1143,8 @@ void TargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
1148
1143
KnownZero = KnownOne = APInt (KnownOne.getBitWidth (), 0 );
1149
1144
}
1150
1145
1151
- // / ComputeNumSignBitsForTargetNode - This method can be implemented by
1152
- // / targets that want to expose additional information about sign bits to the
1153
- // / DAG Combiner.
1146
+ // / This method can be implemented by targets that want to expose additional
1147
+ // / information about sign bits to the DAG Combiner.
1154
1148
unsigned TargetLowering::ComputeNumSignBitsForTargetNode (SDValue Op,
1155
1149
const SelectionDAG &,
1156
1150
unsigned Depth) const {
@@ -1163,10 +1157,8 @@ unsigned TargetLowering::ComputeNumSignBitsForTargetNode(SDValue Op,
1163
1157
return 1 ;
1164
1158
}
1165
1159
1166
- // / ValueHasExactlyOneBitSet - Test if the given value is known to have exactly
1167
- // / one bit set. This differs from computeKnownBits in that it doesn't need to
1168
- // / determine which bit is set.
1169
- // /
1160
+ // / Test if the given value is known to have exactly one bit set. This differs
1161
+ // / from computeKnownBits in that it doesn't need to determine which bit is set.
1170
1162
static bool ValueHasExactlyOneBitSet (SDValue Val, const SelectionDAG &DAG) {
1171
1163
// A left-shift of a constant one will have exactly one bit set, because
1172
1164
// shifting the bit off the end is undefined.
@@ -1250,8 +1242,8 @@ bool TargetLowering::isConstFalseVal(const SDNode *N) const {
1250
1242
return CN->isNullValue ();
1251
1243
}
1252
1244
1253
- // / SimplifySetCC - Try to simplify a setcc built with the specified operands
1254
- // / and cc. If it is unable to simplify it, return a null SDValue.
1245
+ // / Try to simplify a setcc built with the specified operands and cc. If it is
1246
+ // / unable to simplify it, return a null SDValue.
1255
1247
SDValue
1256
1248
TargetLowering::SimplifySetCC (EVT VT, SDValue N0, SDValue N1,
1257
1249
ISD::CondCode Cond, bool foldBooleans,
@@ -2084,8 +2076,8 @@ TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
2084
2076
return SDValue ();
2085
2077
}
2086
2078
2087
- // / isGAPlusOffset - Returns true (and the GlobalValue and the offset) if the
2088
- // / node is a GlobalAddress + offset.
2079
+ // / Returns true (and the GlobalValue and the offset) if the node is a
2080
+ // / GlobalAddress + offset.
2089
2081
bool TargetLowering::isGAPlusOffset (SDNode *N, const GlobalValue *&GA,
2090
2082
int64_t &Offset) const {
2091
2083
if (auto *GASD = dyn_cast<GlobalAddressSDNode>(N)) {
@@ -2164,9 +2156,9 @@ TargetLowering::getConstraintType(StringRef Constraint) const {
2164
2156
return C_Unknown;
2165
2157
}
2166
2158
2167
- // / LowerXConstraint - try to replace an X constraint, which matches anything,
2168
- // / with another that has more specific requirements based on the type of the
2169
- // / corresponding operand.
2159
+ // / Try to replace an X constraint, which matches anything, with another that
2160
+ // / has more specific requirements based on the type of the corresponding
2161
+ // / operand.
2170
2162
const char *TargetLowering::LowerXConstraint (EVT ConstraintVT) const {
2171
2163
if (ConstraintVT.isInteger ())
2172
2164
return " r" ;
@@ -2175,8 +2167,8 @@ const char *TargetLowering::LowerXConstraint(EVT ConstraintVT) const{
2175
2167
return nullptr ;
2176
2168
}
2177
2169
2178
- // / LowerAsmOperandForConstraint - Lower the specified operand into the Ops
2179
- // / vector. If it is invalid, don't add anything to Ops.
2170
+ // / Lower the specified operand into the Ops vector.
2171
+ // / If it is invalid, don't add anything to Ops.
2180
2172
void TargetLowering::LowerAsmOperandForConstraint (SDValue Op,
2181
2173
std::string &Constraint,
2182
2174
std::vector<SDValue> &Ops,
@@ -2289,30 +2281,30 @@ TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *RI,
2289
2281
// ===----------------------------------------------------------------------===//
2290
2282
// Constraint Selection.
2291
2283
2292
- // / isMatchingInputConstraint - Return true of this is an input operand that is
2293
- // / a matching constraint like "4".
2284
+ // / Return true of this is an input operand that is a matching constraint like
2285
+ // / "4".
2294
2286
bool TargetLowering::AsmOperandInfo::isMatchingInputConstraint () const {
2295
2287
assert (!ConstraintCode.empty () && " No known constraint!" );
2296
2288
return isdigit (static_cast <unsigned char >(ConstraintCode[0 ]));
2297
2289
}
2298
2290
2299
- // / getMatchedOperand - If this is an input matching constraint, this method
2300
- // / returns the output operand it matches.
2291
+ // / If this is an input matching constraint, this method returns the output
2292
+ // / operand it matches.
2301
2293
unsigned TargetLowering::AsmOperandInfo::getMatchedOperand () const {
2302
2294
assert (!ConstraintCode.empty () && " No known constraint!" );
2303
2295
return atoi (ConstraintCode.c_str ());
2304
2296
}
2305
2297
2306
- // / ParseConstraints - Split up the constraint string from the inline
2307
- // / assembly value into the specific constraints and their prefixes,
2308
- // / and also tie in the associated operand values.
2298
+ // / Split up the constraint string from the inline assembly value into the
2299
+ // / specific constraints and their prefixes, and also tie in the associated
2300
+ // / operand values.
2309
2301
// / If this returns an empty vector, and if the constraint string itself
2310
2302
// / isn't empty, there was an error parsing.
2311
2303
TargetLowering::AsmOperandInfoVector
2312
2304
TargetLowering::ParseConstraints (const DataLayout &DL,
2313
2305
const TargetRegisterInfo *TRI,
2314
2306
ImmutableCallSite CS) const {
2315
- // / ConstraintOperands - Information about all of the constraints.
2307
+ // / Information about all of the constraints.
2316
2308
AsmOperandInfoVector ConstraintOperands;
2317
2309
const InlineAsm *IA = cast<InlineAsm>(CS.getCalledValue ());
2318
2310
unsigned maCount = 0 ; // Largest number of multiple alternative constraints.
@@ -2493,8 +2485,7 @@ TargetLowering::ParseConstraints(const DataLayout &DL,
2493
2485
return ConstraintOperands;
2494
2486
}
2495
2487
2496
- // / getConstraintGenerality - Return an integer indicating how general CT
2497
- // / is.
2488
+ // / Return an integer indicating how general CT is.
2498
2489
static unsigned getConstraintGenerality (TargetLowering::ConstraintType CT) {
2499
2490
switch (CT) {
2500
2491
case TargetLowering::C_Other:
@@ -2583,8 +2574,8 @@ TargetLowering::ConstraintWeight
2583
2574
return weight;
2584
2575
}
2585
2576
2586
- // / ChooseConstraint - If there are multiple different constraints that we
2587
- // / could pick for this operand (e.g. "imr") try to pick the 'best' one.
2577
+ // / If there are multiple different constraints that we could pick for this
2578
+ // / operand (e.g. "imr") try to pick the 'best' one.
2588
2579
// / This is somewhat tricky: constraints fall into four classes:
2589
2580
// / Other -> immediates and magic values
2590
2581
// / Register -> one specific register
@@ -2651,9 +2642,8 @@ static void ChooseConstraint(TargetLowering::AsmOperandInfo &OpInfo,
2651
2642
OpInfo.ConstraintType = BestType;
2652
2643
}
2653
2644
2654
- // / ComputeConstraintToUse - Determines the constraint code and constraint
2655
- // / type to use for the specific AsmOperandInfo, setting
2656
- // / OpInfo.ConstraintCode and OpInfo.ConstraintType.
2645
+ // / Determines the constraint code and constraint type to use for the specific
2646
+ // / AsmOperandInfo, setting OpInfo.ConstraintCode and OpInfo.ConstraintType.
2657
2647
void TargetLowering::ComputeConstraintToUse (AsmOperandInfo &OpInfo,
2658
2648
SDValue Op,
2659
2649
SelectionDAG *DAG) const {
0 commit comments