23 #ifndef LLVM_TARGET_TARGETLOWERING_H
24 #define LLVM_TARGET_TARGETLOWERING_H
44 class FunctionLoweringInfo;
45 class ImmutableCallSite;
47 class MachineBasicBlock;
48 class MachineFunction;
50 class MachineJumpTableInfo;
53 template<
typename T>
class SmallVectorImpl;
55 class TargetRegisterClass;
56 class TargetLibraryInfo;
57 class TargetLoweringObjectFile;
191 return BypassSlowDivWidths;
241 return isVec ? BooleanVectorContents : BooleanContents;
246 return SchedPreferenceInfo;
260 assert(RC &&
"This value type is not natively supported!");
279 return RepRegClassCostForVT[VT.
SimpleTy];
298 std::fill(ValueTypeActions,
array_endof(ValueTypeActions), 0);
307 ValueTypeActions[
I] = Action;
312 return ValueTypeActions;
365 unsigned &NumIntermediates,
366 MVT &RegisterVT)
const;
466 "Table isn't big enough!");
481 "Table isn't big enough!");
499 "Table isn't big enough!");
501 return (
LegalizeAction)((IndexedModeActions[Ty][IdxMode] & 0xf0) >> 4);
517 "Table isn't big enough!");
536 "Table isn't big enough!");
538 uint32_t Shift = 2 * (VT.
SimpleTy & 0xF);
541 assert(Action !=
Promote &&
"Can't promote condition code!");
557 "This operation isn't promoted!");
560 std::map<std::pair<unsigned, MVT::SimpleValueType>,
562 PromoteToType.find(std::make_pair(Op, VT.
SimpleTy));
563 if (PTTI != PromoteToType.end())
return PTTI->second;
566 "Cannot autopromote this type, add it with AddPromotedToType.");
572 "Didn't find type to promote to!");
591 if (
PointerType *PT = dyn_cast<PointerType>(Elm)) {
614 return RegisterTypeForVT[VT.
SimpleTy];
627 unsigned NumIntermediates;
629 NumIntermediates, RegisterVT);
655 unsigned NumIntermediates;
661 return (BitWidth + RegWidth - 1) / RegWidth;
674 assert(
unsigned(NT >> 3) <
array_lengthof(TargetDAGCombineArray));
675 return TargetDAGCombineArray[NT >> 3] & (1 << (NT&7));
733 unsigned ,
unsigned ,
752 return UseUnderscoreSetJmp;
757 return UseUnderscoreLongJmp;
762 return SupportJumpTables;
768 return MinimumJumpTableEntries;
774 return StackPointerRegisterToSaveRestore;
780 return ExceptionPointerRegister;
786 return ExceptionSelectorRegister;
798 return JumpBufAlignment;
803 return MinStackArgumentAlignment;
808 return MinFunctionAlignment;
813 return PrefFunctionAlignment;
818 return PrefLoopAlignment;
824 return InsertFencesForAtomic;
874 BooleanVectorContents = Ty;
879 SchedPreferenceInfo = Pref;
885 UseUnderscoreSetJmp = Val;
891 UseUnderscoreLongJmp = Val;
896 SupportJumpTables = Val;
902 MinimumJumpTableEntries = Val;
908 StackPointerRegisterToSaveRestore = R;
914 ExceptionPointerRegister = R;
920 ExceptionSelectorRegister = R;
926 SelectIsExpensive = isExpensive;
932 JumpIsExpensive = isExpensive;
942 BypassSlowDivWidths[SlowBitWidth] = FastBitWidth;
954 AvailableRegClasses.push_back(std::make_pair(VT, RC));
962 AvailableRegClasses.clear();
971 virtual std::pair<const TargetRegisterClass*, uint8_t>
982 assert(Op <
array_lengthof(OpActions[0]) &&
"Table isn't big enough!");
991 "Table isn't big enough!");
992 LoadExtActions[VT.
SimpleTy][ExtType] = (uint8_t)Action;
1000 "Table isn't big enough!");
1012 (
unsigned)Action < 0xf &&
"Table isn't big enough!");
1015 IndexedModeActions[(
unsigned)VT.
SimpleTy][IdxMode] |= ((uint8_t)Action) <<4;
1026 (
unsigned)Action < 0xf &&
"Table isn't big enough!");
1029 IndexedModeActions[(
unsigned)VT.
SimpleTy][IdxMode] |= ((uint8_t)Action);
1038 "Table isn't big enough!");
1042 uint32_t Shift = 2 * (VT.
SimpleTy & 0xF);
1043 CondCodeActions[CC][VT.
SimpleTy >> 4] &= ~((uint32_t)0x3 << Shift);
1044 CondCodeActions[CC][VT.
SimpleTy >> 4] |= (uint32_t)Action << Shift;
1059 assert(
unsigned(NT >> 3) <
array_lengthof(TargetDAGCombineArray));
1060 TargetDAGCombineArray[NT >> 3] |= 1 << (NT&7);
1071 JumpBufAlignment =
Align;
1076 MinFunctionAlignment =
Align;
1083 PrefFunctionAlignment =
Align;
1090 PrefLoopAlignment =
Align;
1095 MinStackArgumentAlignment =
Align;
1101 InsertFencesForAtomic = fence;
1227 unsigned & )
const {
1232 unsigned & )
const {
1287 return LibcallRoutineNames[
Call];
1293 CmpLibcallCCs[
Call] = CC;
1299 return CmpLibcallCCs[
Call];
1304 LibcallCallingConvs[
Call] = CC;
1309 return LibcallCallingConvs[
Call];
1318 bool IsLittleEndian;
1322 bool SelectIsExpensive;
1338 bool Pow2DivIsCheap;
1343 bool JumpIsExpensive;
1348 bool UseUnderscoreSetJmp;
1353 bool UseUnderscoreLongJmp;
1357 bool SupportJumpTables;
1360 int MinimumJumpTableEntries;
1375 unsigned JumpBufSize;
1378 unsigned JumpBufAlignment;
1381 unsigned MinStackArgumentAlignment;
1385 unsigned MinFunctionAlignment;
1389 unsigned PrefFunctionAlignment;
1392 unsigned PrefLoopAlignment;
1397 bool InsertFencesForAtomic;
1401 unsigned StackPointerRegisterToSaveRestore;
1405 unsigned ExceptionPointerRegister;
1409 unsigned ExceptionSelectorRegister;
1469 ValueTypeActionImpl ValueTypeActions;
1484 &&
"Promote may not follow Expand or Promote");
1497 assert(VT.
isInteger() &&
"Float types must be simple");
1502 assert(NVT != VT &&
"Unable to round integer VT");
1547 EVT OldEltVT = EltVT;
1552 ).getRoundIntegerType(Context);
1584 if (LargerVector ==
MVT())
break;
1603 std::vector<std::pair<MVT, const TargetRegisterClass*> > AvailableRegClasses;
1760 unsigned NumOps,
bool isSigned,
1761 SDLoc dl,
bool doesNotReturn =
false,
1762 bool isReturnValueUsed =
true)
const;
1813 TargetLoweringOpt &TLO,
unsigned Depth = 0)
const;
1821 unsigned Depth = 0)
const;
1826 unsigned Depth = 0)
const;
1860 DAGCombinerInfo &DCI,
SDLoc dl)
const;
1992 bool isVarArg,
bool isInReg,
unsigned numFixedArgs,
1994 bool doesNotReturn,
bool isReturnValueUsed,
SDValue callee,
2007 std::pair<SDValue, SDValue>
LowerCallTo(CallLoweringInfo &CLI)
const;
2072 return VT.
bitsLT(MinVT) ? MinVT : VT;
2248 virtual std::pair<unsigned, const TargetRegisterClass*>
2260 std::vector<SDValue> &Ops,
2269 std::vector<SDNode*> *Created)
const;
2271 std::vector<SDNode*> *Created)
const;
EVT getRoundIntegerType(LLVMContext &Context) const
virtual SDValue LowerReturn(SDValue, CallingConv::ID, bool, const SmallVectorImpl< ISD::OutputArg > &, const SmallVectorImpl< SDValue > &, SDLoc, SelectionDAG &) const
bool LegalOperations() const
T * array_endof(T(&x)[N])
CallingConv::ID getLibcallCallingConv(RTLIB::Libcall Call) const
Get the CallingConv that should be used for the specified libcall.
bool isIndexedStoreLegal(unsigned IdxMode, EVT VT) const
Return true if the specified indexed load is legal on this target.
CombineLevel getDAGCombineLevel()
unsigned getPrefLoopAlignment() const
Return the preferred loop alignment.
unsigned getMaxStoresPerMemcpy(bool OptSize) const
Get maximum # of store operations permitted for llvm.memcpy.
LegalizeTypeAction getTypeAction(LLVMContext &Context, EVT VT) const
unsigned getPrefFunctionAlignment() const
Return the preferred function alignment.
unsigned getNumRegisters(LLVMContext &Context, EVT VT) const
void setSupportJumpTables(bool Val)
Indicate whether the target can generate code for jump tables.
static MVT getVectorVT(MVT VT, unsigned NumElements)
bool ShrinkDemandedConstant(SDValue Op, const APInt &Demanded)
bool isPow2DivCheap() const
Return true if pow2 div is cheaper than a chain of srl/add/sra.
virtual ~TargetLoweringBase()
const TargetMachine & getTargetMachine() const
virtual void ComputeConstraintToUse(AsmOperandInfo &OpInfo, SDValue Op, SelectionDAG *DAG=0) const
bool isCalledByLegalizer() const
void setJumpBufAlignment(unsigned Align)
bool isIntDivCheap() const
virtual bool allowTruncateForTailCall(Type *, Type *) const
virtual bool isLoadBitCastBeneficial(EVT, EVT) const
virtual ConstraintType getConstraintType(const std::string &Constraint) const
Given a constraint, return the type of constraint it is for this target.
bool usesUnderscoreSetJmp() const
Determine if we should use _setjmp or setjmp to implement llvm.setjmp.
virtual bool getPreIndexedAddressParts(SDNode *, SDValue &, SDValue &, ISD::MemIndexedMode &, SelectionDAG &) const
virtual std::pair< const TargetRegisterClass *, uint8_t > findRepresentativeClass(MVT VT) const
static ISD::NodeType getExtendForContent(BooleanContent Content)
virtual bool isFAbsFree(EVT VT) const
Type * getTypeForEVT(LLVMContext &Context) const
unsigned getSizeInBits() const
bool ShrinkDemandedOp(SDValue Op, unsigned BitWidth, const APInt &Demanded, SDLoc dl)
virtual bool isLegalICmpImmediate(int64_t) const
void clearOperationActions()
Remove all operation actions.
void setBooleanVectorContents(BooleanContent Ty)
EVT getTypeToExpandTo(LLVMContext &Context, EVT VT) const
virtual bool isZExtFree(Type *, Type *) const
bool supportJumpTables() const
Return whether the target can generate code for jump tables.
unsigned getPointerTypeSizeInBits(Type *Ty) const
bool bitsLT(MVT VT) const
Return true if this has less bits than VT.
std::pair< LegalizeTypeAction, EVT > LegalizeKind
virtual int getScalingFactorCost(const AddrMode &AM, Type *Ty) const
Return the cost of the scaling factor used in the addressing mode represented by AM for this target...
virtual unsigned ComputeNumSignBitsForTargetNode(SDValue Op, unsigned Depth=0) const
LegalizeAction getOperationAction(unsigned Op, EVT VT) const
virtual void HandleByVal(CCState *, unsigned &, unsigned) const
Target-specific cleanup for formal ByVal parameters.
virtual MVT getScalarShiftAmountTy(EVT LHSTy) const
virtual bool isFPImmLegal(const APFloat &, EVT) const
virtual void AdjustInstrPostInstrSelection(MachineInstr *MI, SDNode *Node) const
LegalizeTypeAction getTypeAction(MVT VT) const
LegalizeAction getTruncStoreAction(MVT ValVT, MVT MemVT) const
virtual const TargetRegisterClass * getRepRegClassFor(MVT VT) const
virtual bool isTypeDesirableForOp(unsigned, EVT VT) const
virtual Sched::Preference getSchedulingPreference(SDNode *) const
bool isAfterLegalizeVectorOps() const
bool SimplifyDemandedBits(SDValue Op, const APInt &DemandedMask, APInt &KnownZero, APInt &KnownOne, TargetLoweringOpt &TLO, unsigned Depth=0) const
bool isIndexedLoadLegal(unsigned IdxMode, EVT VT) const
Return true if the specified indexed load is legal on this target.
void setTruncStoreAction(MVT ValVT, MVT MemVT, LegalizeAction Action)
EVT getValueType(Type *Ty, bool AllowUnknown=false) const
unsigned getPointerSizeInBits(uint32_t AS=0) const
bool isVector() const
isVector - Return true if this is a vector value type.
virtual const char * LowerXConstraint(EVT ConstraintVT) const
EVT getShiftAmountTy(EVT LHSTy) const
void setAttributes(ImmutableCallSite *CS, unsigned AttrIdx)
Set CallLoweringInfo attribute flags based on a call instruction and called function attributes...
virtual bool canOpTrap(unsigned Op, EVT VT) const
bool isLittleEndian() const
void setJumpIsExpensive(bool isExpensive=true)
virtual const char * getTargetNodeName(unsigned Opcode) const
This method returns the name of a target specific DAG node.
virtual SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const
virtual bool isLegalAddImmediate(int64_t) const
virtual bool isZExtFree(EVT, EVT) const
#define llvm_unreachable(msg)
std::pair< SDValue, SDValue > makeLibCall(SelectionDAG &DAG, RTLIB::Libcall LC, EVT RetVT, const SDValue *Ops, unsigned NumOps, bool isSigned, SDLoc dl, bool doesNotReturn=false, bool isReturnValueUsed=true) const
Returns a pair of (return value, chain).
TargetLowering::ConstraintType ConstraintType
virtual EVT getSetCCResultType(LLVMContext &Context, EVT VT) const
virtual bool isNoopAddrSpaceCast(unsigned SrcAS, unsigned DestAS) const
Returns true if a cast between SrcAS and DestAS is a noop.
void setCondCodeAction(ISD::CondCode CC, MVT VT, LegalizeAction Action)
This file contains the simple types necessary to represent the attributes associated with functions a...
bool getInsertFencesForAtomic() const
void addBypassSlowDiv(unsigned int SlowBitWidth, unsigned int FastBitWidth)
Tells the code generator which bitwidths to bypass.
unsigned getJumpBufSize() const
void setOperationAction(unsigned Op, MVT VT, LegalizeAction Action)
virtual MVT getPointerTy(uint32_t=0) const
ID
LLVM Calling Convention Representation.
virtual const uint16_t * getScratchRegisters(CallingConv::ID CC) const
SDValue SimplifySetCC(EVT VT, SDValue N0, SDValue N1, ISD::CondCode Cond, bool foldBooleans, DAGCombinerInfo &DCI, SDLoc dl) const
Sched::Preference getSchedulingPreference() const
Return target scheduling preference.
bool isInteger() const
isInteger - Return true if this is an integer, or a vector integer type.
int InstructionOpcodeToISD(unsigned Opcode) const
Get the ISD node that corresponds to the Instruction class opcode.
SmallVector< ISD::InputArg, 32 > Ins
EVT getVectorElementType() const
virtual bool getPostIndexedAddressParts(SDNode *, SDNode *, SDValue &, SDValue &, ISD::MemIndexedMode &, SelectionDAG &) const
MVT getSimpleValueType(Type *Ty, bool AllowUnknown=false) const
Return the MVT corresponding to this LLVM type. See getValueType.
const DenseMap< unsigned int, unsigned int > & getBypassSlowDivWidths() const
virtual bool ShouldShrinkFPConstant(EVT) const
virtual bool mayBeEmittedAsTailCall(CallInst *) const
virtual bool isUsedByReturnOnly(SDNode *, SDValue &) const
void setSelectIsExpensive(bool isExpensive=true)
bool usesUnderscoreLongJmp() const
Determine if we should use _longjmp or longjmp to implement llvm.longjmp.
LLVMContext & getContext() const
getContext - Return the LLVMContext in which this type was uniqued.
std::pair< SDValue, SDValue > LowerCallTo(CallLoweringInfo &CLI) const
size_t array_lengthof(T(&)[N])
Find the length of an array.
SDValue CombineTo(SDNode *N, const std::vector< SDValue > &To, bool AddTo=true)
const ValueTypeActionImpl & getValueTypeActions() const
This contains information for each constraint that we are lowering.
SmallVector< ISD::OutputArg, 32 > Outs
virtual std::pair< unsigned, const TargetRegisterClass * > getRegForInlineAsmConstraint(const std::string &Constraint, MVT VT) const
int getMinimumJumpTableEntries() const
bool isLoadExtLegal(unsigned ExtType, EVT VT) const
Return true if the specified load with extension is legal on this target.
virtual SDValue LowerCall(CallLoweringInfo &, SmallVectorImpl< SDValue > &) const
virtual bool isDesirableToTransformToIntegerOp(unsigned, EVT) const
virtual unsigned getMaximalGlobalOffset() const
bool isOperationLegalOrPromote(unsigned Op, EVT VT) const
SDValue BuildSDIV(SDNode *N, SelectionDAG &DAG, bool IsAfterLegalization, std::vector< SDNode * > *Created) const
Given an ISD::SDIV node expressing a divide by constant, return a DAG expression to select that will ...
unsigned getNumElements() const
Return the number of elements in the Vector type.
virtual bool isSelectSupported(SelectSupportKind) const
Type * getElementType() const
virtual MVT getVectorIdxTy() const
bool isLegalRC(const TargetRegisterClass *RC) const
bool isPow2VectorType() const
isPow2VectorType - Returns true if the given vector is a power of 2.
const TargetLoweringObjectFile & getObjFileLowering() const
virtual bool getStackCookieLocation(unsigned &, unsigned &) const
void GetReturnInfo(Type *ReturnType, AttributeSet attr, SmallVectorImpl< ISD::OutputArg > &Outs, const TargetLowering &TLI)
bool isTruncStoreLegal(EVT ValVT, EVT MemVT) const
A self-contained host- and target-independent arbitrary-precision floating-point software implementat...
virtual bool isTruncateFree(EVT, EVT) const
bool isTypeLegal(EVT VT) const
bool isMatchingInputConstraint() const
virtual FastISel * createFastISel(FunctionLoweringInfo &, const TargetLibraryInfo *) const
bool isInteger() const
isInteger - Return true if this is an integer, or a vector integer type.
AsmOperandInfo(const AsmOperandInfo &info)
Copy constructor for copying from an AsmOperandInfo.
virtual bool isShuffleMaskLegal(const SmallVectorImpl< int > &, EVT) const
unsigned getVectorNumElements() const
DAGCombinerInfo(SelectionDAG &dag, CombineLevel level, bool cl, void *dc)
void setJumpBufSize(unsigned Size)
Set the target's required jmp_buf buffer size (in bytes); default is 200.
void addRegisterClass(MVT VT, const TargetRegisterClass *RC)
void setTargetDAGCombine(ISD::NodeType NT)
bool isOperationLegalOrCustom(unsigned Op, EVT VT) const
virtual EVT getOptimalMemOpType(uint64_t, unsigned, unsigned, bool, bool, bool, MachineFunction &) const
unsigned getMatchedOperand() const
bool isFloatingPoint() const
isFloatingPoint - Return true if this is a FP, or a vector FP type.
bool isBeforeLegalizeOps() const
virtual bool isSafeMemOpType(MVT) const
bool isOperationLegal(unsigned Op, EVT VT) const
Return true if the specified operation is legal on this target.
unsigned getMaxStoresPerMemmove(bool OptSize) const
Get maximum # of store operations permitted for llvm.memmove.
void setBooleanContents(BooleanContent Ty)
ConstraintInfo()
Default constructor.
void AddToWorklist(SDNode *N)
virtual bool isTruncateFree(Type *, Type *) const
const DataLayout * getDataLayout() const
virtual bool isFMAFasterThanFMulAndFAdd(EVT) const
bool isBeforeLegalize() const
bool CombineTo(SDValue O, SDValue N)
MVT getRegisterType(MVT VT) const
Return the type of registers that this ValueType will eventually require.
virtual bool isNarrowingProfitable(EVT, EVT) const
virtual void computeMaskedBitsForTargetNode(const SDValue Op, APInt &KnownZero, APInt &KnownOne, const SelectionDAG &DAG, unsigned Depth=0) const
bool isPredictableSelectExpensive() const
void setPrefFunctionAlignment(unsigned Align)
virtual unsigned getByValTypeAlignment(Type *Ty) const
void AddPromotedToType(unsigned Opc, MVT OrigVT, MVT DestVT)
unsigned getVectorTypeBreakdown(LLVMContext &Context, EVT VT, EVT &IntermediateVT, unsigned &NumIntermediates, MVT &RegisterVT) const
unsigned MaxStoresPerMemmove
Specify maximum bytes of store instructions per memmove call.
unsigned getStackPointerRegisterToSaveRestore() const
bool isSlowDivBypassed() const
Returns true if target has indicated at least one type should be bypassed.
LegalizeTypeAction getTypeAction(MVT VT) const
uint64_t NextPowerOf2(uint64_t A)
CallLoweringInfo(SDValue chain, Type *retTy, bool retSExt, bool retZExt, bool isVarArg, bool isInReg, unsigned numFixedArgs, CallingConv::ID callConv, bool isTailCall, bool doesNotReturn, bool isReturnValueUsed, SDValue callee, ArgListTy &args, SelectionDAG &dag, SDLoc dl)
std::vector< ArgListEntry > ArgListTy
unsigned getExceptionPointerRegister() const
virtual SDValue LowerFormalArguments(SDValue, CallingConv::ID, bool, const SmallVectorImpl< ISD::InputArg > &, SDLoc, SelectionDAG &, SmallVectorImpl< SDValue > &) const
static EVT getVectorVT(LLVMContext &Context, EVT VT, unsigned NumElements)
void setUseUnderscoreLongJmp(bool Val)
void setLibcallCallingConv(RTLIB::Libcall Call, CallingConv::ID CC)
Set the CallingConv that should be used for the specified libcall.
std::string ConstraintCode
virtual SDValue getPICJumpTableRelocBase(SDValue Table, SelectionDAG &DAG) const
Returns relocation base for the given PIC jumptable.
ISD::CondCode getCmpLibcallCC(RTLIB::Libcall Call) const
void setCmpLibcallCC(RTLIB::Libcall Call, ISD::CondCode CC)
void setLoadExtAction(unsigned ExtType, MVT VT, LegalizeAction Action)
virtual void ReplaceNodeResults(SDNode *, SmallVectorImpl< SDValue > &, SelectionDAG &) const
void initActions()
Initialize all of the actions to default values.
std::vector< AsmOperandInfo > AsmOperandInfoVector
virtual MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr *MI, MachineBasicBlock *MBB) const
virtual MVT getTypeForExtArgOrReturn(MVT VT, ISD::NodeType) const
virtual bool hasPairedLoad(Type *, unsigned &) const
virtual unsigned getJumpTableEncoding() const
void RemoveFromWorklist(SDNode *N)
const char * getLibcallName(RTLIB::Libcall Call) const
Get the libcall routine name for the specified libcall.
LegalizeAction getIndexedStoreAction(unsigned IdxMode, MVT VT) const
void setExceptionPointerRegister(unsigned R)
BooleanContent getBooleanContents(bool isVec) const
virtual bool isVectorClearMaskLegal(const SmallVectorImpl< int > &, EVT) const
TargetLoweringOpt(SelectionDAG &InDAG, bool LT, bool LO)
LegalizeAction getLoadExtAction(unsigned ExtType, MVT VT) const
virtual const MCExpr * getPICJumpTableRelocBaseExpr(const MachineFunction *MF, unsigned JTI, MCContext &Ctx) const
virtual bool isGAPlusOffset(SDNode *N, const GlobalValue *&GA, int64_t &Offset) const
void clearRegisterClasses()
Remove all register classes.
virtual bool shouldSplitVectorElementType(EVT) const
bool isInTailCallPosition(SelectionDAG &DAG, SDNode *Node, SDValue &Chain) const
#define LLVM_DELETED_FUNCTION
void setMinimumJumpTableEntries(int Val)
void setIndexedLoadAction(unsigned IdxMode, MVT VT, LegalizeAction Action)
Class for arbitrary precision integers.
void computeRegisterProperties()
virtual bool IsDesirableToPromoteOp(SDValue, EVT &) const
void setExceptionSelectorRegister(unsigned R)
void setMinFunctionAlignment(unsigned Align)
Set the target's minimum function alignment (in log2(bytes))
virtual const TargetRegisterClass * getRegClassFor(MVT VT) const
void setPrefLoopAlignment(unsigned Align)
ZERO_EXTEND - Used for integer types, zeroing the new bits.
AddrMode
ARM Addressing Modes.
ANY_EXTEND - Used for integer types. The high bits are undefined.
static cl::opt< AlignMode > Align(cl::desc("Load/store alignment support"), cl::Hidden, cl::init(DefaultAlign), cl::values(clEnumValN(DefaultAlign,"arm-default-align","Generate unaligned accesses only on hardware/OS ""combinations that are known to support them"), clEnumValN(StrictAlign,"arm-strict-align","Disallow all unaligned memory accesses"), clEnumValN(NoStrictAlign,"arm-no-strict-align","Allow unaligned memory accesses"), clEnumValEnd))
virtual bool CanLowerReturn(CallingConv::ID, MachineFunction &, bool, const SmallVectorImpl< ISD::OutputArg > &, LLVMContext &) const
virtual MVT::SimpleValueType getCmpLibcallReturnType() const
MVT getRegisterType(LLVMContext &Context, EVT VT) const
Return the type of registers that this ValueType will eventually require.
SmallVector< SDValue, 32 > OutVals
LegalizeAction getIndexedLoadAction(unsigned IdxMode, MVT VT) const
SDValue BuildExactSDIV(SDValue Op1, SDValue Op2, SDLoc dl, SelectionDAG &DAG) const
Given an exact SDIV by a constant, create a multiplication with the multiplicative inverse of the con...
SelectSupportKind
Enum that describes what type of support for selects the target has.
virtual void LowerAsmOperandForConstraint(SDValue Op, std::string &Constraint, std::vector< SDValue > &Ops, SelectionDAG &DAG) const
virtual bool GetAddrModeArguments(IntrinsicInst *, SmallVectorImpl< Value * > &, Type *&) const
unsigned getJumpBufAlignment() const
void setTypeAction(MVT VT, LegalizeTypeAction Action)
AsmOperandInfo(const InlineAsm::ConstraintInfo &info)
Copy constructor for copying from a ConstraintInfo.
unsigned getMinFunctionAlignment() const
Return the minimum function alignment.
unsigned getMaxStoresPerMemset(bool OptSize) const
Get maximum # of store operations permitted for llvm.memset.
ImmutableCallSite - establish a view to a call site for examination.
unsigned getSizeInBits() const
getSizeInBits - Return the size of the specified value type in bits.
unsigned MaxStoresPerMemmoveOptSize
unsigned MaxStoresPerMemcpyOptSize
void setStackPointerRegisterToSaveRestore(unsigned R)
bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const
void setLibcallName(RTLIB::Libcall Call, const char *Name)
Rename the default libcall routine name for the specified libcall.
virtual const MCExpr * LowerCustomJumpTableEntry(const MachineJumpTableInfo *, const MachineBasicBlock *, unsigned, MCContext &) const
unsigned MaxStoresPerMemcpy
Specify maximum bytes of store instructions per memcpy call.
static EVT getEVT(Type *Ty, bool HandleUnknown=false)
EVT getPow2VectorType(LLVMContext &Context) const
LegalizeKind getTypeConversion(LLVMContext &Context, EVT VT) const
virtual AsmOperandInfoVector ParseConstraints(ImmutableCallSite CS) const
bool isSelectExpensive() const
Return true if the select operation is expensive for this target.
virtual bool ExpandInlineAsm(CallInst *) const
bool isFloatingPoint() const
isFloatingPoint - Return true if this is a FP, or a vector FP type.
virtual void resetOperationActions()
Reset the operation actions based on target options.
virtual bool getTgtMemIntrinsic(IntrinsicInfo &, const CallInst &, unsigned) const
CallLoweringInfo(SDValue chain, Type *retTy, FunctionType *FTy, bool isTailCall, SDValue callee, ArgListTy &args, SelectionDAG &dag, SDLoc dl, ImmutableCallSite &cs)
Constructs a call lowering context based on the ImmutableCallSite cs.
void setIntDivIsCheap(bool isCheap=true)
void setMinStackArgumentAlignment(unsigned Align)
Set the minimum stack alignment of an argument (in log2(bytes)).
virtual bool allowsUnalignedMemoryAccesses(EVT, bool *=0) const
Determine if the target supports unaligned memory accesses.
void setSchedulingPreference(Sched::Preference Pref)
Specify the target scheduling preference.
EVT getTypeToTransformTo(LLVMContext &Context, EVT VT) const
LLVM Value Representation.
void setUseUnderscoreSetJmp(bool Val)
void setInsertFencesForAtomic(bool fence)
virtual bool isZExtFree(SDValue Val, EVT VT2) const
bool hasTargetDAGCombine(ISD::NodeType NT) const
bool isOperationExpand(unsigned Op, EVT VT) const
SDValue BuildUDIV(SDNode *N, SelectionDAG &DAG, bool IsAfterLegalization, std::vector< SDNode * > *Created) const
Given an ISD::UDIV node expressing a divide by constant, return a DAG expression to select that will ...
virtual ConstraintWeight getMultipleConstraintMatchWeight(AsmOperandInfo &info, int maIndex) const
virtual uint8_t getRepRegClassCostFor(MVT VT) const
virtual bool isLegalAddressingMode(const AddrMode &AM, Type *Ty) const
bool isPowerOf2_32(uint32_t Value)
unsigned MaxStoresPerMemset
Specify maximum number of store instructions per memset call.
unsigned MaxStoresPerMemsetOptSize
virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const
unsigned getMinStackArgumentAlignment() const
Return the minimum stack alignment of an argument.
unsigned getExceptionSelectorRegister() const
MVT ConstraintVT
The ValueType for the operand value.
MVT getVectorElementType() const
BooleanContent
Enum that describes how the target represents true/false values.
void setPow2DivIsCheap(bool isCheap=true)
bool isCondCodeLegal(ISD::CondCode CC, MVT VT) const
Return true if the specified condition code is legal on this target.
virtual ConstraintWeight getSingleConstraintMatchWeight(AsmOperandInfo &info, const char *constraint) const
static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth)
bool isJumpExpensive() const
virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const
virtual bool isFNegFree(EVT VT) const
virtual bool hasPairedLoad(EVT, unsigned &) const
LegalizeAction getCondCodeAction(ISD::CondCode CC, MVT VT) const
bool PredictableSelectIsExpensive
virtual void LowerOperationWrapper(SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const
std::pair< unsigned, MVT > getTypeLegalizationCost(Type *Ty) const
Estimate the cost of type-legalization and the legalized type.
void CommitTargetLoweringOpt(const TargetLoweringOpt &TLO)
void setIndexedStoreAction(unsigned IdxMode, MVT VT, LegalizeAction Action)
MVT getTypeToPromoteTo(unsigned Op, MVT VT) const
unsigned getVectorNumElements() const
void softenSetCCOperands(SelectionDAG &DAG, EVT VT, SDValue &NewLHS, SDValue &NewRHS, ISD::CondCode &CCCode, SDLoc DL) const