Skip to content

Commit 8d248db

Browse files
committed
[DAGCombiner] Rename variables Demanded -> DemandedBits/DemandedElts. NFCI.
Use consistent variable names down the SimplifyDemanded* call stack so debugging isn't such a annoyance. llvm-svn: 357602
1 parent 24a7409 commit 8d248db

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -271,17 +271,17 @@ namespace {
271271
/// If so, return true.
272272
bool SimplifyDemandedBits(SDValue Op) {
273273
unsigned BitWidth = Op.getScalarValueSizeInBits();
274-
APInt Demanded = APInt::getAllOnesValue(BitWidth);
275-
return SimplifyDemandedBits(Op, Demanded);
274+
APInt DemandedBits = APInt::getAllOnesValue(BitWidth);
275+
return SimplifyDemandedBits(Op, DemandedBits);
276276
}
277277

278278
/// Check the specified vector node value to see if it can be simplified or
279279
/// if things it uses can be simplified as it only uses some of the
280280
/// elements. If so, return true.
281281
bool SimplifyDemandedVectorElts(SDValue Op) {
282282
unsigned NumElts = Op.getValueType().getVectorNumElements();
283-
APInt Demanded = APInt::getAllOnesValue(NumElts);
284-
return SimplifyDemandedVectorElts(Op, Demanded);
283+
APInt DemandedElts = APInt::getAllOnesValue(NumElts);
284+
return SimplifyDemandedVectorElts(Op, DemandedElts);
285285
}
286286

287287
bool SimplifyDemandedBits(SDValue Op, const APInt &Demanded);
@@ -1093,10 +1093,10 @@ CommitTargetLoweringOpt(const TargetLowering::TargetLoweringOpt &TLO) {
10931093

10941094
/// Check the specified integer node value to see if it can be simplified or if
10951095
/// things it uses can be simplified by bit propagation. If so, return true.
1096-
bool DAGCombiner::SimplifyDemandedBits(SDValue Op, const APInt &Demanded) {
1096+
bool DAGCombiner::SimplifyDemandedBits(SDValue Op, const APInt &DemandedBits) {
10971097
TargetLowering::TargetLoweringOpt TLO(DAG, LegalTypes, LegalOperations);
10981098
KnownBits Known;
1099-
if (!TLI.SimplifyDemandedBits(Op, Demanded, Known, TLO))
1099+
if (!TLI.SimplifyDemandedBits(Op, DemandedBits, Known, TLO))
11001100
return false;
11011101

11021102
// Revisit the node.
@@ -1115,12 +1115,13 @@ bool DAGCombiner::SimplifyDemandedBits(SDValue Op, const APInt &Demanded) {
11151115
/// Check the specified vector node value to see if it can be simplified or
11161116
/// if things it uses can be simplified as it only uses some of the elements.
11171117
/// If so, return true.
1118-
bool DAGCombiner::SimplifyDemandedVectorElts(SDValue Op, const APInt &Demanded,
1118+
bool DAGCombiner::SimplifyDemandedVectorElts(SDValue Op,
1119+
const APInt &DemandedElts,
11191120
bool AssumeSingleUse) {
11201121
TargetLowering::TargetLoweringOpt TLO(DAG, LegalTypes, LegalOperations);
11211122
APInt KnownUndef, KnownZero;
1122-
if (!TLI.SimplifyDemandedVectorElts(Op, Demanded, KnownUndef, KnownZero, TLO,
1123-
0, AssumeSingleUse))
1123+
if (!TLI.SimplifyDemandedVectorElts(Op, DemandedElts, KnownUndef, KnownZero,
1124+
TLO, 0, AssumeSingleUse))
11241125
return false;
11251126

11261127
// Revisit the node.

0 commit comments

Comments
 (0)