Skip to content

Commit c5dcb52

Browse files
committed
[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.
1 parent 11bd19a commit c5dcb52

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

llvm/include/llvm/CodeGen/SelectionDAGNodes.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,9 @@ class AddrSpaceCastSDNode : public SDNode {
12841284

12851285
public:
12861286
AddrSpaceCastSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs,
1287-
unsigned SrcAS, unsigned DestAS);
1287+
unsigned SrcAS, unsigned DestAS)
1288+
: SDNode(ISD::ADDRSPACECAST, Order, dl, VTs), SrcAddrSpace(SrcAS),
1289+
DestAddrSpace(DestAS) {}
12881290

12891291
unsigned getSrcAddressSpace() const { return SrcAddrSpace; }
12901292
unsigned getDestAddressSpace() const { return DestAddrSpace; }
@@ -1819,7 +1821,9 @@ class GlobalAddressSDNode : public SDNode {
18191821

18201822
GlobalAddressSDNode(unsigned Opc, unsigned Order, const DebugLoc &DL,
18211823
const GlobalValue *GA, SDVTList VTs, int64_t o,
1822-
unsigned TF);
1824+
unsigned TF)
1825+
: SDNode(Opc, Order, DL, VTs), TheGlobal(GA), Offset(o), TargetFlags(TF) {
1826+
}
18231827

18241828
public:
18251829
const GlobalValue *getGlobal() const { return TheGlobal; }

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11807,20 +11807,6 @@ HandleSDNode::~HandleSDNode() {
1180711807
DropOperands();
1180811808
}
1180911809

11810-
GlobalAddressSDNode::GlobalAddressSDNode(unsigned Opc, unsigned Order,
11811-
const DebugLoc &DL,
11812-
const GlobalValue *GA, SDVTList VTs,
11813-
int64_t o, unsigned TF)
11814-
: SDNode(Opc, Order, DL, VTs), Offset(o), TargetFlags(TF) {
11815-
TheGlobal = GA;
11816-
}
11817-
11818-
AddrSpaceCastSDNode::AddrSpaceCastSDNode(unsigned Order, const DebugLoc &dl,
11819-
SDVTList VTs, unsigned SrcAS,
11820-
unsigned DestAS)
11821-
: SDNode(ISD::ADDRSPACECAST, Order, dl, VTs), SrcAddrSpace(SrcAS),
11822-
DestAddrSpace(DestAS) {}
11823-
1182411810
MemSDNode::MemSDNode(unsigned Opc, unsigned Order, const DebugLoc &dl,
1182511811
SDVTList VTs, EVT memvt, MachineMemOperand *mmo)
1182611812
: SDNode(Opc, Order, dl, VTs), MemoryVT(memvt), MMO(mmo) {

0 commit comments

Comments
 (0)