30 #include "llvm/IR/IntrinsicsMips.h" 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 uint64_t RegNum = cast<ConstantSDNode>(RegIdx)->getZExtValue();
80 return Mips::MSACtrlRegClass.getRegister(RegNum);
85 unsigned DstReg = 0, ZeroReg = 0;
94 }
else if ((MI.
getOpcode() == Mips::DADDiu) &&
99 ZeroReg = Mips::ZERO_64;
109 unsigned OpNo = U.getOperandNo();
155 void MipsSEDAGToDAGISel::processFunctionAfterISel(
MachineFunction &MF) {
160 for (
auto &MBB: MF) {
161 for (
auto &MI: MBB) {
164 addDSPCtrlRegOperands(
false, MI, MF);
167 addDSPCtrlRegOperands(
true, MI, MF);
169 case Mips::BuildPairF64_64:
170 case Mips::ExtractElementF64_64:
185 emitMCountABI(MI, MBB, MF);
187 case Mips::JALRPseudo:
188 case Mips::JALR64Pseudo:
189 case Mips::JALR16_MM:
192 emitMCountABI(MI, MBB, MF);
197 emitMCountABI(MI, MBB, MF);
200 replaceUsesWithZeroReg(MRI, MI);
206 void MipsSEDAGToDAGISel::selectAddE(
SDNode *Node,
const SDLoc &DL)
const {
215 SDValue Ops[3] = {LHS, RHS, InFlag};
256 SDValue InsOps[4] = {Zero, OuFlag, CstOne,
SDValue(DSPCFWithCarry, 0)};
261 SDValue(DSPCtrlFinal, 0), CstOne);
281 bool MipsSEDAGToDAGISel::selectAddrFrameIndexOffset(
283 unsigned ShiftAmount = 0)
const {
291 dyn_cast<FrameIndexSDNode>(Addr.
getOperand(0)))
297 const Align Alignment(1ULL << ShiftAmount);
312 bool MipsSEDAGToDAGISel::selectAddrRegImm(
SDValue Addr,
SDValue &Base,
315 if (selectAddrFrameIndex(Addr, Base, Offset))
332 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 16))
348 if (isa<ConstantPoolSDNode>(Opnd0) || isa<GlobalAddressSDNode>(Opnd0) ||
349 isa<JumpTableSDNode>(Opnd0)) {
362 bool MipsSEDAGToDAGISel::selectAddrDefault(
SDValue Addr,
SDValue &Base,
369 bool MipsSEDAGToDAGISel::selectIntAddr(
SDValue Addr,
SDValue &Base,
371 return selectAddrRegImm(Addr, Base, Offset) ||
372 selectAddrDefault(Addr, Base, Offset);
375 bool MipsSEDAGToDAGISel::selectAddrRegImm9(
SDValue Addr,
SDValue &Base,
377 if (selectAddrFrameIndex(Addr, Base, Offset))
380 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 9))
387 bool MipsSEDAGToDAGISel::selectAddrRegImm11(
SDValue Addr,
SDValue &Base,
389 if (selectAddrFrameIndex(Addr, Base, Offset))
392 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 11))
399 bool MipsSEDAGToDAGISel::selectAddrRegImm12(
SDValue Addr,
SDValue &Base,
401 if (selectAddrFrameIndex(Addr, Base, Offset))
404 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 12))
410 bool MipsSEDAGToDAGISel::selectAddrRegImm16(
SDValue Addr,
SDValue &Base,
412 if (selectAddrFrameIndex(Addr, Base, Offset))
415 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 16))
421 bool MipsSEDAGToDAGISel::selectIntAddr11MM(
SDValue Addr,
SDValue &Base,
423 return selectAddrRegImm11(Addr, Base, Offset) ||
424 selectAddrDefault(Addr, Base, Offset);
427 bool MipsSEDAGToDAGISel::selectIntAddr12MM(
SDValue Addr,
SDValue &Base,
429 return selectAddrRegImm12(Addr, Base, Offset) ||
430 selectAddrDefault(Addr, Base, Offset);
433 bool MipsSEDAGToDAGISel::selectIntAddr16MM(
SDValue Addr,
SDValue &Base,
435 return selectAddrRegImm16(Addr, Base, Offset) ||
436 selectAddrDefault(Addr, Base, Offset);
439 bool MipsSEDAGToDAGISel::selectIntAddrLSL2MM(
SDValue Addr,
SDValue &Base,
441 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 7)) {
442 if (isa<FrameIndexSDNode>(Base))
446 unsigned CnstOff = CN->getZExtValue();
447 return (CnstOff == (CnstOff & 0x3c));
455 if (selectAddrRegImm(Addr, Base, Offset))
458 return selectAddrDefault(Addr, Base, Offset);
461 bool MipsSEDAGToDAGISel::selectIntAddrSImm10(
SDValue Addr,
SDValue &Base,
464 if (selectAddrFrameIndex(Addr, Base, Offset))
467 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 10))
470 return selectAddrDefault(Addr, Base, Offset);
473 bool MipsSEDAGToDAGISel::selectIntAddrSImm10Lsl1(
SDValue Addr,
SDValue &Base,
475 if (selectAddrFrameIndex(Addr, Base, Offset))
478 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 10, 1))
481 return selectAddrDefault(Addr, Base, Offset);
484 bool MipsSEDAGToDAGISel::selectIntAddrSImm10Lsl2(
SDValue Addr,
SDValue &Base,
486 if (selectAddrFrameIndex(Addr, Base, Offset))
489 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 10, 2))
492 return selectAddrDefault(Addr, Base, Offset);
495 bool MipsSEDAGToDAGISel::selectIntAddrSImm10Lsl3(
SDValue Addr,
SDValue &Base,
497 if (selectAddrFrameIndex(Addr, Base, Offset))
500 if (selectAddrFrameIndexOffset(Addr, Base, Offset, 10, 3))
503 return selectAddrDefault(Addr, Base, Offset);
511 bool MipsSEDAGToDAGISel::selectVSplat(
SDNode *
N,
APInt &Imm,
512 unsigned MinSizeInBits)
const {
521 APInt SplatValue, SplatUndef;
522 unsigned SplatBitSize;
525 if (!Node->
isConstantSplat(SplatValue, SplatUndef, SplatBitSize, HasAnyUndefs,
550 bool MipsSEDAGToDAGISel::
552 unsigned ImmBitSize)
const {
563 (!Signed && ImmValue.
isIntN(ImmBitSize))) {
573 bool MipsSEDAGToDAGISel::
575 return selectVSplatCommon(N, Imm,
false, 1);
578 bool MipsSEDAGToDAGISel::
580 return selectVSplatCommon(N, Imm,
false, 2);
583 bool MipsSEDAGToDAGISel::
585 return selectVSplatCommon(N, Imm,
false, 3);
589 bool MipsSEDAGToDAGISel::
591 return selectVSplatCommon(N, Imm,
false, 4);
595 bool MipsSEDAGToDAGISel::
597 return selectVSplatCommon(N, Imm,
false, 5);
601 bool MipsSEDAGToDAGISel::
603 return selectVSplatCommon(N, Imm,
false, 6);
607 bool MipsSEDAGToDAGISel::
609 return selectVSplatCommon(N, Imm,
false, 8);
613 bool MipsSEDAGToDAGISel::
615 return selectVSplatCommon(N, Imm,
true, 5);
628 bool MipsSEDAGToDAGISel::selectVSplatUimmPow2(
SDValue N,
SDValue &Imm)
const {
659 bool MipsSEDAGToDAGISel::selectVSplatMaskL(
SDValue N,
SDValue &Imm)
const {
671 if (ImmValue == ~(~ImmValue & ~(~ImmValue + 1))) {
693 bool MipsSEDAGToDAGISel::selectVSplatMaskR(
SDValue N,
SDValue &Imm)
const {
704 if (ImmValue == (ImmValue & ~(ImmValue + 1))) {
714 bool MipsSEDAGToDAGISel::selectVSplatUimmInvPow2(
SDValue N,
724 int32_t
Log2 = (~ImmValue).exactLogBase2();
735 bool MipsSEDAGToDAGISel::trySelect(
SDNode *Node) {
746 case Mips::PseudoD_SELECT_I:
747 case Mips::PseudoD_SELECT_I64: {
756 EVT NodeTys[] = {VT, VT};
758 ? Mips::PseudoD_SELECT_I64
759 : Mips::PseudoD_SELECT_I,
765 selectAddE(Node, DL);
770 auto *CN = cast<ConstantFPSDNode>(Node);
794 auto *CN = cast<ConstantSDNode>(Node);
795 int64_t Imm = CN->getSExtValue();
796 unsigned Size = CN->getValueSizeInBits(0);
804 AnalyzeImm.
Analyze(Imm, Size,
false);
815 if (Inst->Opc == Mips::LUi64)
824 for (++Inst; Inst != Seq.
end(); ++Inst) {
836 switch (cast<ConstantSDNode>(Node->
getOperand(1))->getZExtValue()) {
840 case Intrinsic::mips_cfcmsa: {
853 switch (cast<ConstantSDNode>(Node->
getOperand(0))->getZExtValue()) {
857 case Intrinsic::mips_move_v:
869 switch (cast<ConstantSDNode>(Node->
getOperand(1))->getZExtValue()) {
873 case Intrinsic::mips_ctcmsa: {
878 getMSACtrlReg(RegIdx), Value);
921 if (Pos + Size <= 32)
924 if (Pos + Size <= 32)
926 else if (Pos < 32 && 1 < Size)
927 Opcode = Mips::DINSM;
929 Opcode = Mips::DINSU;
946 unsigned RdhwrOpc, DestReg;
949 RdhwrOpc = Mips::RDHWR;
952 RdhwrOpc = Mips::RDHWR64;
953 DestReg = Mips::V1_64;
984 APInt SplatValue, SplatUndef;
985 unsigned SplatBitSize;
999 switch (SplatBitSize) {
1003 LdiOp = Mips::LDI_B;
1007 LdiOp = Mips::LDI_H;
1011 LdiOp = Mips::LDI_W;
1015 LdiOp = Mips::LDI_D;
1026 if (SplatValue.isSignedIntN(10)) {
1031 }
else if (SplatValue.isSignedIntN(16) &&
1032 ((ABI.
IsO32() && SplatBitSize < 64) ||
1039 bool Is32BitSplat = ABI.
IsO32() || SplatBitSize < 64;
1040 const unsigned ADDiuOp = Is32BitSplat ? Mips::ADDiu : Mips::DADDiu;
1043 Is32BitSplat ? Mips::ZERO : Mips::ZERO_64, SplatMVT);
1045 const unsigned FILLOp =
1048 : (SplatBitSize == 32 ? Mips::FILL_W
1049 : (SplatBitSize == 64 ? Mips::FILL_D : 0));
1051 assert(FILLOp != 0 &&
"Unknown FILL Op for splat synthesis!");
1052 assert((!ABI.
IsO32() || (FILLOp != Mips::FILL_D)) &&
1053 "Attempting to use fill.d on MIPS32!");
1055 const unsigned Lo = SplatValue.getLoBits(16).getZExtValue();
1061 }
else if (SplatValue.isSignedIntN(32) && SplatBitSize == 32) {
1064 const unsigned Lo = SplatValue.getLoBits(16).getZExtValue();
1065 const unsigned Hi = SplatValue.lshr(16).getLoBits(16).getZExtValue();
1076 Hi ?
SDValue(Res, 0) : ZeroVal, LoVal);
1078 assert((Hi || Lo) &&
"Zero case reached 32 bit case splat synthesis!");
1082 }
else if (SplatValue.isSignedIntN(32) && SplatBitSize == 64 &&
1087 const unsigned Lo = SplatValue.getLoBits(16).getZExtValue();
1088 const unsigned Hi = SplatValue.lshr(16).getLoBits(16).getZExtValue();
1099 Hi ?
SDValue(Res, 0) : ZeroVal, LoVal);
1110 }
else if (SplatValue.isSignedIntN(64)) {
1136 const unsigned Lo = SplatValue.getLoBits(16).getZExtValue();
1137 const unsigned Hi = SplatValue.lshr(16).getLoBits(16).getZExtValue();
1138 const unsigned Higher = SplatValue.lshr(32).getLoBits(16).getZExtValue();
1139 const unsigned Highest = SplatValue.lshr(48).getLoBits(16).getZExtValue();
1168 Hi ?
SDValue(Res, 0) : ZeroVal, LoVal);
1176 Highest ?
SDValue(HiRes, 0) : ZeroVal,
1182 (Hi || Lo) ?
SDValue(Res, 0) : ZeroVal);
1186 (Highest || Higher) ?
SDValue(HiRes, 0) : ZeroVal,
1194 Mips::COPY_TO_REGCLASS, DL, ViaVecTy,
SDValue(Res, 0),
1203 const bool HiResNonZero = Highest ||
Higher;
1204 const bool ResNonZero = Hi ||
Lo;
1237 }
else if (HiResNonZero) {
1243 "Zero splat value handled by non-zero 64bit splat synthesis!");
1253 if (ResVecTy != ViaVecTy) {
1276 bool MipsSEDAGToDAGISel::
1277 SelectInlineAsmMemoryOperand(
const SDValue &
Op,
unsigned ConstraintID,
1278 std::vector<SDValue> &OutOps) {
1281 switch(ConstraintID) {
1287 if (selectAddrRegImm16(Op, Base, Offset)) {
1288 OutOps.push_back(Base);
1289 OutOps.push_back(Offset);
1292 OutOps.push_back(Op);
1301 if (selectAddrRegImm9(Op, Base, Offset)) {
1302 OutOps.push_back(Base);
1303 OutOps.push_back(Offset);
1306 OutOps.push_back(Op);
1314 if (selectAddrRegImm12(Op, Base, Offset)) {
1315 OutOps.push_back(Base);
1316 OutOps.push_back(Offset);
1321 if (selectAddrRegImm9(Op, Base, Offset)) {
1322 OutOps.push_back(Base);
1323 OutOps.push_back(Offset);
1326 }
else if (selectAddrRegImm16(Op, Base, Offset)) {
1328 OutOps.push_back(Base);
1329 OutOps.push_back(Offset);
1333 OutOps.push_back(Op);
unsigned Log2(Align A)
Returns the log2 of the alignment.
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
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...
This class represents lattice values for constants.
FunctionPass * createMipsSEISelDag(MipsTargetMachine &TM, CodeGenOpt::Level OptLevel)
bool inMips16Mode() const
Carry-setting nodes for multiple precision addition and subtraction.
EVT getValueType(unsigned ResNo) const
Return the type of a specified result.
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
MVT getSimpleVT() const
Return the SimpleValueType held in the specified simple EVT.
TargetGlobalAddress - Like GlobalAddress, but the DAG does no folding or anything else with this node...
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
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)
const TargetRegisterClass * getRegClass(Register Reg) const
Return the register class of the specified virtual register.
RESULT,OUTCHAIN = INTRINSIC_W_CHAIN(INCHAIN, INTRINSICID, arg1, ...) This node represents a target in...
SI optimize exec mask operations pre RA
AnalysisUsage & addRequired()
static use_iterator use_end()
This file declares the MachineConstantPool class which is an abstract constant pool to keep track of ...
bool inMicroMipsMode() const
static std::string getGlobalIdentifier(StringRef Name, GlobalValue::LinkageTypes Linkage, StringRef FileName)
Return the modified name for a global value suitable to be used as the key for a global lookup (e...
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
mir Rename Register Operands
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...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
int64_t getSExtValue() const
virtual const TargetRegisterClass * getRegClassFor(MVT VT, bool isDivergent=false) const
Return the register class that should be used for the specified value type.
SDValue getTargetFrameIndex(int FI, EVT VT)
Simple integer binary arithmetic operators.
int32_t exactLogBase2() const
void setReg(Register Reg)
Change the register this operand corresponds to.
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...
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
const MachineInstrBuilder & addUse(Register RegNo, unsigned Flags=0, unsigned SubReg=0) const
Add a virtual register use operand.
OUTCHAIN = INTRINSIC_VOID(INCHAIN, INTRINSICID, arg1, arg2, ...) This node represents a target intrin...
CodeGenOpt::Level OptLevel
unsigned const MachineRegisterInfo * MRI
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")
const SDValue & getOperand(unsigned Num) const
const GlobalValue * getGlobal() const
Carry-using nodes for multiple precision addition and subtraction.
Represent the analysis usage information of a pass.
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. ...
static MachineOperand CreateReg(Register Reg, bool isDef, bool isImp=false, bool isKill=false, bool isDead=false, bool isUndef=false, bool isEarlyClobber=false, unsigned SubReg=0, bool isDebug=false, bool isInternalRead=false, bool isRenamable=false)
virtual 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...
bool isIntN(unsigned N, int64_t x)
Checks if an signed integer fits into the given (dynamic) bit width.
TypeSize getSizeInBits() const
Return the size of the specified value type in bits.
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.
This struct is a compact representation of a valid (non-zero power of two) alignment.
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)
void addOperand(MachineFunction &MF, const MachineOperand &Op)
Add the specified operand to the instruction.
bool isGlobal() const
isGlobal - Tests if this is a MO_GlobalAddress operand.
EVT getVectorElementType() const
Given a vector type, return the type of each element.
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.
bool isAligned(Align Lhs, uint64_t SizeInBytes)
Checks that SizeInBytes is a multiple of the alignment.
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.
This file provides various utilities for inspecting and working with the control flow graph in LLVM I...
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
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...
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)
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
StringRef getName() const
getName - Get the symbol name.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
MCSymbol * getMCSymbol() const
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)
#define LLVM_FALLTHROUGH
LLVM_FALLTHROUGH - Mark fallthrough cases in switch statements.
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.
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.
Register getReg() const
getReg - Returns the register number.
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...
const MachineInstrBuilder & addReg(Register RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...