Skip to content

Commit 4ca4287

Browse files
authored
[SelectionDAG] Replace findGlueUse in SelectionDAGISel with SDNode::getGluedUser. NFC (#120512)
1 parent 5c55f96 commit 4ca4287

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2329,19 +2329,6 @@ void SelectionDAGISel::SelectInlineAsmMemoryOperands(std::vector<SDValue> &Ops,
23292329
Ops.push_back(handle.getValue());
23302330
}
23312331

2332-
/// findGlueUse - Return use of MVT::Glue value produced by the specified
2333-
/// SDNode.
2334-
///
2335-
static SDNode *findGlueUse(SDNode *N) {
2336-
unsigned FlagResNo = N->getNumValues()-1;
2337-
for (SDNode::use_iterator I = N->use_begin(), E = N->use_end(); I != E; ++I) {
2338-
SDUse &Use = I.getUse();
2339-
if (Use.getResNo() == FlagResNo)
2340-
return Use.getUser();
2341-
}
2342-
return nullptr;
2343-
}
2344-
23452332
/// findNonImmUse - Return true if "Def" is a predecessor of "Root" via a path
23462333
/// beyond "ImmedUse". We may ignore chains as they are checked separately.
23472334
static bool findNonImmUse(SDNode *Root, SDNode *Def, SDNode *ImmedUse,
@@ -2445,7 +2432,7 @@ bool SelectionDAGISel::IsLegalToFold(SDValue N, SDNode *U, SDNode *Root,
24452432
// glueged set.
24462433
EVT VT = Root->getValueType(Root->getNumValues()-1);
24472434
while (VT == MVT::Glue) {
2448-
SDNode *GU = findGlueUse(Root);
2435+
SDNode *GU = Root->getGluedUser();
24492436
if (!GU)
24502437
break;
24512438
Root = GU;

0 commit comments

Comments
 (0)