[llvm] c5dcb52 - [SelectionDAG] Move GlobalAddressSDNode and AddrSpaceCastSDNode constructors into header. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 13:12:15 PDT 2024
Author: Craig Topper
Date: 2024-04-24T13:11:57-07:00
New Revision: c5dcb5239e5a3ee68155ba2d09d1fa37ca512cd7
URL: https://github.com/llvm/llvm-project/commit/c5dcb5239e5a3ee68155ba2d09d1fa37ca512cd7
DIFF: https://github.com/llvm/llvm-project/commit/c5dcb5239e5a3ee68155ba2d09d1fa37ca512cd7.diff
LOG: [SelectionDAG] Move GlobalAddressSDNode and AddrSpaceCastSDNode constructors into header. NFC
These constructors are no more complicated than any of the other
*SDNode constructors that are already in the header.
Added:
Modified:
llvm/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
index 6dd16ef0e1e958..70d6b09a0c895c 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -1284,7 +1284,9 @@ class AddrSpaceCastSDNode : public SDNode {
public:
AddrSpaceCastSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs,
- unsigned SrcAS, unsigned DestAS);
+ unsigned SrcAS, unsigned DestAS)
+ : SDNode(ISD::ADDRSPACECAST, Order, dl, VTs), SrcAddrSpace(SrcAS),
+ DestAddrSpace(DestAS) {}
unsigned getSrcAddressSpace() const { return SrcAddrSpace; }
unsigned getDestAddressSpace() const { return DestAddrSpace; }
@@ -1819,7 +1821,9 @@ class GlobalAddressSDNode : public SDNode {
GlobalAddressSDNode(unsigned Opc, unsigned Order, const DebugLoc &DL,
const GlobalValue *GA, SDVTList VTs, int64_t o,
- unsigned TF);
+ unsigned TF)
+ : SDNode(Opc, Order, DL, VTs), TheGlobal(GA), Offset(o), TargetFlags(TF) {
+ }
public:
const GlobalValue *getGlobal() const { return TheGlobal; }
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 6f7fbd510f249c..5b7d6376d7d75b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -11807,20 +11807,6 @@ HandleSDNode::~HandleSDNode() {
DropOperands();
}
-GlobalAddressSDNode::GlobalAddressSDNode(unsigned Opc, unsigned Order,
- const DebugLoc &DL,
- const GlobalValue *GA, SDVTList VTs,
- int64_t o, unsigned TF)
- : SDNode(Opc, Order, DL, VTs), Offset(o), TargetFlags(TF) {
- TheGlobal = GA;
-}
-
-AddrSpaceCastSDNode::AddrSpaceCastSDNode(unsigned Order, const DebugLoc &dl,
- SDVTList VTs, unsigned SrcAS,
- unsigned DestAS)
- : SDNode(ISD::ADDRSPACECAST, Order, dl, VTs), SrcAddrSpace(SrcAS),
- DestAddrSpace(DestAS) {}
-
MemSDNode::MemSDNode(unsigned Opc, unsigned Order, const DebugLoc &dl,
SDVTList VTs, EVT memvt, MachineMemOperand *mmo)
: SDNode(Opc, Order, dl, VTs), MemoryVT(memvt), MMO(mmo) {
More information about the llvm-commits
mailing list