38 #define DEBUG_TYPE "mips-isel" 47 void MipsSEDAGToDAGISel::getAnalysisUsage(
AnalysisUsage &AU)
const {
52 void MipsSEDAGToDAGISel::addDSPCtrlRegOperands(
bool IsDef,
MachineInstr &
MI,
60 MIB.
addReg(Mips::DSPPos, Flag);
63 MIB.
addReg(Mips::DSPSCount, Flag);
66 MIB.
addReg(Mips::DSPCarry, Flag);
69 MIB.
addReg(Mips::DSPOutFlag, Flag);
72 MIB.
addReg(Mips::DSPCCond, Flag);
75 MIB.
addReg(Mips::DSPEFI, Flag);
78 unsigned MipsSEDAGToDAGISel::getMSACtrlReg(
const SDValue RegIdx)
const {
79 switch (cast<ConstantSDNode>(RegIdx)->getZExtValue()) {
82 case 0:
return Mips::MSAIR;
83 case 1:
return Mips::MSACSR;
84 case 2:
return Mips::MSAAccess;
85 case 3:
return Mips::MSASave;
86 case 4:
return Mips::MSAModify;
87 case 5:
return Mips::MSARequest;
88 case 6:
return Mips::MSAMap;
89 case 7:
return Mips::MSAUnmap;
95 unsigned DstReg = 0, ZeroReg = 0;
103 ZeroReg = Mips::ZERO;
104 }
else if ((MI.
getOpcode() == Mips::DADDiu) &&
109 ZeroReg = Mips::ZERO_64;
119 unsigned OpNo = U.getOperandNo();
152 RC = (ABI.
IsN64()) ? &Mips::GPR64RegClass : &Mips::GPR32RegClass;
167 BuildMI(MBB, I, DL, TII.
get(Mips::DADDu), V1).addReg(V0)
224 .addReg(Mips::V0).
addReg(Mips::T9);
227 void MipsSEDAGToDAGISel::processFunctionAfterISel(
MachineFunction &MF) {
228 initGlobalBaseReg(MF);
232 for (
auto &MBB: MF) {
233 for (
auto &MI: MBB) {
236 addDSPCtrlRegOperands(
false, MI, MF);
239 addDSPCtrlRegOperands(
true, MI, MF);
242 replaceUsesWithZeroReg(MRI, MI);
248 void MipsSEDAGToDAGISel::selectAddE(
SDNode *Node,
const SDLoc &DL)
const {
257 SDValue Ops[3] = {LHS, RHS, InFlag};
298 SDValue InsOps[4] = {Zero, OuFlag, CstOne,
SDValue(DSPCFWithCarry, 0)};
302 SDValue(DSPCtrlFinal, 0), CstOne);
322 bool MipsSEDAGToDAGISel::selectAddrFrameIndexOffset(
324 unsigned ShiftAmount = 0)
const {
332 dyn_cast<FrameIndexSDNode>(Addr.
getOperand(0)))
352 bool MipsSEDAGToDAGISel::selectAddrRegImm(
SDValue Addr,
SDValue &Base,
355 if (selectAddrFrameIndex(Addr, Base, Offset))
372 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 16))
388 if (isa<ConstantPoolSDNode>(Opnd0) || isa<GlobalAddressSDNode>(Opnd0) ||
389 isa<JumpTableSDNode>(Opnd0)) {
402 bool MipsSEDAGToDAGISel::selectAddrDefault(
SDValue Addr,
SDValue &Base,
409 bool MipsSEDAGToDAGISel::selectIntAddr(
SDValue Addr,
SDValue &Base,
411 return selectAddrRegImm(Addr, Base, Offset) ||
412 selectAddrDefault(Addr, Base, Offset);
415 bool MipsSEDAGToDAGISel::selectAddrRegImm9(
SDValue Addr,
SDValue &Base,
417 if (selectAddrFrameIndex(Addr, Base, Offset))
420 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 9))
427 bool MipsSEDAGToDAGISel::selectAddrRegImm11(
SDValue Addr,
SDValue &Base,
429 if (selectAddrFrameIndex(Addr, Base, Offset))
432 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 11))
439 bool MipsSEDAGToDAGISel::selectAddrRegImm12(
SDValue Addr,
SDValue &Base,
441 if (selectAddrFrameIndex(Addr, Base, Offset))
444 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 12))
450 bool MipsSEDAGToDAGISel::selectAddrRegImm16(
SDValue Addr,
SDValue &Base,
452 if (selectAddrFrameIndex(Addr, Base, Offset))
455 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 16))
461 bool MipsSEDAGToDAGISel::selectIntAddr11MM(
SDValue Addr,
SDValue &Base,
463 return selectAddrRegImm11(Addr, Base, Offset) ||
464 selectAddrDefault(Addr, Base, Offset);
467 bool MipsSEDAGToDAGISel::selectIntAddr12MM(
SDValue Addr,
SDValue &Base,
469 return selectAddrRegImm12(Addr, Base, Offset) ||
470 selectAddrDefault(Addr, Base, Offset);
473 bool MipsSEDAGToDAGISel::selectIntAddr16MM(
SDValue Addr,
SDValue &Base,
475 return selectAddrRegImm16(Addr, Base, Offset) ||
476 selectAddrDefault(Addr, Base, Offset);
479 bool MipsSEDAGToDAGISel::selectIntAddrLSL2MM(
SDValue Addr,
SDValue &Base,
481 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 7)) {
482 if (isa<FrameIndexSDNode>(Base))
486 unsigned CnstOff = CN->getZExtValue();
487 return (CnstOff == (CnstOff & 0x3c));
495 if (selectAddrRegImm(Addr, Base, Offset))
498 return selectAddrDefault(Addr, Base, Offset);
501 bool MipsSEDAGToDAGISel::selectIntAddrSImm10(
SDValue Addr,
SDValue &Base,
504 if (selectAddrFrameIndex(Addr, Base, Offset))
507 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 10))
510 return selectAddrDefault(Addr, Base, Offset);
513 bool MipsSEDAGToDAGISel::selectIntAddrSImm10Lsl1(
SDValue Addr,
SDValue &Base,
515 if (selectAddrFrameIndex(Addr, Base, Offset))
518 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 10, 1))
521 return selectAddrDefault(Addr, Base, Offset);
524 bool MipsSEDAGToDAGISel::selectIntAddrSImm10Lsl2(
SDValue Addr,
SDValue &Base,
526 if (selectAddrFrameIndex(Addr, Base, Offset))
529 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 10, 2))
532 return selectAddrDefault(Addr, Base, Offset);
535 bool MipsSEDAGToDAGISel::selectIntAddrSImm10Lsl3(
SDValue Addr,
SDValue &Base,
537 if (selectAddrFrameIndex(Addr, Base, Offset))
540 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 10, 3))
543 return selectAddrDefault(Addr, Base, Offset);
551 bool MipsSEDAGToDAGISel::selectVSplat(
SDNode *
N,
APInt &Imm,
552 unsigned MinSizeInBits)
const {
561 APInt SplatValue, SplatUndef;
562 unsigned SplatBitSize;
565 if (!Node->
isConstantSplat(SplatValue, SplatUndef, SplatBitSize, HasAnyUndefs,
590 bool MipsSEDAGToDAGISel::
592 unsigned ImmBitSize)
const {
603 (!Signed && ImmValue.
isIntN(ImmBitSize))) {
613 bool MipsSEDAGToDAGISel::
615 return selectVSplatCommon(N, Imm,
false, 1);
618 bool MipsSEDAGToDAGISel::
620 return selectVSplatCommon(N, Imm,
false, 2);
623 bool MipsSEDAGToDAGISel::
625 return selectVSplatCommon(N, Imm,
false, 3);
629 bool MipsSEDAGToDAGISel::
631 return selectVSplatCommon(N, Imm,
false, 4);
635 bool MipsSEDAGToDAGISel::
637 return selectVSplatCommon(N, Imm,
false, 5);
641 bool MipsSEDAGToDAGISel::
643 return selectVSplatCommon(N, Imm,
false, 6);
647 bool MipsSEDAGToDAGISel::
649 return selectVSplatCommon(N, Imm,
false, 8);
653 bool MipsSEDAGToDAGISel::
655 return selectVSplatCommon(N, Imm,
true, 5);
668 bool MipsSEDAGToDAGISel::selectVSplatUimmPow2(
SDValue N,
SDValue &Imm)
const {
699 bool MipsSEDAGToDAGISel::selectVSplatMaskL(
SDValue N,
SDValue &Imm)
const {
711 if (ImmValue == ~(~ImmValue & ~(~ImmValue + 1))) {
733 bool MipsSEDAGToDAGISel::selectVSplatMaskR(
SDValue N,
SDValue &Imm)
const {
744 if (ImmValue == (ImmValue & ~(ImmValue + 1))) {
754 bool MipsSEDAGToDAGISel::selectVSplatUimmInvPow2(
SDValue N,
764 int32_t
Log2 = (~ImmValue).exactLogBase2();
775 bool MipsSEDAGToDAGISel::trySelect(
SDNode *Node) {
787 selectAddE(Node, DL);
826 AnalyzeImm.
Analyze(Imm, Size,
false);
837 if (Inst->Opc == Mips::LUi64)
846 for (++Inst; Inst != Seq.
end(); ++Inst) {
858 switch (cast<ConstantSDNode>(Node->
getOperand(1))->getZExtValue()) {
862 case Intrinsic::mips_cfcmsa: {
875 switch (cast<ConstantSDNode>(Node->
getOperand(0))->getZExtValue()) {
879 case Intrinsic::mips_move_v:
891 switch (cast<ConstantSDNode>(Node->
getOperand(1))->getZExtValue()) {
895 case Intrinsic::mips_ctcmsa: {
900 getMSACtrlReg(RegIdx), Value);
943 if (Pos + Size <= 32)
946 if (Pos + Size <= 32)
948 else if (Pos < 32 && 1 < Size)
949 Opcode = Mips::DINSM;
951 Opcode = Mips::DINSU;
968 unsigned RdhwrOpc, DestReg;
971 RdhwrOpc = Mips::RDHWR;
974 RdhwrOpc = Mips::RDHWR64;
975 DestReg = Mips::V1_64;
1006 APInt SplatValue, SplatUndef;
1007 unsigned SplatBitSize;
1021 switch (SplatBitSize) {
1025 LdiOp = Mips::LDI_B;
1029 LdiOp = Mips::LDI_H;
1033 LdiOp = Mips::LDI_W;
1037 LdiOp = Mips::LDI_D;
1048 if (SplatValue.isSignedIntN(10)) {
1053 }
else if (SplatValue.isSignedIntN(16) &&
1054 ((ABI.
IsO32() && SplatBitSize < 64) ||
1061 bool Is32BitSplat = ABI.
IsO32() || SplatBitSize < 64;
1062 const unsigned ADDiuOp = Is32BitSplat ? Mips::ADDiu : Mips::DADDiu;
1065 Is32BitSplat ? Mips::ZERO : Mips::ZERO_64, SplatMVT);
1067 const unsigned FILLOp =
1070 : (SplatBitSize == 32 ? Mips::FILL_W
1071 : (SplatBitSize == 64 ? Mips::FILL_D : 0));
1073 assert(FILLOp != 0 &&
"Unknown FILL Op for splat synthesis!");
1074 assert((!ABI.
IsO32() || (FILLOp != Mips::FILL_D)) &&
1075 "Attempting to use fill.d on MIPS32!");
1077 const unsigned Lo = SplatValue.getLoBits(16).getZExtValue();
1083 }
else if (SplatValue.isSignedIntN(32) && SplatBitSize == 32) {
1086 const unsigned Lo = SplatValue.getLoBits(16).getZExtValue();
1087 const unsigned Hi = SplatValue.lshr(16).getLoBits(16).getZExtValue();
1098 Hi ?
SDValue(Res, 0) : ZeroVal, LoVal);
1100 assert((Hi || Lo) &&
"Zero case reached 32 bit case splat synthesis!");
1103 }
else if (SplatValue.isSignedIntN(32) && SplatBitSize == 64 &&
1108 const unsigned Lo = SplatValue.getLoBits(16).getZExtValue();
1109 const unsigned Hi = SplatValue.lshr(16).getLoBits(16).getZExtValue();
1120 Hi ?
SDValue(Res, 0) : ZeroVal, LoVal);
1131 }
else if (SplatValue.isSignedIntN(64)) {
1157 const unsigned Lo = SplatValue.getLoBits(16).getZExtValue();
1158 const unsigned Hi = SplatValue.lshr(16).getLoBits(16).getZExtValue();
1159 const unsigned Higher = SplatValue.lshr(32).getLoBits(16).getZExtValue();
1160 const unsigned Highest = SplatValue.lshr(48).getLoBits(16).getZExtValue();
1189 Hi ?
SDValue(Res, 0) : ZeroVal, LoVal);
1197 Highest ?
SDValue(HiRes, 0) : ZeroVal,
1203 (Hi || Lo) ?
SDValue(Res, 0) : ZeroVal);
1207 (Highest || Higher) ?
SDValue(HiRes, 0) : ZeroVal,
1215 Mips::COPY_TO_REGCLASS, DL, ViaVecTy,
SDValue(Res, 0),
1224 const bool HiResNonZero = Highest ||
Higher;
1225 const bool ResNonZero = Hi ||
Lo;
1258 }
else if (HiResNonZero) {
1264 "Zero splat value handled by non-zero 64bit splat synthesis!");
1273 if (ResVecTy != ViaVecTy) {
1296 bool MipsSEDAGToDAGISel::
1297 SelectInlineAsmMemoryOperand(
const SDValue &
Op,
unsigned ConstraintID,
1298 std::vector<SDValue> &OutOps) {
1301 switch(ConstraintID) {
1306 OutOps.push_back(Op);
1310 if (selectAddrRegImm16(Op, Base, Offset)) {
1311 OutOps.push_back(Base);
1312 OutOps.push_back(Offset);
1315 OutOps.push_back(Op);
1324 if (selectAddrRegImm9(Op, Base, Offset)) {
1325 OutOps.push_back(Base);
1326 OutOps.push_back(Offset);
1329 OutOps.push_back(Op);
1337 if (selectAddrRegImm12(Op, Base, Offset)) {
1338 OutOps.push_back(Base);
1339 OutOps.push_back(Offset);
1344 if (selectAddrRegImm9(Op, Base, Offset)) {
1345 OutOps.push_back(Base);
1346 OutOps.push_back(Offset);
1349 }
else if (selectAddrRegImm16(Op, Base, Offset)) {
1351 OutOps.push_back(Base);
1352 OutOps.push_back(Offset);
1356 OutOps.push_back(Op);
BITCAST - This operator converts between integer, vector and FP values, as if the value was stored to...
SDNode * SelectNodeTo(SDNode *N, unsigned MachineOpc, EVT VT)
These are used for target selectors to mutate the specified node to have the specified return type...
EVT getValueType() const
Return the ValueType of the referenced return value.
MachineInstr * getParent()
getParent - Return the instruction that this operand belongs to.
unsigned getOpcode() const
Return the SelectionDAG opcode value for this node.
typename SuperClass::const_iterator const_iterator
const TargetRegisterClass * getRegClass(unsigned Reg) const
Return the register class of the specified virtual register.
bool isConstantSplat(APInt &SplatValue, APInt &SplatUndef, unsigned &SplatBitSize, bool &HasAnyUndefs, unsigned MinSplatBits=0, bool isBigEndian=false) const
Check if this is a constant splat, and if so, find the smallest element size that splats the vector...
Compute iterated dominance frontiers using a linear time algorithm.
FunctionPass * createMipsSEISelDag(MipsTargetMachine &TM, CodeGenOpt::Level OptLevel)
bool inMips16Mode() const
void addLiveIn(unsigned Reg, unsigned vreg=0)
addLiveIn - Add the specified register as a live-in.
Carry-setting nodes for multiple precision addition and subtraction.
EVT getValueType(unsigned ResNo) const
Return the type of a specified result.
unsigned getReg() const
getReg - Returns the register number.
MVT getSimpleVT() const
Return the SimpleValueType held in the specified simple EVT.
const MipsInstrInfo * getInstrInfo() const override
TargetGlobalAddress - Like GlobalAddress, but the DAG does no folding or anything else with this node...
unsigned getValueSizeInBits(unsigned ResNo) const
Returns MVT::getSizeInBits(getValueType(ResNo)).
virtual const TargetRegisterClass * getRegClassFor(MVT VT) const
Return the register class that should be used for the specified value type.
MVT getSimpleValueType(unsigned ResNo) const
Return the type of a specified result as a simple type.
SDNode * getNode() const
get the SDNode which holds the desired result
const MachineInstrBuilder & addGlobalAddress(const GlobalValue *GV, int64_t Offset=0, unsigned char TargetFlags=0) const
bool isImm() const
isImm - Tests if this is a MO_Immediate operand.
unsigned getBitWidth() const
Return the number of bits in the APInt.
return AArch64::GPR64RegClass contains(Reg)
RESULT,OUTCHAIN = INTRINSIC_W_CHAIN(INCHAIN, INTRINSICID, arg1, ...) This node represents a target in...
GlobalBaseReg - On Darwin, this node represents the result of the mflr at function entry...
AnalysisUsage & addRequired()
static use_iterator use_end()
This file declares the MachineConstantPool class which is an abstract constant pool to keep track of ...
bool globalBaseRegSet() const
bool inMicroMipsMode() const
const TargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
MachineSDNode * getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT)
These are used for target selectors to create a new node with specified return type(s), MachineInstr opcode, and operands.
const TargetLowering * TLI
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
SDValue getEntryNode() const
Return the token chain corresponding to the entry of the function.
const DataLayout & getDataLayout() const
unsigned getID() const
Return the register class ID number.
This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...
MO_ABS_HI/LO - Represents the hi or low part of an absolute symbol address.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
int64_t getSExtValue() const
unsigned getSizeInBits() const
Return the size of the specified value type in bits.
SDValue getTargetFrameIndex(int FI, EVT VT)
Simple integer binary arithmetic operators.
int32_t exactLogBase2() const
SDValue getTargetConstant(uint64_t Val, const SDLoc &DL, EVT VT, bool isOpaque=false)
RESULT = INTRINSIC_WO_CHAIN(INTRINSICID, arg1, arg2, ...) This node represents a target intrinsic fun...
Flag
These should be considered private to the implementation of the MCInstrDesc class.
BUILD_VECTOR(ELT0, ELT1, ELT2, ELT3,...) - Return a vector with the specified, possibly variable...
TargetInstrInfo - Interface to description of machine instruction set.
MachineRegisterInfo * RegInfo
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
OUTCHAIN = INTRINSIC_VOID(INCHAIN, INTRINSICID, arg1, arg2, ...) This node represents a target intrin...
CodeGenOpt::Level OptLevel
void addLiveIn(MCPhysReg PhysReg, LaneBitmask LaneMask=LaneBitmask::getAll())
Adds the specified register as a live in.
unsigned const MachineRegisterInfo * MRI
MVT getPointerTy(const DataLayout &DL, uint32_t AS=0) const
Return the pointer type for the given address space, defaults to the pointer type from the data layou...
unsigned countPopulation() const
Count the number of bits set.
const MipsSubtarget * Subtarget
Keep a pointer to the MipsSubtarget around so that we can make the right decision when generating cod...
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
bool isPseudo(QueryType Type=IgnoreBundle) const
Return true if this is a pseudo instruction that doesn't correspond to a real machine instruction...
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator begin()
const SDValue & getOperand(unsigned Num) const
Carry-using nodes for multiple precision addition and subtraction.
Represent the analysis usage information of a pass.
bool isExactlyValue(double V) const
We don't rely on operator== working on double values, as it returns true for things that are clearly ...
bool isBaseWithConstantOffset(SDValue Op) const
Return true if the specified operand is an ISD::ADD with a ConstantSDNode on the right-hand side...
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
FunctionPass class - This class is used to implement most global optimizations.
bool isRegTiedToDefOperand(unsigned UseOpIdx, unsigned *DefOpIdx=nullptr) const
Return true if the use operand of the specified index is tied to a def operand.
Class to represent integer types.
bool isIntN(unsigned N) const
Check if this APInt has an N-bits unsigned integer value.
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function. ...
bool isIntN(unsigned N, int64_t x)
Checks if an signed integer fits into the given (dynamic) bit width.
const MachineBasicBlock & front() const
unsigned getNumOperands() const
Return the number of values used by this operation.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static IntegerType * get(LLVMContext &C, unsigned NumBits)
This static method is the primary way of constructing an IntegerType.
This is the shared class of boolean and integer constants.
constexpr bool isInt< 32 >(int64_t x)
unsigned getGlobalBaseReg()
EVT getVectorElementType() const
Given a vector type, return the type of each element.
double Log2(double Value)
Return the log base 2 of the specified value.
MachineOperand class - Representation of each machine instruction operand.
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
static Constant * get(Type *Ty, uint64_t V, bool isSigned=false)
If Ty is a vector type, return a Constant with a splat of the given value.
Represents one node in the SelectionDAG.
SDValue getCopyToReg(SDValue Chain, const SDLoc &dl, unsigned Reg, SDValue N)
const Function & getFunction() const
Return the LLVM function that this machine code represents.
Class for arbitrary precision integers.
A "pseudo-class" with methods for operating on BUILD_VECTORs.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
Representation of each machine instruction.
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator end()
SDValue getCopyFromReg(SDValue Chain, const SDLoc &dl, unsigned Reg, EVT VT)
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
use_iterator use_begin(unsigned RegNo) const
bool is128BitVector() const
Return true if this is a 128-bit vector type.
bool isPositionIndependent() const
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode...
const MachineInstrBuilder & addExternalSymbol(const char *FnName, unsigned char TargetFlags=0) const
void setReg(unsigned Reg)
Change the register this operand corresponds to.
MipsFunctionInfo - This class is derived from MachineFunction private Mips target-specific informatio...
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
const MachineInstrBuilder & addReg(unsigned RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
MipsSEDAGToDAGISel(MipsTargetMachine &TM, CodeGenOpt::Level OL)
unsigned getOpcode() const
bool isSignedIntN(unsigned N) const
Check if this APInt has an N-bits signed integer value.
SDValue getConstant(uint64_t Val, const SDLoc &DL, EVT VT, bool isTarget=false, bool isOpaque=false)
Create a ConstantSDNode wrapping a constant value.
const TargetLowering * getTargetLowering() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
uint64_t getConstantOperandVal(unsigned Num) const
Helper method returns the integer value of a ConstantSDNode operand.
SDValue getRegister(unsigned Reg, EVT VT)
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
uint64_t OffsetToAlignment(uint64_t Value, uint64_t Align)
Returns the offset to the next integer (mod 2**64) that is greater than or equal to Value and is a mu...
void ReplaceNode(SDNode *F, SDNode *T)
Replace all uses of F with T, then remove F from the DAG.
Legacy analysis pass which computes a DominatorTree.
const SDValue & getOperand(unsigned i) const
uint64_t getZExtValue() const
const MachineOperand & getOperand(unsigned i) const
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation...
const TargetInstrInfo * TII
reg_begin/reg_end - Provide iteration support to walk over all definitions and uses of a register wit...
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
unsigned createVirtualRegister(const TargetRegisterClass *RegClass, StringRef Name="")
createVirtualRegister - Create and return a new virtual register in the function with the specified r...