LLVM
8.0.1
|
This class provides the information for the target register banks. More...
#include "Target/ARM/ARMLegalizerInfo.h"
Public Member Functions | |
ARMLegalizerInfo (const ARMSubtarget &ST) | |
bool | legalizeCustom (MachineInstr &MI, MachineRegisterInfo &MRI, MachineIRBuilder &MIRBuilder, GISelChangeObserver &Observer) const override |
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 MachineInstr &MI, const MachineRegisterInfo &MRI) const |
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 the information for the target register banks.
Definition at line 28 of file ARMLegalizerInfo.h.
ARMLegalizerInfo::ARMLegalizerInfo | ( | const ARMSubtarget & | ST | ) |
Definition at line 67 of file ARMLegalizerInfo.cpp.
References AEABI(), assert(), llvm::CmpInst::BAD_ICMP_PREDICATE, llvm::LegalizeActions::Custom, llvm::CmpInst::FCMP_OEQ, llvm::CmpInst::FCMP_OGE, llvm::CmpInst::FCMP_OGT, llvm::CmpInst::FCMP_OLE, llvm::CmpInst::FCMP_OLT, llvm::CmpInst::FCMP_ONE, llvm::CmpInst::FCMP_ORD, llvm::CmpInst::FCMP_UEQ, llvm::CmpInst::FCMP_UGE, llvm::CmpInst::FCMP_UGT, llvm::CmpInst::FCMP_ULE, llvm::CmpInst::FCMP_ULT, llvm::CmpInst::FCMP_UNE, llvm::CmpInst::FCMP_UNO, llvm::ARMSubtarget::getInstrInfo(), llvm::ARMSubtarget::hasDivideInARMMode(), llvm::ARMSubtarget::hasV5TOps(), llvm::ARMSubtarget::hasVFP2(), llvm::ARMSubtarget::hasVFP4(), llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_SGE, llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_SLE, llvm::CmpInst::ICMP_SLT, llvm::CmpInst::isFPPredicate(), llvm::ARMSubtarget::isThumb(), llvm::ARMSubtarget::isThumb1Only(), llvm::CmpInst::LAST_FCMP_PREDICATE, llvm::LegalizeActions::Libcall, llvm_unreachable, llvm::LegalizeActions::Lower, llvm::LLT::pointer(), llvm::LLT::scalar(), Size, llvm::ARMSubtarget::useSoftFloat(), llvm::verify(), and widen_8_16().
|
overridevirtual |
Reimplemented from llvm::LegalizerInfo.
Definition at line 340 of file ARMLegalizerInfo.cpp.
References assert(), llvm::CmpInst::BAD_ICMP_PREDICATE, llvm::APFloat::bitcastToAPInt(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildICmp(), llvm::MachineIRBuilder::buildOr(), llvm::MachineIRBuilder::buildTrunc(), llvm::MachineIRBuilder::buildUnmerge(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::createLibcall(), llvm::MachineInstr::eraseFromParent(), llvm::CmpInst::FCMP_FALSE, llvm::CmpInst::FCMP_TRUE, llvm::ConstantInt::get(), llvm::StructType::get(), llvm::Function::getContext(), llvm::MachineFunction::getDataLayout(), llvm::Type::getDoubleTy(), llvm::Type::getFloatTy(), llvm::MachineOperand::getFPImm(), llvm::MachineFunction::getFunction(), llvm::Type::getInt32Ty(), llvm::getLLTForType(), llvm::MachineIRBuilder::getMF(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getPredicate(), llvm::MachineOperand::getReg(), llvm::LLT::getSizeInBits(), llvm::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::ConstantFP::getValueAPF(), llvm::CmpInst::isIntPredicate(), llvm::LegalizerHelper::Legalized, llvm::LegalizeActions::Libcall, MI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), Results, llvm::LLT::scalar(), llvm::MachineIRBuilder::setInstr(), and llvm::Function::size().