LLVM 18.0.0git
|
#include "Target/LoongArch/LoongArchISelDAGToDAG.h"
Public Member Functions | |
LoongArchDAGToDAGISel ()=delete | |
LoongArchDAGToDAGISel (LoongArchTargetMachine &TM) | |
bool | runOnMachineFunction (MachineFunction &MF) override |
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis. | |
void | Select (SDNode *Node) override |
Main hook for targets to transform nodes into machine nodes. | |
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. | |
bool | SelectBaseAddr (SDValue Addr, SDValue &Base) |
bool | SelectAddrConstant (SDValue Addr, SDValue &Base, SDValue &Offset) |
bool | selectNonFIBaseAddr (SDValue Addr, SDValue &Base) |
bool | selectShiftMask (SDValue N, unsigned ShiftWidth, SDValue &ShAmt) |
bool | selectShiftMaskGRLen (SDValue N, SDValue &ShAmt) |
bool | selectShiftMask32 (SDValue N, SDValue &ShAmt) |
bool | selectSExti32 (SDValue N, SDValue &Val) |
bool | selectZExti32 (SDValue N, SDValue &Val) |
bool | selectVSplat (SDNode *N, APInt &Imm, unsigned MinSizeInBits) const |
template<unsigned ImmSize, bool IsSigned = false> | |
bool | selectVSplatImm (SDValue N, SDValue &SplatVal) |
bool | selectVSplatUimmInvPow2 (SDValue N, SDValue &SplatImm) const |
bool | selectVSplatUimmPow2 (SDValue N, SDValue &SplatImm) const |
![]() | |
SelectionDAGISel (char &ID, TargetMachine &tm, CodeGenOptLevel OL=CodeGenOptLevel::Default) | |
~SelectionDAGISel () override | |
const TargetLowering * | getTargetLowering () const |
void | getAnalysisUsage (AnalysisUsage &AU) const override |
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this. | |
bool | runOnMachineFunction (MachineFunction &MF) override |
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis. | |
virtual void | emitFunctionEntryCode () |
virtual void | PreprocessISelDAG () |
PreprocessISelDAG - This hook allows targets to hack on the graph before instruction selection starts. | |
virtual void | PostprocessISelDAG () |
PostprocessISelDAG() - This hook allows the target to hack on the graph right after selection. | |
virtual void | Select (SDNode *N)=0 |
Main hook for targets to transform nodes into machine nodes. | |
virtual bool | SelectInlineAsmMemoryOperand (const SDValue &Op, InlineAsm::ConstraintCode ConstraintID, std::vector< SDValue > &OutOps) |
SelectInlineAsmMemoryOperand - Select the specified address as a target addressing mode, according to the specified constraint. | |
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 (SDNode *N, unsigned PredNo) const |
CheckNodePredicate - This function is generated by tblgen in the target. | |
virtual bool | CheckNodePredicateWithOperands (SDNode *N, unsigned PredNo, const SmallVectorImpl< 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) |
void | SelectCodeCommon (SDNode *NodeToMatch, const unsigned char *MatcherTable, unsigned TableSize) |
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 | doInitialization (Module &) override |
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run. | |
![]() | |
FunctionPass (char &pid) | |
Pass * | createPrinterPass (raw_ostream &OS, const std::string &Banner) const override |
createPrinterPass - Get a function printer pass. | |
virtual bool | runOnFunction (Function &F)=0 |
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass. | |
void | assignPassManager (PMStack &PMS, PassManagerType T) override |
Find appropriate Function Pass Manager or Call Graph Pass Manager in the PM Stack and add self into that manager. | |
PassManagerType | getPotentialPassManagerType () const override |
Return what kind of Pass Manager can manage this pass. | |
![]() | |
Pass (PassKind K, char &pid) | |
Pass (const Pass &)=delete | |
Pass & | operator= (const Pass &)=delete |
virtual | ~Pass () |
PassKind | getPassKind () const |
virtual StringRef | getPassName () const |
getPassName - Return a nice clean name for a pass. | |
AnalysisID | getPassID () const |
getPassID - Return the PassID number that corresponds to this pass. | |
virtual bool | doInitialization (Module &) |
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run. | |
virtual bool | doFinalization (Module &) |
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes have run. | |
virtual void | print (raw_ostream &OS, const Module *M) const |
print - Print out the internal state of the pass. | |
void | dump () const |
virtual Pass * | createPrinterPass (raw_ostream &OS, const std::string &Banner) const =0 |
createPrinterPass - Get a Pass appropriate to print the IR this pass operates on (Module, Function or MachineFunction). | |
virtual void | assignPassManager (PMStack &, PassManagerType) |
Each pass is responsible for assigning a pass manager to itself. | |
virtual void | preparePassManager (PMStack &) |
Check if available pass managers are suitable for this pass or not. | |
virtual PassManagerType | getPotentialPassManagerType () const |
Return what kind of Pass Manager can manage this pass. | |
void | setResolver (AnalysisResolver *AR) |
AnalysisResolver * | getResolver () const |
virtual void | getAnalysisUsage (AnalysisUsage &) const |
getAnalysisUsage - This function should be overriden by passes that need analysis information to do their job. | |
virtual void | releaseMemory () |
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. | |
virtual void * | getAdjustedAnalysisPointer (AnalysisID ID) |
getAdjustedAnalysisPointer - This method is used when a pass implements an analysis interface through multiple inheritance. | |
virtual ImmutablePass * | getAsImmutablePass () |
virtual PMDataManager * | getAsPMDataManager () |
virtual void | verifyAnalysis () const |
verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis information. | |
virtual void | dumpPassStructure (unsigned Offset=0) |
template<typename AnalysisType > | |
AnalysisType * | getAnalysisIfAvailable () const |
getAnalysisIfAvailable<AnalysisType>() - Subclasses use this function to get analysis information that might be around, for example to update it. | |
bool | mustPreserveAnalysisID (char &AID) const |
mustPreserveAnalysisID - This method serves the same function as getAnalysisIfAvailable, but works if you just have an AnalysisID. | |
template<typename AnalysisType > | |
AnalysisType & | getAnalysis () const |
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function. | |
template<typename AnalysisType > | |
AnalysisType & | getAnalysis (Function &F, bool *Changed=nullptr) |
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function. | |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI) const |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI, Function &F, bool *Changed=nullptr) |
Static Public Attributes | |
static char | ID |
Definition at line 23 of file LoongArchISelDAGToDAG.h.
|
delete |
|
inlineexplicit |
Definition at line 31 of file LoongArchISelDAGToDAG.h.
|
inlineoverridevirtual |
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis.
Reimplemented from llvm::SelectionDAGISel.
Definition at line 34 of file LoongArchISelDAGToDAG.h.
References llvm::MachineFunction::getSubtarget(), llvm::SelectionDAGISel::MF, and llvm::SelectionDAGISel::runOnMachineFunction().
|
overridevirtual |
Main hook for targets to transform nodes into machine nodes.
Implements llvm::SelectionDAGISel.
Definition at line 29 of file LoongArchISelDAGToDAG.cpp.
References llvm::ISD::BITCAST, llvm::ISD::Constant, llvm::dbgs(), DL, llvm::ISD::FrameIndex, llvm::LoongArchMatInt::generateInstSeq(), llvm::MVT::is128BitVector(), llvm::MVT::is512BitVector(), LLVM_DEBUG, and Opcode.
Definition at line 151 of file LoongArchISelDAGToDAG.cpp.
References Addr, llvm::sampleprof::Base, llvm::SelectionDAGISel::CurDAG, DL, llvm::SelectionDAG::getRegister(), llvm::SelectionDAG::getTargetConstant(), and llvm::Offset.
Definition at line 139 of file LoongArchISelDAGToDAG.cpp.
References Addr, llvm::sampleprof::Base, llvm::SelectionDAGISel::CurDAG, llvm::LoongArchSubtarget::getGRLenVT(), and llvm::SelectionDAG::getTargetFrameIndex().
|
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 93 of file LoongArchISelDAGToDAG.cpp.
References llvm::sampleprof::Base, llvm::SelectionDAGISel::CurDAG, llvm::LoongArchSubtarget::getGRLenVT(), llvm::ConstantSDNode::getSExtValue(), llvm::SelectionDAG::getTargetConstant(), llvm::ConstantSDNode::getZExtValue(), llvm::isAligned(), llvm::SelectionDAG::isBaseWithConstantOffset(), llvm::isIntN(), llvm::InlineAsm::k, llvm_unreachable, llvm::InlineAsm::m, llvm::Offset, llvm::InlineAsm::ZB, and llvm::InlineAsm::ZC.
Definition at line 169 of file LoongArchISelDAGToDAG.cpp.
References Addr, and llvm::sampleprof::Base.
Definition at line 235 of file LoongArchISelDAGToDAG.cpp.
References llvm::LoongArchISD::BSTRPICK, llvm::SelectionDAG::ComputeNumSignBits(), llvm::SelectionDAGISel::CurDAG, llvm::MVT::getSizeInBits(), N, and llvm::ISD::SIGN_EXTEND_INREG.
Definition at line 177 of file LoongArchISelDAGToDAG.cpp.
References llvm::ISD::AND, assert(), llvm::LoongArchISD::BSTRPICK, llvm::SelectionDAG::computeKnownBits(), llvm::SelectionDAGISel::CurDAG, DL, llvm::APInt::getBitWidth(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getMachineNode(), llvm::isPowerOf2_32(), llvm::APInt::isSubsetOf(), llvm::Log2_32(), N, llvm::ISD::SUB, and llvm::KnownBits::Zero.
Referenced by selectShiftMask32(), and selectShiftMaskGRLen().
Definition at line 53 of file LoongArchISelDAGToDAG.h.
References N, and selectShiftMask().
Definition at line 50 of file LoongArchISelDAGToDAG.h.
References llvm::LoongArchSubtarget::getGRLen(), N, and selectShiftMask().
Definition at line 274 of file LoongArchISelDAGToDAG.cpp.
References llvm::LoongArchSubtarget::hasExtLSX(), and N.
Referenced by selectVSplatImm(), selectVSplatUimmInvPow2(), and selectVSplatUimmPow2().
Definition at line 298 of file LoongArchISelDAGToDAG.cpp.
References llvm::ISD::BITCAST, llvm::SelectionDAGISel::CurDAG, llvm::APInt::getBitWidth(), llvm::LoongArchSubtarget::getGRLenVT(), llvm::APInt::getSExtValue(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getTargetConstant(), llvm::APInt::getZExtValue(), llvm::APInt::isIntN(), llvm::APInt::isSignedIntN(), N, and selectVSplat().
Definition at line 322 of file LoongArchISelDAGToDAG.cpp.
References llvm::ISD::BITCAST, llvm::SelectionDAGISel::CurDAG, llvm::APInt::getBitWidth(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getTargetConstant(), llvm::Log2(), N, and selectVSplat().
Definition at line 343 of file LoongArchISelDAGToDAG.cpp.
References llvm::ISD::BITCAST, llvm::SelectionDAGISel::CurDAG, llvm::APInt::exactLogBase2(), llvm::APInt::getBitWidth(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getTargetConstant(), llvm::Log2(), N, and selectVSplat().
Definition at line 256 of file LoongArchISelDAGToDAG.cpp.
References llvm::ISD::AND, llvm::CallingConv::C, llvm::SelectionDAGISel::CurDAG, llvm::APInt::getHighBitsSet(), llvm::MVT::getSizeInBits(), llvm::SelectionDAG::MaskedValueIsZero(), and N.
|
static |
Definition at line 27 of file LoongArchISelDAGToDAG.h.