|
LLVM
10.0.0
|
This class provides legalization strategies. More...
#include "Target/Mips/MipsLegalizerInfo.h"
Public Member Functions | |
| MipsLegalizerInfo (const MipsSubtarget &ST) | |
| bool | legalizeCustom (MachineInstr &MI, MachineRegisterInfo &MRI, MachineIRBuilder &MIRBuilder, GISelChangeObserver &Observer) const override |
| bool | legalizeIntrinsic (MachineInstr &MI, MachineRegisterInfo &MRI, MachineIRBuilder &MIRBuilder) const override |
| Return true if MI is either legal or has been legalized and false if not legal. More... | |
Public Member Functions inherited from llvm::LegalizerInfo | |
| LegalizerInfo () | |
| virtual | ~LegalizerInfo ()=default |
| unsigned | getOpcodeIdxForOpcode (unsigned Opcode) const |
| unsigned | getActionDefinitionsIdx (unsigned Opcode) const |
| void | computeTables () |
| Compute any ancillary tables needed to quickly decide how an operation should be handled. More... | |
| void | verify (const MCInstrInfo &MII) const |
| Perform simple self-diagnostic and assert if there is anything obviously wrong with the actions set up. More... | |
| void | setAction (const InstrAspect &Aspect, LegalizeAction Action) |
| More friendly way to set an action for common types that have an LLT representation. More... | |
| void | setLegalizeScalarToDifferentSizeStrategy (const unsigned Opcode, const unsigned TypeIdx, SizeChangeStrategy S) |
| The setAction calls record the non-size-changing legalization actions to take on specificly-sized types. More... | |
| void | setLegalizeVectorElementToDifferentSizeStrategy (const unsigned Opcode, const unsigned TypeIdx, SizeChangeStrategy S) |
| See also setLegalizeScalarToDifferentSizeStrategy. More... | |
| const LegalizeRuleSet & | getActionDefinitions (unsigned Opcode) const |
| Get the action definitions for the given opcode. More... | |
| LegalizeRuleSet & | getActionDefinitionsBuilder (unsigned Opcode) |
| Get the action definition builder for the given opcode. More... | |
| LegalizeRuleSet & | getActionDefinitionsBuilder (std::initializer_list< unsigned > Opcodes) |
| Get the action definition builder for the given set of opcodes. More... | |
| void | aliasActionDefinitions (unsigned OpcodeTo, unsigned OpcodeFrom) |
| LegalizeActionStep | getAction (const LegalityQuery &Query) const |
| Determine what action should be taken to legalize the described instruction. More... | |
| LegalizeActionStep | getAction (const MachineInstr &MI, const MachineRegisterInfo &MRI) const |
| Determine what action should be taken to legalize the given generic instruction. More... | |
| bool | isLegal (const LegalityQuery &Query) const |
| bool | isLegal (const MachineInstr &MI, const MachineRegisterInfo &MRI) const |
| bool | isLegalOrCustom (const MachineInstr &MI, const MachineRegisterInfo &MRI) const |
| virtual unsigned | getExtOpcodeForWideningConstant (LLT SmallTy) const |
| Return the opcode (SEXT/ZEXT/ANYEXT) that should be performed while widening a constant of type SmallTy which targets can override. More... | |
Additional Inherited Members | |
Public Types inherited from llvm::LegalizerInfo | |
| using | SizeAndAction = std::pair< uint16_t, LegalizeAction > |
| using | SizeAndActionsVec = std::vector< SizeAndAction > |
| using | SizeChangeStrategy = std::function< SizeAndActionsVec(const SizeAndActionsVec &v)> |
Static Public Member Functions inherited from llvm::LegalizerInfo | |
| static bool | needsLegalizingToDifferentSize (const LegalizeAction Action) |
| static SizeAndActionsVec | unsupportedForDifferentSizes (const SizeAndActionsVec &v) |
| A SizeChangeStrategy for the common case where legalization for a particular operation consists of only supporting a specific set of type sizes. More... | |
| static SizeAndActionsVec | widenToLargerTypesAndNarrowToLargest (const SizeAndActionsVec &v) |
| A SizeChangeStrategy for the common case where legalization for a particular operation consists of widening the type to a large legal type, unless there is no such type and then instead it should be narrowed to the largest legal type. More... | |
| static SizeAndActionsVec | widenToLargerTypesUnsupportedOtherwise (const SizeAndActionsVec &v) |
| static SizeAndActionsVec | narrowToSmallerAndUnsupportedIfTooSmall (const SizeAndActionsVec &v) |
| static SizeAndActionsVec | narrowToSmallerAndWidenToSmallest (const SizeAndActionsVec &v) |
| static SizeAndActionsVec | moreToWiderTypesAndLessToWidest (const SizeAndActionsVec &v) |
| A SizeChangeStrategy for the common case where legalization for a particular vector operation consists of having more elements in the vector, to a type that is legal. More... | |
| static SizeAndActionsVec | increaseToLargerTypesAndDecreaseToLargest (const SizeAndActionsVec &v, LegalizeAction IncreaseAction, LegalizeAction DecreaseAction) |
| Helper function to implement many typical SizeChangeStrategy functions. More... | |
| static SizeAndActionsVec | decreaseToSmallerTypesAndIncreaseToSmallest (const SizeAndActionsVec &v, LegalizeAction DecreaseAction, LegalizeAction IncreaseAction) |
| Helper function to implement many typical SizeChangeStrategy functions. More... | |
This class provides legalization strategies.
Definition at line 24 of file MipsLegalizerInfo.h.
| MipsLegalizerInfo::MipsLegalizerInfo | ( | const MipsSubtarget & | ST | ) |
Definition at line 53 of file MipsLegalizerInfo.cpp.
References CheckTy0Ty1MemSizeAlign(), CheckTyN(), llvm::MipsSubtarget::getInstrInfo(), llvm::MipsSubtarget::hasMips32r2(), llvm::MipsSubtarget::hasMips32r6(), llvm::MipsSubtarget::hasMSA(), llvm::LLT::pointer(), llvm::LLT::scalar(), llvm::LLT::vector(), and llvm::verify().
|
overridevirtual |
Reimplemented from llvm::LegalizerInfo.
Definition at line 259 of file MipsLegalizerInfo.cpp.
References llvm::MCID::Bitcast, llvm::BitsToDouble(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildFConstant(), llvm::MachineIRBuilder::buildFPTrunc(), llvm::MachineIRBuilder::buildFSub(), llvm::MachineIRBuilder::buildInstr(), llvm::MipsISD::BuildPairF64, llvm::MachineInstrBuilder::constrainAllUses(), llvm::MachineInstr::eraseFromParent(), llvm::MachineIRBuilder::getMF(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MipsSubtarget::getRegBankInfo(), llvm::MipsSubtarget::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::MachineIRBuilder::getTII(), llvm::MachineRegisterInfo::getType(), llvm::MipsSubtarget::isFP64bit(), llvm::LLT::scalar(), and llvm::MachineIRBuilder::setInstr().
|
overridevirtual |
Return true if MI is either legal or has been legalized and false if not legal.
Reimplemented from llvm::LegalizerInfo.
Definition at line 355 of file MipsLegalizerInfo.cpp.
References llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildLoad(), llvm::MachineIRBuilder::buildStore(), llvm::constrainSelectedInstRegOperands(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::createMemLibcall(), llvm::MachineInstr::eraseFromParent(), llvm::MipsSubtarget::getInstrInfo(), llvm::MachineInstr::getIntrinsicID(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineInstr::getMF(), llvm::MachineInstr::getOperand(), llvm::MipsSubtarget::getRegBankInfo(), llvm::MipsSubtarget::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::MachineMemOperand::MOLoad, llvm::MachineMemOperand::MOStore, MSA2OpIntrinsicToGeneric(), MSA3OpIntrinsicToGeneric(), llvm::LLT::pointer(), SelectMSA3OpIntrinsic(), llvm::MachineIRBuilder::setInstr(), llvm::ARM_MB::ST, TII, llvm::ISD::TRAP, TRI, and llvm::LegalizerHelper::UnableToLegalize.
1.8.13