LLVM  3.7.0
Public Member Functions | List of all members
llvm::X86SelectionDAGInfo Class Reference

#include <X86SelectionDAGInfo.h>

Inheritance diagram for llvm::X86SelectionDAGInfo:
[legend]
Collaboration diagram for llvm::X86SelectionDAGInfo:
[legend]

Public Member Functions

 X86SelectionDAGInfo ()=default
 
SDValue EmitTargetCodeForMemset (SelectionDAG &DAG, SDLoc dl, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, bool isVolatile, MachinePointerInfo DstPtrInfo) const override
 EmitTargetCodeForMemset - Emit target-specific code that performs a memset. More...
 
SDValue EmitTargetCodeForMemcpy (SelectionDAG &DAG, SDLoc dl, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, bool isVolatile, bool AlwaysInline, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const override
 EmitTargetCodeForMemcpy - Emit target-specific code that performs a memcpy. More...
 
- Public Member Functions inherited from llvm::TargetSelectionDAGInfo
 TargetSelectionDAGInfo ()=default
 
virtual ~TargetSelectionDAGInfo ()
 
virtual SDValue EmitTargetCodeForMemmove (SelectionDAG &DAG, SDLoc dl, SDValue Chain, SDValue Op1, SDValue Op2, SDValue Op3, unsigned Align, bool isVolatile, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const
 EmitTargetCodeForMemmove - Emit target-specific code that performs a memmove. More...
 
virtual std::pair< SDValue,
SDValue
EmitTargetCodeForMemcmp (SelectionDAG &DAG, SDLoc dl, SDValue Chain, SDValue Op1, SDValue Op2, SDValue Op3, MachinePointerInfo Op1PtrInfo, MachinePointerInfo Op2PtrInfo) const
 EmitTargetCodeForMemcmp - Emit target-specific code that performs a memcmp, in cases where that is faster than a libcall. More...
 
virtual std::pair< SDValue,
SDValue
EmitTargetCodeForMemchr (SelectionDAG &DAG, SDLoc dl, SDValue Chain, SDValue Src, SDValue Char, SDValue Length, MachinePointerInfo SrcPtrInfo) const
 EmitTargetCodeForMemchr - Emit target-specific code that performs a memchr, in cases where that is faster than a libcall. More...
 
virtual std::pair< SDValue,
SDValue
EmitTargetCodeForStrcpy (SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Dest, SDValue Src, MachinePointerInfo DestPtrInfo, MachinePointerInfo SrcPtrInfo, bool isStpcpy) const
 EmitTargetCodeForStrcpy - Emit target-specific code that performs a strcpy or stpcpy, in cases where that is faster than a libcall. More...
 
virtual std::pair< SDValue,
SDValue
EmitTargetCodeForStrcmp (SelectionDAG &DAG, SDLoc dl, SDValue Chain, SDValue Op1, SDValue Op2, MachinePointerInfo Op1PtrInfo, MachinePointerInfo Op2PtrInfo) const
 EmitTargetCodeForStrcmp - Emit target-specific code that performs a strcmp, in cases where that is faster than a libcall. More...
 
virtual std::pair< SDValue,
SDValue
EmitTargetCodeForStrlen (SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src, MachinePointerInfo SrcPtrInfo) const
 
virtual std::pair< SDValue,
SDValue
EmitTargetCodeForStrnlen (SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src, SDValue MaxLength, MachinePointerInfo SrcPtrInfo) const
 

Detailed Description

Definition at line 25 of file X86SelectionDAGInfo.h.

Constructor & Destructor Documentation

llvm::X86SelectionDAGInfo::X86SelectionDAGInfo ( )
explicitdefault

Member Function Documentation

SDValue X86SelectionDAGInfo::EmitTargetCodeForMemcpy ( SelectionDAG DAG,
SDLoc  dl,
SDValue  Chain,
SDValue  Op1,
SDValue  Op2,
SDValue  Op3,
unsigned  Align,
bool  isVolatile,
bool  AlwaysInline,
MachinePointerInfo  DstPtrInfo,
MachinePointerInfo  SrcPtrInfo 
) const
overridevirtual

EmitTargetCodeForMemcpy - Emit target-specific code that performs a memcpy.

This can be used by targets to provide code sequences for cases that don't fit the target's parameters for simple loads/stores and can be more efficient than using a library call. This function can return a null SDValue if the target declines to use custom code and a different lowering strategy should be used.

If AlwaysInline is true, the size is constant and the target should not emit any calls and is strongly encouraged to attempt to emit inline code even if it is beyond the usual threshold because this intrinsic is being expanded in a place where calls are not feasible (e.g. within the prologue for another call). If the target chooses to decline an AlwaysInline request here, legalize will resort to using simple loads and stores.

If not DWORD aligned, it is more efficient to call the library. However if calling the library is not allowed (AlwaysInline), then soldier on as the code generated here is better than the long load-store sequence we would otherwise get.

Reimplemented from llvm::TargetSelectionDAGInfo.

Definition at line 201 of file X86SelectionDAGInfo.cpp.

References llvm::ISD::ADD, Align(), llvm::dyn_cast(), llvm::MachinePointerInfo::getAddrSpace(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getCopyToReg(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMemcpy(), llvm::SelectionDAG::getNode(), llvm::MVT::getSizeInBits(), llvm::MachineFunction::getSubtarget(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getValueType(), llvm::SelectionDAG::getVTList(), llvm::MachinePointerInfo::getWithOffset(), llvm::ConstantSDNode::getZExtValue(), llvm::MVT::Glue, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, isVolatile(), llvm::MVT::Other, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::X86ISD::REP_MOVS, and llvm::ISD::TokenFactor.

SDValue X86SelectionDAGInfo::EmitTargetCodeForMemset ( SelectionDAG DAG,
SDLoc  dl,
SDValue  Chain,
SDValue  Op1,
SDValue  Op2,
SDValue  Op3,
unsigned  Align,
bool  isVolatile,
MachinePointerInfo  DstPtrInfo 
) const
overridevirtual

EmitTargetCodeForMemset - Emit target-specific code that performs a memset.

This can be used by targets to provide code sequences for cases that don't fit the target's parameters for simple stores and can be more efficient than using a library call. This function can return a null SDValue if the target declines to use custom code and a different lowering strategy should be used.

Reimplemented from llvm::TargetSelectionDAGInfo.

Definition at line 48 of file X86SelectionDAGInfo.cpp.

References llvm::ISD::ADD, Align(), llvm::ISD::AND, llvm::EVT::bitsGT(), llvm::CallingConv::C, llvm::dyn_cast(), llvm::MachinePointerInfo::getAddrSpace(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyToReg(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getExternalSymbol(), llvm::SelectionDAG::getIntPtrConstant(), llvm::DataLayout::getIntPtrType(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMemset(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::EVT::getSizeInBits(), llvm::MachineFunction::getSubtarget(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getValueType(), llvm::Type::getVoidTy(), llvm::SelectionDAG::getVTList(), llvm::MachinePointerInfo::getWithOffset(), llvm::ConstantSDNode::getZExtValue(), llvm::MVT::Glue, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm::ConstantSDNode::isNullValue(), isVolatile(), llvm::TargetLowering::LowerCallTo(), llvm::TargetLowering::ArgListEntry::Node, llvm::MVT::Other, llvm::X86ISD::REP_STOS, llvm::TargetLowering::CallLoweringInfo::setCallee(), llvm::TargetLowering::CallLoweringInfo::setChain(), llvm::TargetLowering::CallLoweringInfo::setDebugLoc(), and llvm::TargetLowering::ArgListEntry::Ty.


The documentation for this class was generated from the following files: