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

#include "Target/X86/X86SelectionDAGInfo.h"

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

Public Member Functions

 X86SelectionDAGInfo ()=default
 
SDValue EmitTargetCodeForMemset (SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, bool isVolatile, MachinePointerInfo DstPtrInfo) const override
 Emit target-specific code that performs a memset. More...
 
SDValue EmitTargetCodeForMemcpy (SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, bool isVolatile, bool AlwaysInline, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const override
 Emit target-specific code that performs a memcpy. More...
 
- Public Member Functions inherited from llvm::SelectionDAGTargetInfo
 SelectionDAGTargetInfo ()=default
 
 SelectionDAGTargetInfo (const SelectionDAGTargetInfo &)=delete
 
SelectionDAGTargetInfooperator= (const SelectionDAGTargetInfo &)=delete
 
virtual ~SelectionDAGTargetInfo ()
 
virtual SDValue EmitTargetCodeForMemmove (SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Op1, SDValue Op2, SDValue Op3, unsigned Align, bool isVolatile, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const
 Emit target-specific code that performs a memmove. More...
 
virtual std::pair< SDValue, SDValueEmitTargetCodeForMemcmp (SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Op1, SDValue Op2, SDValue Op3, MachinePointerInfo Op1PtrInfo, MachinePointerInfo Op2PtrInfo) const
 Emit target-specific code that performs a memcmp, in cases where that is faster than a libcall. More...
 
virtual std::pair< SDValue, SDValueEmitTargetCodeForMemchr (SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Src, SDValue Char, SDValue Length, MachinePointerInfo SrcPtrInfo) const
 Emit target-specific code that performs a memchr, in cases where that is faster than a libcall. More...
 
virtual std::pair< SDValue, SDValueEmitTargetCodeForStrcpy (SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Dest, SDValue Src, MachinePointerInfo DestPtrInfo, MachinePointerInfo SrcPtrInfo, bool isStpcpy) const
 Emit target-specific code that performs a strcpy or stpcpy, in cases where that is faster than a libcall. More...
 
virtual std::pair< SDValue, SDValueEmitTargetCodeForStrcmp (SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Op1, SDValue Op2, MachinePointerInfo Op1PtrInfo, MachinePointerInfo Op2PtrInfo) const
 Emit target-specific code that performs a strcmp, in cases where that is faster than a libcall. More...
 
virtual std::pair< SDValue, SDValueEmitTargetCodeForStrlen (SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Src, MachinePointerInfo SrcPtrInfo) const
 
virtual std::pair< SDValue, SDValueEmitTargetCodeForStrnlen (SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Src, SDValue MaxLength, MachinePointerInfo SrcPtrInfo) const
 
virtual bool generateFMAsInMachineCombiner (CodeGenOpt::Level OptLevel) const
 

Detailed Description

Definition at line 26 of file X86SelectionDAGInfo.h.

Constructor & Destructor Documentation

◆ X86SelectionDAGInfo()

llvm::X86SelectionDAGInfo::X86SelectionDAGInfo ( )
explicitdefault

Member Function Documentation

◆ EmitTargetCodeForMemcpy()

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

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::SelectionDAGTargetInfo.

Definition at line 204 of file X86SelectionDAGInfo.cpp.

References llvm::ISD::ADD, llvm::dyn_cast(), llvm::N86::ECX, llvm::N86::EDI, llvm::N86::ESI, llvm::MachinePointerInfo::getAddrSpace(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getCopyToReg(), llvm::MachineFunction::getFunction(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMemcpy(), llvm::SelectionDAG::getNode(), 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, llvm::Function::optForMinSize(), llvm::MVT::Other, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::X86ISD::REP_MOVS, Results, Size, and llvm::ISD::TokenFactor.

◆ EmitTargetCodeForMemset()

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

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::SelectionDAGTargetInfo.

Definition at line 65 of file X86SelectionDAGInfo.cpp.

References llvm::ISD::ADD, llvm::AArch64CC::AL, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), llvm::EVT::bitsGT(), llvm::CallingConv::C, llvm::dyn_cast(), llvm::N86::EAX, llvm::N86::ECX, llvm::N86::EDI, 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::TargetLoweringBase::getLibcallName(), 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::TargetLoweringBase::ArgListEntry::Node, llvm::MVT::Other, llvm::X86ISD::REP_STOS, llvm::TargetLowering::CallLoweringInfo::setChain(), llvm::TargetLowering::CallLoweringInfo::setDebugLoc(), llvm::TargetLowering::CallLoweringInfo::setLibCallee(), Size, and llvm::TargetLoweringBase::ArgListEntry::Ty.


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