Skip to content

Commit ac6e910

Browse files
committed
don't repeat function names in comments; NFC
llvm-svn: 256584
1 parent 0b996dd commit ac6e910

File tree

1 file changed

+47
-57
lines changed

1 file changed

+47
-57
lines changed

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Lines changed: 47 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ TargetLowering::makeLibCall(SelectionDAG &DAG,
116116
return LowerCallTo(CLI);
117117
}
118118

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.
121121
void TargetLowering::softenSetCCOperands(SelectionDAG &DAG, EVT VT,
122122
SDValue &NewLHS, SDValue &NewRHS,
123123
ISD::CondCode &CCCode,
@@ -231,9 +231,8 @@ void TargetLowering::softenSetCCOperands(SelectionDAG &DAG, EVT VT,
231231
}
232232
}
233233

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.
237236
unsigned TargetLowering::getJumpTableEncoding() const {
238237
// In non-pic modes, just use the address of a block.
239238
if (getTargetMachine().getRelocationModel() != Reloc::PIC_)
@@ -259,9 +258,8 @@ SDValue TargetLowering::getPICJumpTableRelocBase(SDValue Table,
259258
return Table;
260259
}
261260

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.
265263
const MCExpr *
266264
TargetLowering::getPICJumpTableRelocBaseExpr(const MachineFunction *MF,
267265
unsigned JTI,MCContext &Ctx) const{
@@ -288,10 +286,9 @@ TargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const {
288286
// Optimization Methods
289287
//===----------------------------------------------------------------------===//
290288

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.
295292
bool TargetLowering::TargetLoweringOpt::ShrinkDemandedConstant(SDValue Op,
296293
const APInt &Demanded) {
297294
SDLoc dl(Op);
@@ -326,10 +323,9 @@ bool TargetLowering::TargetLoweringOpt::ShrinkDemandedConstant(SDValue Op,
326323
return false;
327324
}
328325

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.
333329
bool
334330
TargetLowering::TargetLoweringOpt::ShrinkDemandedOp(SDValue Op,
335331
unsigned BitWidth,
@@ -375,13 +371,13 @@ TargetLowering::TargetLoweringOpt::ShrinkDemandedOp(SDValue Op,
375371
return false;
376372
}
377373

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.
385381
bool TargetLowering::SimplifyDemandedBits(SDValue Op,
386382
const APInt &DemandedMask,
387383
APInt &KnownZero,
@@ -1131,9 +1127,8 @@ bool TargetLowering::SimplifyDemandedBits(SDValue Op,
11311127
return false;
11321128
}
11331129

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.
11371132
void TargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
11381133
APInt &KnownZero,
11391134
APInt &KnownOne,
@@ -1148,9 +1143,8 @@ void TargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
11481143
KnownZero = KnownOne = APInt(KnownOne.getBitWidth(), 0);
11491144
}
11501145

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.
11541148
unsigned TargetLowering::ComputeNumSignBitsForTargetNode(SDValue Op,
11551149
const SelectionDAG &,
11561150
unsigned Depth) const {
@@ -1163,10 +1157,8 @@ unsigned TargetLowering::ComputeNumSignBitsForTargetNode(SDValue Op,
11631157
return 1;
11641158
}
11651159

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.
11701162
static bool ValueHasExactlyOneBitSet(SDValue Val, const SelectionDAG &DAG) {
11711163
// A left-shift of a constant one will have exactly one bit set, because
11721164
// shifting the bit off the end is undefined.
@@ -1250,8 +1242,8 @@ bool TargetLowering::isConstFalseVal(const SDNode *N) const {
12501242
return CN->isNullValue();
12511243
}
12521244

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.
12551247
SDValue
12561248
TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
12571249
ISD::CondCode Cond, bool foldBooleans,
@@ -2084,8 +2076,8 @@ TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
20842076
return SDValue();
20852077
}
20862078

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.
20892081
bool TargetLowering::isGAPlusOffset(SDNode *N, const GlobalValue *&GA,
20902082
int64_t &Offset) const {
20912083
if (auto *GASD = dyn_cast<GlobalAddressSDNode>(N)) {
@@ -2164,9 +2156,9 @@ TargetLowering::getConstraintType(StringRef Constraint) const {
21642156
return C_Unknown;
21652157
}
21662158

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.
21702162
const char *TargetLowering::LowerXConstraint(EVT ConstraintVT) const{
21712163
if (ConstraintVT.isInteger())
21722164
return "r";
@@ -2175,8 +2167,8 @@ const char *TargetLowering::LowerXConstraint(EVT ConstraintVT) const{
21752167
return nullptr;
21762168
}
21772169

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.
21802172
void TargetLowering::LowerAsmOperandForConstraint(SDValue Op,
21812173
std::string &Constraint,
21822174
std::vector<SDValue> &Ops,
@@ -2289,30 +2281,30 @@ TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *RI,
22892281
//===----------------------------------------------------------------------===//
22902282
// Constraint Selection.
22912283

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".
22942286
bool TargetLowering::AsmOperandInfo::isMatchingInputConstraint() const {
22952287
assert(!ConstraintCode.empty() && "No known constraint!");
22962288
return isdigit(static_cast<unsigned char>(ConstraintCode[0]));
22972289
}
22982290

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.
23012293
unsigned TargetLowering::AsmOperandInfo::getMatchedOperand() const {
23022294
assert(!ConstraintCode.empty() && "No known constraint!");
23032295
return atoi(ConstraintCode.c_str());
23042296
}
23052297

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.
23092301
/// If this returns an empty vector, and if the constraint string itself
23102302
/// isn't empty, there was an error parsing.
23112303
TargetLowering::AsmOperandInfoVector
23122304
TargetLowering::ParseConstraints(const DataLayout &DL,
23132305
const TargetRegisterInfo *TRI,
23142306
ImmutableCallSite CS) const {
2315-
/// ConstraintOperands - Information about all of the constraints.
2307+
/// Information about all of the constraints.
23162308
AsmOperandInfoVector ConstraintOperands;
23172309
const InlineAsm *IA = cast<InlineAsm>(CS.getCalledValue());
23182310
unsigned maCount = 0; // Largest number of multiple alternative constraints.
@@ -2493,8 +2485,7 @@ TargetLowering::ParseConstraints(const DataLayout &DL,
24932485
return ConstraintOperands;
24942486
}
24952487

2496-
/// getConstraintGenerality - Return an integer indicating how general CT
2497-
/// is.
2488+
/// Return an integer indicating how general CT is.
24982489
static unsigned getConstraintGenerality(TargetLowering::ConstraintType CT) {
24992490
switch (CT) {
25002491
case TargetLowering::C_Other:
@@ -2583,8 +2574,8 @@ TargetLowering::ConstraintWeight
25832574
return weight;
25842575
}
25852576

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.
25882579
/// This is somewhat tricky: constraints fall into four classes:
25892580
/// Other -> immediates and magic values
25902581
/// Register -> one specific register
@@ -2651,9 +2642,8 @@ static void ChooseConstraint(TargetLowering::AsmOperandInfo &OpInfo,
26512642
OpInfo.ConstraintType = BestType;
26522643
}
26532644

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.
26572647
void TargetLowering::ComputeConstraintToUse(AsmOperandInfo &OpInfo,
26582648
SDValue Op,
26592649
SelectionDAG *DAG) const {

0 commit comments

Comments
 (0)