LLVM
15.0.0git
|
Lowers LLVM IR (in DAG form) to AVR MC instructions (in DAG form). More...
Public Member Functions | |
AVRDAGToDAGISel (AVRTargetMachine &TM, CodeGenOpt::Level OptLevel) | |
StringRef | getPassName () const override |
getPassName - Return a nice clean name for a pass. More... | |
bool | runOnMachineFunction (MachineFunction &MF) override |
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis. More... | |
bool | SelectAddr (SDNode *Op, SDValue N, SDValue &Base, SDValue &Disp) |
bool | selectIndexedLoad (SDNode *N) |
unsigned | selectIndexedProgMemLoad (const LoadSDNode *LD, MVT VT, int Bank) |
bool | SelectInlineAsmMemoryOperand (const SDValue &Op, unsigned ConstraintCode, std::vector< SDValue > &OutOps) override |
SelectInlineAsmMemoryOperand - Select the specified address as a target addressing mode, according to the specified constraint. More... | |
![]() | |
SelectionDAGISel (TargetMachine &tm, CodeGenOpt::Level OL=CodeGenOpt::Default) | |
~SelectionDAGISel () override | |
const TargetLowering * | getTargetLowering () const |
void | getAnalysisUsage (AnalysisUsage &AU) const override |
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this. More... | |
virtual void | emitFunctionEntryCode () |
virtual void | PreprocessISelDAG () |
PreprocessISelDAG - This hook allows targets to hack on the graph before instruction selection starts. More... | |
virtual void | PostprocessISelDAG () |
PostprocessISelDAG() - This hook allows the target to hack on the graph right after selection. More... | |
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. More... | |
bool | CheckAndMask (SDValue LHS, ConstantSDNode *RHS, int64_t DesiredMaskS) const |
CheckAndMask - The isel is trying to match something like (and X, 255). More... | |
bool | CheckOrMask (SDValue LHS, ConstantSDNode *RHS, int64_t DesiredMaskS) const |
CheckOrMask - The isel is trying to match something like (or X, 255). More... | |
virtual bool | CheckPatternPredicate (unsigned PredNo) const |
CheckPatternPredicate - This function is generated by tblgen in the target. More... | |
virtual bool | CheckNodePredicate (SDNode *N, unsigned PredNo) const |
CheckNodePredicate - This function is generated by tblgen in the target. More... | |
virtual bool | CheckNodePredicateWithOperands (SDNode *N, unsigned PredNo, const SmallVectorImpl< SDValue > &Operands) const |
CheckNodePredicateWithOperands - This function is generated by tblgen in the target. More... | |
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. More... | |
bool | mayRaiseFPException (SDNode *Node) const |
Return whether the node may raise an FP exception. More... | |
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. More... | |
![]() | |
FunctionPass (char &pid) | |
Pass * | createPrinterPass (raw_ostream &OS, const std::string &Banner) const override |
createPrinterPass - Get a function printer pass. More... | |
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. More... | |
PassManagerType | getPotentialPassManagerType () const override |
Return what kind of Pass Manager can manage this pass. More... | |
![]() | |
Pass (PassKind K, char &pid) | |
Pass (const Pass &)=delete | |
Pass & | operator= (const Pass &)=delete |
virtual | ~Pass () |
PassKind | getPassKind () const |
AnalysisID | getPassID () const |
getPassID - Return the PassID number that corresponds to this pass. More... | |
virtual bool | doFinalization (Module &) |
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes have run. More... | |
virtual void | print (raw_ostream &OS, const Module *M) const |
print - Print out the internal state of the pass. More... | |
void | dump () const |
virtual void | preparePassManager (PMStack &) |
Check if available pass managers are suitable for this pass or not. More... | |
void | setResolver (AnalysisResolver *AR) |
AnalysisResolver * | getResolver () const |
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. More... | |
virtual void * | getAdjustedAnalysisPointer (AnalysisID ID) |
getAdjustedAnalysisPointer - This method is used when a pass implements an analysis interface through multiple inheritance. More... | |
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. More... | |
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. More... | |
bool | mustPreserveAnalysisID (char &AID) const |
mustPreserveAnalysisID - This method serves the same function as getAnalysisIfAvailable, but works if you just have an AnalysisID. More... | |
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. More... | |
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. More... | |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI) const |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI, Function &F, bool *Changed=nullptr) |
Lowers LLVM IR (in DAG form) to AVR MC instructions (in DAG form).
Definition at line 27 of file AVRISelDAGToDAG.cpp.
|
inline |
Definition at line 29 of file AVRISelDAGToDAG.cpp.
|
inlineoverridevirtual |
getPassName - Return a nice clean name for a pass.
This usually implemented in terms of the name that is registered by one of the Registration templates, but can be overloaded directly.
Reimplemented from llvm::Pass.
Definition at line 32 of file AVRISelDAGToDAG.cpp.
|
overridevirtual |
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis.
Reimplemented from llvm::SelectionDAGISel.
Definition at line 59 of file AVRISelDAGToDAG.cpp.
References llvm::MachineFunction::getSubtarget(), llvm::SelectionDAGISel::MF, and llvm::SelectionDAGISel::runOnMachineFunction().
Definition at line 64 of file AVRISelDAGToDAG.cpp.
References llvm::ISD::ADD, llvm::sampleprof::Base, llvm::SelectionDAGISel::CurDAG, DL, llvm::ISD::FrameIndex, llvm::SelectionDAG::getDataLayout(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetFrameIndex(), llvm::SelectionDAGISel::getTargetLowering(), llvm::MVT::i16, llvm::MVT::i8, int, llvm::SelectionDAG::isBaseWithConstantOffset(), N, RHS, and llvm::ISD::SUB.
Referenced by SelectInlineAsmMemoryOperand().
bool llvm::AVRDAGToDAGISel::selectIndexedLoad | ( | SDNode * | N | ) |
Definition at line 121 of file AVRISelDAGToDAG.cpp.
References llvm::SelectionDAGISel::CurDAG, llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getMachineNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAGISel::getTargetLowering(), llvm::MVT::i16, llvm::MVT::i8, llvm::ARM_MB::LD, N, llvm::ISD::NON_EXTLOAD, llvm::MVT::Other, llvm::ISD::POST_INC, llvm::ISD::PRE_DEC, llvm::SelectionDAG::RemoveDeadNode(), llvm::SelectionDAGISel::ReplaceUses(), and llvm::MVT::SimpleTy.
unsigned llvm::AVRDAGToDAGISel::selectIndexedProgMemLoad | ( | const LoadSDNode * | LD, |
MVT | VT, | ||
int | Bank | ||
) |
Definition at line 168 of file AVRISelDAGToDAG.cpp.
References assert(), llvm::AVRSubtarget::hasELPM(), llvm::MVT::i16, llvm::MVT::i8, llvm::ARM_MB::LD, llvm::ISD::NON_EXTLOAD, llvm::ISD::POST_INC, and llvm::MVT::SimpleTy.
|
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 198 of file AVRISelDAGToDAG.cpp.
References llvm::ISD::ADD, assert(), llvm::sampleprof::Base, llvm::InlineAsm::Constraint_m, llvm::InlineAsm::Constraint_Q, llvm::ISD::CopyFromReg, llvm::ISD::CopyToReg, llvm::MachineRegisterInfo::createVirtualRegister(), llvm::SelectionDAGISel::CurDAG, DL, llvm::ISD::FrameIndex, llvm::ConstantSDNode::getAPIntValue(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getCopyToReg(), llvm::SelectionDAG::getDataLayout(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::RegisterSDNode::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::SelectionDAG::getTargetConstant(), llvm::AVRSubtarget::getTargetLowering(), llvm::SDNode::getValueType(), llvm::APInt::getZExtValue(), llvm::MVT::i8, llvm::Register::isVirtualRegister(), llvm::SelectionDAGISel::MF, SelectAddr(), llvm::ISD::SUB, and llvm::APInt::ult().