SDValue overloads operator ->, so SDValue.getNode()->func() can be written as SDValue->func()?
Grep .getNode()-> in llvm code base, there are many such usages.
I remove the unnecessary usage in the file DAGCombiner.cpp to get some feedback first.
Paths
| Differential D120049
[DAG] Remove unnecessary getNode() for SDValue type. NFC ClosedPublic Authored by shchenz on Feb 17 2022, 6:16 AM.
Details Summary SDValue overloads operator ->, so SDValue.getNode()->func() can be written as SDValue->func()? Grep .getNode()-> in llvm code base, there are many such usages.
Diff Detail
Event TimelineHerald added subscribers: ecnelises, steven.zhang, hiraditya. · View Herald TranscriptFeb 17 2022, 6:16 AM Comment Actions This seems fine to me. All of the calls to dump() can probably use . instead of ->
RKSimon retitled this revision from [DAG-ISEL]remove unnecessary getNode() for SDValue type. NFC to [DAG] Remove unnecessary getNode() for SDValue type. NFC.Feb 17 2022, 12:28 PM This revision is now accepted and ready to land.Feb 18 2022, 2:39 AM This revision was landed with ongoing or failed builds.Feb 20 2022, 6:10 PM Closed by commit rGefe5b8ad904b: [ISEL] remove unnecessary getNode(); NFC (authored by shchenz). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 410202 llvm/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
|
This one can be In.getConstantOperandVal(1) since we have a forwarding method for that.