|
LLVM 24.0.0git
|
AMDGPU specific code to select AMDGPU machine instructions for SelectionDAG operations. More...
#include "Target/AMDGPU/AMDGPUISelDAGToDAG.h"
Public Member Functions | |
| AMDGPUDAGToDAGISel ()=delete | |
| AMDGPUDAGToDAGISel (TargetMachine &TM, CodeGenOptLevel OptLevel) | |
| bool | runOnMachineFunction (MachineFunction &MF) override |
| bool | matchLoadD16FromBuildVector (SDNode *N) const |
| bool | widenRegionLoad16 (SDNode *N) const |
| void | PreprocessISelDAG () override |
| PreprocessISelDAG - This hook allows targets to hack on the graph before instruction selection starts. | |
| void | Select (SDNode *N) override |
| Main hook for targets to transform nodes into machine nodes. | |
| void | PostprocessISelDAG () override |
| PostprocessISelDAG() - This hook allows the target to hack on the graph right after selection. | |
| bool | SelectInlineAsmMemoryOperand (const SDValue &Op, InlineAsm::ConstraintCode ConstraintID, std::vector< SDValue > &OutOps) override |
| SelectInlineAsmMemoryOperand - Select the specified address as a target addressing mode, according to the specified constraint. | |
| Public Member Functions inherited from llvm::SelectionDAGISel | |
| SelectionDAGISel (TargetMachine &tm, CodeGenOptLevel OL=CodeGenOptLevel::Default) | |
| virtual | ~SelectionDAGISel () |
| BatchAAResults * | getBatchAA () const |
| Returns a (possibly null) pointer to the current BatchAAResults. | |
| const TargetLowering * | getTargetLowering () const |
| void | initializeAnalysisResults (MachineFunctionAnalysisManager &MFAM) |
| void | initializeAnalysisResults (MachineFunctionPass &MFP) |
| virtual void | emitFunctionEntryCode () |
| virtual bool | IsProfitableToFold (SDValue N, SDNode *U, SDNode *Root) const |
| IsProfitableToFold - Returns true if it's profitable to fold the specific operand node N of U during instruction selection that starts at Root. | |
| bool | CheckAndMask (SDValue LHS, ConstantSDNode *RHS, int64_t DesiredMaskS) const |
| CheckAndMask - The isel is trying to match something like (and X, 255). | |
| bool | CheckOrMask (SDValue LHS, ConstantSDNode *RHS, int64_t DesiredMaskS) const |
| CheckOrMask - The isel is trying to match something like (or X, 255). | |
| virtual bool | CheckPatternPredicate (unsigned PredNo) const |
| CheckPatternPredicate - This function is generated by tblgen in the target. | |
| virtual bool | CheckNodePredicate (SDValue Op, unsigned PredNo) const |
| CheckNodePredicate - This function is generated by tblgen in the target. | |
| virtual bool | CheckNodePredicateWithOperands (SDValue Op, unsigned PredNo, ArrayRef< SDValue > Operands) const |
| CheckNodePredicateWithOperands - This function is generated by tblgen in the target. | |
| virtual bool | CheckComplexPattern (SDNode *Root, SDNode *Parent, SDValue N, unsigned PatternNo, SmallVectorImpl< std::pair< SDValue, SDNode * > > &Result) |
| virtual SDValue | RunSDNodeXForm (SDValue V, unsigned XFormNo) |
| virtual MVT | getValueTypeForHwMode (unsigned Index) const |
| void | SelectCodeCommon (SDNode *NodeToMatch, const uint8_t *MatcherTable, unsigned TableSize, const uint8_t *OperandLists) |
| virtual bool | ComplexPatternFuncMutatesDAG () const |
| Return true if complex patterns for this target can mutate the DAG. | |
| bool | mayRaiseFPException (SDNode *Node) const |
| Return whether the node may raise an FP exception. | |
| bool | isOrEquivalentToAdd (const SDNode *N) const |
| bool | selectShiftAmountMask (SDValue N, unsigned ShiftWidth, SDValue &ShAmt) const |
Look through a mask on the amount N of a shift that reads only the low Log2(ShiftWidth) bits of its amount, as many shift instructions do. | |
Protected Member Functions | |
| void | SelectBuildVector (SDNode *N, unsigned RegClassID) |
| void | SelectVectorShuffle (SDNode *N) |
| bool | isSDWAOperand (const SDNode *N) const |
| Protected Member Functions inherited from llvm::SelectionDAGISel | |
| void | ReplaceUses (SDValue F, SDValue T) |
| ReplaceUses - replace all uses of the old node F with the use of the new node T. | |
| void | ReplaceUses (const SDValue *F, const SDValue *T, unsigned Num) |
| ReplaceUses - replace all uses of the old nodes F with the use of the new nodes T. | |
| void | ReplaceUses (SDNode *F, SDNode *T) |
| ReplaceUses - replace all uses of the old node F with the use of the new node T. | |
| void | ReplaceNode (SDNode *F, SDNode *T) |
Replace all uses of F with T, then remove F from the DAG. | |
| void | SelectInlineAsmMemoryOperands (std::vector< SDValue > &Ops, const SDLoc &DL) |
| SelectInlineAsmMemoryOperands - Calls to this are automatically generated by tblgen. | |
| virtual StringRef | getPatternForIndex (unsigned index) |
| getPatternForIndex - Patterns selected by tablegen during ISEL | |
| virtual StringRef | getIncludePathForIndex (unsigned index) |
| getIncludePathForIndex - get the td source location of pattern instantiation | |
| bool | shouldOptForSize (const MachineFunction *MF) const |
AMDGPU specific code to select AMDGPU machine instructions for SelectionDAG operations.
Definition at line 51 of file AMDGPUISelDAGToDAG.h.
|
delete |
References Imm, llvm::SelectionDAGISel::MF, N, llvm::SelectionDAGISel::OptLevel, and llvm::SelectionDAGISel::TM.
|
explicit |
Definition at line 183 of file AMDGPUISelDAGToDAG.cpp.
References llvm::SelectionDAGISel::OptLevel, llvm::SelectionDAGISel::SelectionDAGISel(), and llvm::SelectionDAGISel::TM.
Definition at line 951 of file AMDGPUISelDAGToDAG.cpp.
References llvm::ISD::AND, llvm::cast(), llvm::dyn_cast(), llvm::EVT::getScalarSizeInBits(), N, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SRA, and llvm::ISD::SRL.
Definition at line 279 of file AMDGPUISelDAGToDAG.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, assert(), llvm::ISD::BITCAST, llvm::SelectionDAGISel::CurDAG, llvm::dyn_cast(), llvm::LoadSDNode::getBasePtr(), llvm::MemSDNode::getChain(), llvm::LoadSDNode::getExtensionType(), llvm::MemSDNode::getMemOperand(), llvm::MemSDNode::getMemoryVT(), llvm::SDValue::getNode(), llvm::SDValue::getValue(), llvm::Hi, llvm::SDNode::isPredecessorOf(), llvm::Lo, N, llvm::ISD::SCALAR_TO_VECTOR, SDValue(), and llvm::ISD::SEXTLOAD.
Referenced by PreprocessISelDAG().
|
overridevirtual |
PostprocessISelDAG() - This hook allows the target to hack on the graph right after selection.
Reimplemented from llvm::SelectionDAGISel.
Definition at line 4924 of file AMDGPUISelDAGToDAG.cpp.
References llvm::SelectionDAGISel::CurDAG, llvm::dyn_cast(), llvm::SelectionDAGISel::getTargetLowering(), llvm::Lowering, and llvm::SelectionDAGISel::ReplaceUses().
|
overridevirtual |
PreprocessISelDAG - This hook allows targets to hack on the graph before instruction selection starts.
Reimplemented from llvm::SelectionDAGISel.
Definition at line 386 of file AMDGPUISelDAGToDAG.cpp.
References llvm::ISD::ATOMIC_LOAD, llvm::ISD::BUILD_VECTOR, llvm::SelectionDAGISel::CurDAG, llvm::dbgs(), LLVM_DEBUG, llvm::ISD::LOAD, matchLoadD16FromBuildVector(), N, and widenRegionLoad16().
|
overridevirtual |
Reimplemented from llvm::SelectionDAGISel.
Definition at line 187 of file AMDGPUISelDAGToDAG.cpp.
References llvm::GCNSubtarget::checkSubtargetFeatures(), llvm::SelectionDAGISel::MF, and llvm::SelectionDAGISel::runOnMachineFunction().
|
overridevirtual |
Main hook for targets to transform nodes into machine nodes.
Implements llvm::SelectionDAGISel.
Definition at line 725 of file AMDGPUISelDAGToDAG.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, llvm::ISD::AND, assert(), llvm::EVT::bitsEq(), llvm::ISD::BRCOND, llvm::ISD::BUILD_PAIR, llvm::ISD::BUILD_VECTOR, C(), llvm::cast(), llvm::ISD::Constant, llvm::ISD::ConstantFP, llvm::ISD::CopyToReg, llvm::SelectionDAGISel::CurDAG, DL, llvm::dyn_cast(), FP, llvm::ISD::FP_EXTEND, llvm::MCRegisterClass::getID(), llvm::EVT::getScalarSizeInBits(), llvm::SIRegisterInfo::getSGPRClassForBitWidth(), llvm::SelectionDAGISel::getTargetLowering(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::ConstantSDNode::getZExtValue(), Imm, llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::isa(), llvm::AMDGPU::isValid32BitLiteral(), llvm_unreachable, llvm::ISD::LOAD, llvm::Lowering, llvm::AMDGPUISD::MAD_I64_I32, llvm::AMDGPUISD::MAD_U64_U32, N, llvm::Offset, Opc, llvm::SelectionDAGISel::ReplaceNode(), llvm::ISD::SCALAR_TO_VECTOR, SelectBuildVector(), SelectVectorShuffle(), llvm::ISD::SIGN_EXTEND_INREG, llvm::Signed, llvm::ISD::SMUL_LOHI, llvm::ISD::SRA, llvm::ISD::SRL, llvm::ISD::STACKRESTORE, llvm::ISD::STORE, TRI, llvm::ISD::UADDO, llvm::ISD::UADDO_CARRY, llvm::ISD::UMUL_LOHI, llvm::ISD::USUBO, llvm::ISD::USUBO_CARRY, llvm::ISD::VECTOR_SHUFFLE, llvm::AMDGPUISD::WAVE_ADDRESS, and llvm::ISD::WRITE_REGISTER.
Definition at line 550 of file AMDGPUISelDAGToDAG.cpp.
References assert(), C(), llvm::cast(), llvm::SelectionDAGISel::CurDAG, DL, llvm::dyn_cast(), llvm::EVT::getSizeInBits(), llvm::R600RegisterInfo::getSubRegFromChannel(), llvm::SIRegisterInfo::getSubRegFromChannel(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), I, llvm::isa(), N, llvm::ISD::SCALAR_TO_VECTOR, SDValue(), and llvm::Sub.
Referenced by Select().
|
overridevirtual |
SelectInlineAsmMemoryOperand - Select the specified address as a target addressing mode, according to the specified constraint.
If this does not match or is not implemented, return true. The resultant operands (which will appear in the machine instruction) should be added to the OutOps vector.
Reimplemented from llvm::SelectionDAGISel.
Definition at line 4950 of file AMDGPUISelDAGToDAG.cpp.
References assert(), llvm::SelectionDAGISel::CurDAG, DL, llvm::MCRegisterClass::getID(), llvm::MVT::getSizeInBits(), llvm::InlineAsm::m, llvm::InlineAsm::RF, SDValue(), and TRI.
|
protected |
Definition at line 636 of file AMDGPUISelDAGToDAG.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, assert(), llvm::EVT::bitsEq(), llvm::cast(), llvm::SelectionDAGISel::CurDAG, DL, llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), N, llvm::SISrcMods::NONE, llvm::SISrcMods::OP_SEL_0, llvm::SISrcMods::OP_SEL_1, and SDValue().
Referenced by Select().
Definition at line 359 of file AMDGPUISelDAGToDAG.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, llvm::cast(), llvm::EVT::changeTypeToInteger(), llvm::SelectionDAGISel::CurDAG, llvm::dyn_cast(), llvm::ISD::EXTLOAD, llvm::EVT::getSizeInBits(), llvm::SDValue::getValue(), llvm::EVT::isVector(), N, llvm::ISD::NON_EXTLOAD, llvm::AMDGPUAS::REGION_ADDRESS, and llvm::ISD::TRUNCATE.
Referenced by PreprocessISelDAG().