Skip to content

[SelectionDAG] Pass SDVTList instead of VTs to *SDNode constructors. NFC #89880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 38 additions & 35 deletions llvm/include/llvm/CodeGen/SelectionDAGNodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ class AddrSpaceCastSDNode : public SDNode {
unsigned DestAddrSpace;

public:
AddrSpaceCastSDNode(unsigned Order, const DebugLoc &dl, EVT VT,
AddrSpaceCastSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs,
unsigned SrcAS, unsigned DestAS);

unsigned getSrcAddressSpace() const { return SrcAddrSpace; }
Expand Down Expand Up @@ -1573,8 +1573,9 @@ class ShuffleVectorSDNode : public SDNode {
protected:
friend class SelectionDAG;

ShuffleVectorSDNode(EVT VT, unsigned Order, const DebugLoc &dl, const int *M)
: SDNode(ISD::VECTOR_SHUFFLE, Order, dl, getSDVTList(VT)), Mask(M) {}
ShuffleVectorSDNode(SDVTList VTs, unsigned Order, const DebugLoc &dl,
const int *M)
: SDNode(ISD::VECTOR_SHUFFLE, Order, dl, VTs), Mask(M) {}

public:
ArrayRef<int> getMask() const {
Expand Down Expand Up @@ -1628,9 +1629,10 @@ class ConstantSDNode : public SDNode {

const ConstantInt *Value;

ConstantSDNode(bool isTarget, bool isOpaque, const ConstantInt *val, EVT VT)
ConstantSDNode(bool isTarget, bool isOpaque, const ConstantInt *val,
SDVTList VTs)
: SDNode(isTarget ? ISD::TargetConstant : ISD::Constant, 0, DebugLoc(),
getSDVTList(VT)),
VTs),
Value(val) {
ConstantSDNodeBits.IsOpaque = isOpaque;
}
Expand Down Expand Up @@ -1681,9 +1683,9 @@ class ConstantFPSDNode : public SDNode {

const ConstantFP *Value;

ConstantFPSDNode(bool isTarget, const ConstantFP *val, EVT VT)
ConstantFPSDNode(bool isTarget, const ConstantFP *val, SDVTList VTs)
: SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP, 0,
DebugLoc(), getSDVTList(VT)),
DebugLoc(), VTs),
Value(val) {}

public:
Expand Down Expand Up @@ -1816,7 +1818,7 @@ class GlobalAddressSDNode : public SDNode {
unsigned TargetFlags;

GlobalAddressSDNode(unsigned Opc, unsigned Order, const DebugLoc &DL,
const GlobalValue *GA, EVT VT, int64_t o,
const GlobalValue *GA, SDVTList VTs, int64_t o,
unsigned TF);

public:
Expand All @@ -1839,10 +1841,10 @@ class FrameIndexSDNode : public SDNode {

int FI;

FrameIndexSDNode(int fi, EVT VT, bool isTarg)
: SDNode(isTarg ? ISD::TargetFrameIndex : ISD::FrameIndex,
0, DebugLoc(), getSDVTList(VT)), FI(fi) {
}
FrameIndexSDNode(int fi, SDVTList VTs, bool isTarg)
: SDNode(isTarg ? ISD::TargetFrameIndex : ISD::FrameIndex, 0, DebugLoc(),
VTs),
FI(fi) {}

public:
int getIndex() const { return FI; }
Expand Down Expand Up @@ -1917,10 +1919,10 @@ class JumpTableSDNode : public SDNode {
int JTI;
unsigned TargetFlags;

JumpTableSDNode(int jti, EVT VT, bool isTarg, unsigned TF)
: SDNode(isTarg ? ISD::TargetJumpTable : ISD::JumpTable,
0, DebugLoc(), getSDVTList(VT)), JTI(jti), TargetFlags(TF) {
}
JumpTableSDNode(int jti, SDVTList VTs, bool isTarg, unsigned TF)
: SDNode(isTarg ? ISD::TargetJumpTable : ISD::JumpTable, 0, DebugLoc(),
VTs),
JTI(jti), TargetFlags(TF) {}

public:
int getIndex() const { return JTI; }
Expand All @@ -1943,19 +1945,19 @@ class ConstantPoolSDNode : public SDNode {
Align Alignment; // Minimum alignment requirement of CP.
unsigned TargetFlags;

ConstantPoolSDNode(bool isTarget, const Constant *c, EVT VT, int o,
ConstantPoolSDNode(bool isTarget, const Constant *c, SDVTList VTs, int o,
Align Alignment, unsigned TF)
: SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, 0,
DebugLoc(), getSDVTList(VT)),
DebugLoc(), VTs),
Offset(o), Alignment(Alignment), TargetFlags(TF) {
assert(Offset >= 0 && "Offset is too large");
Val.ConstVal = c;
}

ConstantPoolSDNode(bool isTarget, MachineConstantPoolValue *v, EVT VT, int o,
Align Alignment, unsigned TF)
ConstantPoolSDNode(bool isTarget, MachineConstantPoolValue *v, SDVTList VTs,
int o, Align Alignment, unsigned TF)
: SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, 0,
DebugLoc(), getSDVTList(VT)),
DebugLoc(), VTs),
Offset(o), Alignment(Alignment), TargetFlags(TF) {
assert(Offset >= 0 && "Offset is too large");
Val.MachineCPVal = v;
Expand Down Expand Up @@ -2003,9 +2005,9 @@ class TargetIndexSDNode : public SDNode {
int64_t Offset;

public:
TargetIndexSDNode(int Idx, EVT VT, int64_t Ofs, unsigned TF)
: SDNode(ISD::TargetIndex, 0, DebugLoc(), getSDVTList(VT)),
TargetFlags(TF), Index(Idx), Offset(Ofs) {}
TargetIndexSDNode(int Idx, SDVTList VTs, int64_t Ofs, unsigned TF)
: SDNode(ISD::TargetIndex, 0, DebugLoc(), VTs), TargetFlags(TF),
Index(Idx), Offset(Ofs) {}

unsigned getTargetFlags() const { return TargetFlags; }
int getIndex() const { return Index; }
Expand Down Expand Up @@ -2215,8 +2217,8 @@ class RegisterSDNode : public SDNode {

Register Reg;

RegisterSDNode(Register reg, EVT VT)
: SDNode(ISD::Register, 0, DebugLoc(), getSDVTList(VT)), Reg(reg) {}
RegisterSDNode(Register reg, SDVTList VTs)
: SDNode(ISD::Register, 0, DebugLoc(), VTs), Reg(reg) {}

public:
Register getReg() const { return Reg; }
Expand Down Expand Up @@ -2251,10 +2253,10 @@ class BlockAddressSDNode : public SDNode {
int64_t Offset;
unsigned TargetFlags;

BlockAddressSDNode(unsigned NodeTy, EVT VT, const BlockAddress *ba,
BlockAddressSDNode(unsigned NodeTy, SDVTList VTs, const BlockAddress *ba,
int64_t o, unsigned Flags)
: SDNode(NodeTy, 0, DebugLoc(), getSDVTList(VT)),
BA(ba), Offset(o), TargetFlags(Flags) {}
: SDNode(NodeTy, 0, DebugLoc(), VTs), BA(ba), Offset(o),
TargetFlags(Flags) {}

public:
const BlockAddress *getBlockAddress() const { return BA; }
Expand Down Expand Up @@ -2292,9 +2294,10 @@ class ExternalSymbolSDNode : public SDNode {
const char *Symbol;
unsigned TargetFlags;

ExternalSymbolSDNode(bool isTarget, const char *Sym, unsigned TF, EVT VT)
ExternalSymbolSDNode(bool isTarget, const char *Sym, unsigned TF,
SDVTList VTs)
: SDNode(isTarget ? ISD::TargetExternalSymbol : ISD::ExternalSymbol, 0,
DebugLoc(), getSDVTList(VT)),
DebugLoc(), VTs),
Symbol(Sym), TargetFlags(TF) {}

public:
Expand All @@ -2312,8 +2315,8 @@ class MCSymbolSDNode : public SDNode {

MCSymbol *Symbol;

MCSymbolSDNode(MCSymbol *Symbol, EVT VT)
: SDNode(ISD::MCSymbol, 0, DebugLoc(), getSDVTList(VT)), Symbol(Symbol) {}
MCSymbolSDNode(MCSymbol *Symbol, SDVTList VTs)
: SDNode(ISD::MCSymbol, 0, DebugLoc(), VTs), Symbol(Symbol) {}

public:
MCSymbol *getMCSymbol() const { return Symbol; }
Expand Down Expand Up @@ -3026,8 +3029,8 @@ class AssertAlignSDNode : public SDNode {
Align Alignment;

public:
AssertAlignSDNode(unsigned Order, const DebugLoc &DL, EVT VT, Align A)
: SDNode(ISD::AssertAlign, Order, DL, getSDVTList(VT)), Alignment(A) {}
AssertAlignSDNode(unsigned Order, const DebugLoc &DL, SDVTList VTs, Align A)
: SDNode(ISD::AssertAlign, Order, DL, VTs), Alignment(A) {}

Align getAlign() const { return Alignment; }

Expand Down
Loading