LLVM  3.7.0
Functions | Variables
SelectionDAG.cpp File Reference
#include "llvm/CodeGen/SelectionDAG.h"
#include "SDNodeDbgValue.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetIntrinsicInfo.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetSelectionDAGInfo.h"
#include "llvm/Target/TargetSubtargetInfo.h"
#include <algorithm>
#include <cmath>
#include <utility>
Include dependency graph for SelectionDAG.cpp:

Go to the source code of this file.

Functions

static SDVTList makeVTList (const EVT *VTs, unsigned NumVTs)
 makeVTList - Return an instance of the SDVTList struct initialized with the specified members. More...
 
static int isSignedOp (ISD::CondCode Opcode)
 isSignedOp - For an integer comparison, return 1 if the comparison is a signed operation and 2 if the result is an unsigned comparison. More...
 
static void AddNodeIDOpcode (FoldingSetNodeID &ID, unsigned OpC)
 AddNodeIDOpcode - Add the node opcode to the NodeID data. More...
 
static void AddNodeIDValueTypes (FoldingSetNodeID &ID, SDVTList VTList)
 AddNodeIDValueTypes - Value type lists are intern'd so we can represent them solely with their pointer. More...
 
static void AddNodeIDOperands (FoldingSetNodeID &ID, ArrayRef< SDValue > Ops)
 AddNodeIDOperands - Various routines for adding operands to the NodeID data. More...
 
static void AddNodeIDOperands (FoldingSetNodeID &ID, ArrayRef< SDUse > Ops)
 AddNodeIDOperands - Various routines for adding operands to the NodeID data. More...
 
static void AddNodeIDFlags (FoldingSetNodeID &ID, unsigned Opcode, const SDNodeFlags *Flags)
 Add logical or fast math flag values to FoldingSetNodeID value. More...
 
static void AddNodeIDFlags (FoldingSetNodeID &ID, const SDNode *N)
 
static void AddNodeIDNode (FoldingSetNodeID &ID, unsigned short OpC, SDVTList VTList, ArrayRef< SDValue > OpList)
 
static void AddNodeIDCustom (FoldingSetNodeID &ID, const SDNode *N)
 If this is an SDNode with special info, add this info to the NodeID data. More...
 
static void AddNodeIDNode (FoldingSetNodeID &ID, const SDNode *N)
 AddNodeIDNode - Generic routine for adding a nodes info to the NodeID data. More...
 
static unsigned encodeMemSDNodeFlags (int ConvType, ISD::MemIndexedMode AM, bool isVolatile, bool isNonTemporal, bool isInvariant)
 encodeMemSDNodeFlags - Generic routine for computing a value for use in the CSE map that carries volatility, temporalness, indexing mode, and extension/truncation information. More...
 
static bool doNotCSE (SDNode *N)
 doNotCSE - Return true if CSE should not be performed for this node. More...
 
static void VerifySDNode (SDNode *N)
 VerifySDNode - Sanity check the given SDNode. Aborts if it is invalid. More...
 
static void commuteShuffle (SDValue &N1, SDValue &N2, SmallVectorImpl< int > &M)
 
static std::pair< APInt, boolFoldValue (unsigned Opcode, const APInt &C1, const APInt &C2)
 
static SDValue getMemsetValue (SDValue Value, EVT VT, SelectionDAG &DAG, SDLoc dl)
 getMemsetValue - Vectorized representation of the memset value operand. More...
 
static SDValue getMemsetStringVal (EVT VT, SDLoc dl, SelectionDAG &DAG, const TargetLowering &TLI, StringRef Str)
 getMemsetStringVal - Similar to getMemsetValue. More...
 
static SDValue getMemBasePlusOffset (SDValue Base, unsigned Offset, SDLoc dl, SelectionDAG &DAG)
 getMemBasePlusOffset - Returns base and offset node for the More...
 
static bool isMemSrcFromString (SDValue Src, StringRef &Str)
 isMemSrcFromString - Returns true if memcpy source is a string constant. More...
 
static bool FindOptimalMemOpLowering (std::vector< EVT > &MemOps, unsigned Limit, uint64_t Size, unsigned DstAlign, unsigned SrcAlign, bool IsMemset, bool ZeroMemset, bool MemcpyStrSrc, bool AllowOverlap, SelectionDAG &DAG, const TargetLowering &TLI)
 Determines the optimal series of memory ops to replace the memset / memcpy. More...
 
static SDValue getMemcpyLoadsAndStores (SelectionDAG &DAG, SDLoc dl, SDValue Chain, SDValue Dst, SDValue Src, uint64_t Size, unsigned Align, bool isVol, bool AlwaysInline, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo)
 
static SDValue getMemmoveLoadsAndStores (SelectionDAG &DAG, SDLoc dl, SDValue Chain, SDValue Dst, SDValue Src, uint64_t Size, unsigned Align, bool isVol, bool AlwaysInline, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo)
 
static SDValue getMemsetStores (SelectionDAG &DAG, SDLoc dl, SDValue Chain, SDValue Dst, SDValue Src, uint64_t Size, unsigned Align, bool isVol, MachinePointerInfo DstPtrInfo)
 Lower the call to 'memset' intrinsic function into a series of store operations. More...
 
static MachinePointerInfo InferPointerInfo (SDValue Ptr, int64_t Offset=0)
 InferPointerInfo - If the specified ptr/offset is a frame index, infer a MachinePointerInfo record from it. More...
 
static MachinePointerInfo InferPointerInfo (SDValue Ptr, SDValue OffsetOp)
 InferPointerInfo - If the specified ptr/offset is a frame index, infer a MachinePointerInfo record from it. More...
 
static void checkForCyclesHelper (const SDNode *N, SmallPtrSetImpl< const SDNode * > &Visited, SmallPtrSetImpl< const SDNode * > &Checked, const llvm::SelectionDAG *DAG)
 

Variables

static ManagedStatic< std::set
< EVT, EVT::compareRawBits > > 
EVTs
 
static ManagedStatic< EVTArray > SimpleVTArray
 
static ManagedStatic
< sys::SmartMutex< true > > 
VTMutex
 

Function Documentation

static void AddNodeIDCustom ( FoldingSetNodeID ID,
const SDNode N 
)
static

If this is an SDNode with special info, add this info to the NodeID data.

Definition at line 428 of file SelectionDAG.cpp.

References llvm::FoldingSetNodeID::AddBoolean(), llvm::FoldingSetNodeID::AddInteger(), AddNodeIDFlags(), llvm::FoldingSetNodeID::AddPointer(), llvm::MachineConstantPoolValue::addSelectionDAGCSEId(), llvm::ISD::ATOMIC_CMP_SWAP, llvm::ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS, llvm::ISD::ATOMIC_LOAD, llvm::ISD::ATOMIC_LOAD_ADD, llvm::ISD::ATOMIC_LOAD_AND, llvm::ISD::ATOMIC_LOAD_MAX, llvm::ISD::ATOMIC_LOAD_MIN, llvm::ISD::ATOMIC_LOAD_NAND, llvm::ISD::ATOMIC_LOAD_OR, llvm::ISD::ATOMIC_LOAD_SUB, llvm::ISD::ATOMIC_LOAD_UMAX, llvm::ISD::ATOMIC_LOAD_UMIN, llvm::ISD::ATOMIC_LOAD_XOR, llvm::ISD::ATOMIC_STORE, llvm::ISD::ATOMIC_SWAP, llvm::ISD::BasicBlock, llvm::ISD::BlockAddress, llvm::C, llvm::ISD::Constant, llvm::ISD::ConstantFP, llvm::ISD::ConstantPool, llvm::HexagonISD::CP, llvm::ISD::ExternalSymbol, llvm::ISD::FrameIndex, llvm::GlobalAddressSDNode::getAddressSpace(), llvm::MachinePointerInfo::getAddrSpace(), llvm::ConstantPoolSDNode::getAlignment(), llvm::SelectionDAG::getBasicBlock(), llvm::BlockAddressSDNode::getBlockAddress(), llvm::ConstantSDNode::getConstantIntValue(), llvm::ConstantPoolSDNode::getConstVal(), llvm::GlobalAddressSDNode::getGlobal(), llvm::TargetIndexSDNode::getIndex(), llvm::ConstantPoolSDNode::getMachineCPVal(), llvm::ShuffleVectorSDNode::getMaskElt(), llvm::MemSDNode::getMemoryVT(), llvm::GlobalAddressSDNode::getOffset(), llvm::ConstantPoolSDNode::getOffset(), llvm::TargetIndexSDNode::getOffset(), llvm::BlockAddressSDNode::getOffset(), llvm::SDNode::getOpcode(), llvm::MemSDNode::getPointerInfo(), llvm::EVT::getRawBits(), llvm::MemSDNode::getRawSubclassData(), getReg(), llvm::GlobalAddressSDNode::getTargetFlags(), llvm::ConstantPoolSDNode::getTargetFlags(), llvm::TargetIndexSDNode::getTargetFlags(), llvm::BlockAddressSDNode::getTargetFlags(), llvm::SDNode::getValueType(), llvm::EVT::getVectorNumElements(), llvm::ISD::GlobalAddress, llvm::ISD::GlobalTLSAddress, llvm::ConstantPoolSDNode::isMachineConstantPoolEntry(), llvm::ConstantSDNode::isOpaque(), llvm::SDNode::isTargetMemoryOpcode(), llvm::ISD::JumpTable, llvm::AArch64DB::LD, llvm_unreachable, llvm::ISD::LOAD, llvm::ISD::MCSymbol, N, llvm::ISD::PREFETCH, llvm::ISD::Register, llvm::ISD::RegisterMask, llvm::ISD::SRCVALUE, llvm::AArch64DB::ST, llvm::ISD::STORE, llvm::ISD::TargetBlockAddress, llvm::ISD::TargetConstant, llvm::ISD::TargetConstantFP, llvm::ISD::TargetConstantPool, llvm::ISD::TargetExternalSymbol, llvm::ISD::TargetFrameIndex, llvm::ISD::TargetGlobalAddress, llvm::ISD::TargetGlobalTLSAddress, llvm::ISD::TargetIndex, llvm::ISD::TargetJumpTable, and llvm::ISD::VECTOR_SHUFFLE.

Referenced by AddNodeIDNode().

static void AddNodeIDFlags ( FoldingSetNodeID ID,
unsigned  Opcode,
const SDNodeFlags Flags 
)
static

Add logical or fast math flag values to FoldingSetNodeID value.

Definition at line 401 of file SelectionDAG.cpp.

References llvm::FoldingSetNodeID::AddInteger(), llvm::SDNodeFlags::getRawFlags(), and llvm::isBinOpWithFlags().

Referenced by AddNodeIDCustom(), AddNodeIDFlags(), llvm::SelectionDAG::getNode(), and llvm::SelectionDAG::getNodeIfExists().

static void AddNodeIDFlags ( FoldingSetNodeID ID,
const SDNode N 
)
static

Definition at line 415 of file SelectionDAG.cpp.

References AddNodeIDFlags().

static void AddNodeIDNode ( FoldingSetNodeID ID,
unsigned short  OpC,
SDVTList  VTList,
ArrayRef< SDValue OpList 
)
static
static void AddNodeIDNode ( FoldingSetNodeID ID,
const SDNode N 
)
static

AddNodeIDNode - Generic routine for adding a nodes info to the NodeID data.

Definition at line 564 of file SelectionDAG.cpp.

References AddNodeIDCustom(), AddNodeIDOpcode(), AddNodeIDOperands(), AddNodeIDValueTypes(), llvm::SDNode::getOpcode(), llvm::SDNode::getVTList(), and llvm::SDNode::ops().

static void AddNodeIDOpcode ( FoldingSetNodeID ID,
unsigned  OpC 
)
static

AddNodeIDOpcode - Add the node opcode to the NodeID data.

Definition at line 371 of file SelectionDAG.cpp.

References llvm::FoldingSetNodeID::AddInteger().

Referenced by AddNodeIDNode().

static void AddNodeIDOperands ( FoldingSetNodeID ID,
ArrayRef< SDValue Ops 
)
static

AddNodeIDOperands - Various routines for adding operands to the NodeID data.

Definition at line 383 of file SelectionDAG.cpp.

References llvm::FoldingSetNodeID::AddInteger(), and llvm::FoldingSetNodeID::AddPointer().

Referenced by AddNodeIDNode().

static void AddNodeIDOperands ( FoldingSetNodeID ID,
ArrayRef< SDUse Ops 
)
static

AddNodeIDOperands - Various routines for adding operands to the NodeID data.

Definition at line 393 of file SelectionDAG.cpp.

References llvm::FoldingSetNodeID::AddInteger(), and llvm::FoldingSetNodeID::AddPointer().

static void AddNodeIDValueTypes ( FoldingSetNodeID ID,
SDVTList  VTList 
)
static

AddNodeIDValueTypes - Value type lists are intern'd so we can represent them solely with their pointer.

Definition at line 377 of file SelectionDAG.cpp.

References llvm::FoldingSetNodeID::AddPointer(), and llvm::SDVTList::VTs.

Referenced by AddNodeIDNode().

static void checkForCyclesHelper ( const SDNode N,
SmallPtrSetImpl< const SDNode * > &  Visited,
SmallPtrSetImpl< const SDNode * > &  Checked,
const llvm::SelectionDAG DAG 
)
static
static void commuteShuffle ( SDValue N1,
SDValue N2,
SmallVectorImpl< int > &  M 
)
static
static bool doNotCSE ( SDNode N)
static

doNotCSE - Return true if CSE should not be performed for this node.

Definition at line 598 of file SelectionDAG.cpp.

References llvm::ISD::EH_LABEL, llvm::SDNode::getNumValues(), llvm::SDNode::getOpcode(), llvm::SDNode::getValueType(), llvm::MVT::Glue, and llvm::ISD::HANDLENODE.

static unsigned encodeMemSDNodeFlags ( int  ConvType,
ISD::MemIndexedMode  AM,
bool  isVolatile,
bool  isNonTemporal,
bool  isInvariant 
)
inlinestatic

encodeMemSDNodeFlags - Generic routine for computing a value for use in the CSE map that carries volatility, temporalness, indexing mode, and extension/truncation information.

Definition at line 580 of file SelectionDAG.cpp.

Referenced by llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMaskedGather(), llvm::SelectionDAG::getMaskedLoad(), llvm::SelectionDAG::getMaskedScatter(), llvm::SelectionDAG::getMaskedStore(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), and llvm::MemSDNode::MemSDNode().

static bool FindOptimalMemOpLowering ( std::vector< EVT > &  MemOps,
unsigned  Limit,
uint64_t  Size,
unsigned  DstAlign,
unsigned  SrcAlign,
bool  IsMemset,
bool  ZeroMemset,
bool  MemcpyStrSrc,
bool  AllowOverlap,
SelectionDAG DAG,
const TargetLowering TLI 
)
static
static std::pair<APInt, bool> FoldValue ( unsigned  Opcode,
const APInt C1,
const APInt C2 
)
static
static SDValue getMemBasePlusOffset ( SDValue  Base,
unsigned  Offset,
SDLoc  dl,
SelectionDAG DAG 
)
static

getMemBasePlusOffset - Returns base and offset node for the

Definition at line 4023 of file SelectionDAG.cpp.

References llvm::ISD::ADD, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), and llvm::SDValue::getValueType().

Referenced by getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), and getMemsetStores().

static SDValue getMemcpyLoadsAndStores ( SelectionDAG DAG,
SDLoc  dl,
SDValue  Chain,
SDValue  Dst,
SDValue  Src,
uint64_t  Size,
unsigned  Align,
bool  isVol,
bool  AlwaysInline,
MachinePointerInfo  DstPtrInfo,
MachinePointerInfo  SrcPtrInfo 
)
static

Definition at line 4156 of file SelectionDAG.cpp.

References Align(), llvm::EVT::bitsGE(), llvm::dyn_cast(), llvm::StringRef::empty(), llvm::DataLayout::exceedsNaturalStackAlignment(), llvm::ISD::EXTLOAD, FindOptimalMemOpLowering(), llvm::DataLayout::getABITypeAlignment(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getExtLoad(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::FrameIndexSDNode::getIndex(), llvm::SelectionDAG::getMachineFunction(), llvm::TargetLoweringBase::getMaxStoresPerMemcpy(), getMemBasePlusOffset(), getMemsetStringVal(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::SDValue::getOpcode(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getStore(), llvm::MachineFunction::getSubtarget(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::SelectionDAG::getTruncStore(), llvm::TargetLoweringBase::getTypeToTransformTo(), llvm::MachinePointerInfo::getWithOffset(), llvm::Function::hasFnAttribute(), llvm::SelectionDAG::InferPtrAlignment(), llvm::MachineFrameInfo::isFixedObjectIndex(), llvm::EVT::isInteger(), isMemSrcFromString(), llvm::EVT::isVector(), llvm::MinAlign(), llvm::TargetRegisterInfo::needsStackRealignment(), llvm::Attribute::OptimizeForSize, llvm::MVT::Other, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::MachineFrameInfo::setObjectAlignment(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::SPII::Store, llvm::StringRef::substr(), llvm::ISD::TokenFactor, and llvm::ISD::UNDEF.

Referenced by llvm::SelectionDAG::getMemcpy().

static SDValue getMemmoveLoadsAndStores ( SelectionDAG DAG,
SDLoc  dl,
SDValue  Chain,
SDValue  Dst,
SDValue  Src,
uint64_t  Size,
unsigned  Align,
bool  isVol,
bool  AlwaysInline,
MachinePointerInfo  DstPtrInfo,
MachinePointerInfo  SrcPtrInfo 
)
static
static SDValue getMemsetStores ( SelectionDAG DAG,
SDLoc  dl,
SDValue  Chain,
SDValue  Dst,
SDValue  Src,
uint64_t  Size,
unsigned  Align,
bool  isVol,
MachinePointerInfo  DstPtrInfo 
)
static

Lower the call to 'memset' intrinsic function into a series of store operations.

Parameters
DAGSelection DAG where lowered code is placed.
dlLink to corresponding IR location.
ChainControl flow dependency.
DstPointer to destination memory location.
SrcValue of byte to write into the memory.
SizeNumber of bytes to write.
AlignAlignment of the destination in bytes.
isVolTrue if destination is volatile.
DstPtrInfoIR information on the memory pointer.
Returns
New head in the control flow, if lowering was successful, empty SDValue otherwise.

The function tries to replace 'llvm.memset' intrinsic with several store operations and value calculation code. This is usually profitable for small memory size.

Definition at line 4367 of file SelectionDAG.cpp.

References Align(), llvm::EVT::bitsLT(), llvm::dyn_cast(), FindOptimalMemOpLowering(), llvm::DataLayout::getABITypeAlignment(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getDataLayout(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::FrameIndexSDNode::getIndex(), llvm::SelectionDAG::getMachineFunction(), llvm::TargetLoweringBase::getMaxStoresPerMemset(), getMemBasePlusOffset(), getMemsetValue(), llvm::SelectionDAG::getNode(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::SDValue::getOpcode(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::SDValue::getValueType(), llvm::MachinePointerInfo::getWithOffset(), llvm::Function::hasFnAttribute(), llvm::MachineFrameInfo::isFixedObjectIndex(), llvm::TargetLoweringBase::isTruncateFree(), llvm::EVT::isVector(), llvm::Attribute::OptimizeForSize, llvm::MVT::Other, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::MachineFrameInfo::setObjectAlignment(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::SPII::Store, llvm::ISD::TokenFactor, llvm::ISD::TRUNCATE, and llvm::ISD::UNDEF.

Referenced by llvm::SelectionDAG::getMemset().

static SDValue getMemsetStringVal ( EVT  VT,
SDLoc  dl,
SelectionDAG DAG,
const TargetLowering TLI,
StringRef  Str 
)
static
static SDValue getMemsetValue ( SDValue  Value,
EVT  VT,
SelectionDAG DAG,
SDLoc  dl 
)
static
static MachinePointerInfo InferPointerInfo ( SDValue  Ptr,
int64_t  Offset = 0 
)
static

InferPointerInfo - If the specified ptr/offset is a frame index, infer a MachinePointerInfo record from it.

This is particularly useful because the code generator has many cases where it doesn't bother passing in a MachinePointerInfo to getLoad or getStore when it has "FI+Cst".

Definition at line 4875 of file SelectionDAG.cpp.

References llvm::ISD::ADD, llvm::MachinePointerInfo::getFixedStack(), llvm::SDValue::getOpcode(), and llvm::SDValue::getOperand().

Referenced by llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), and InferPointerInfo().

static MachinePointerInfo InferPointerInfo ( SDValue  Ptr,
SDValue  OffsetOp 
)
static

InferPointerInfo - If the specified ptr/offset is a frame index, infer a MachinePointerInfo record from it.

This is particularly useful because the code generator has many cases where it doesn't bother passing in a MachinePointerInfo to getLoad or getStore when it has "FI+Cst".

Definition at line 4895 of file SelectionDAG.cpp.

References llvm::SDValue::getOpcode(), InferPointerInfo(), and llvm::ISD::UNDEF.

static bool isMemSrcFromString ( SDValue  Src,
StringRef Str 
)
static

isMemSrcFromString - Returns true if memcpy source is a string constant.

Definition at line 4032 of file SelectionDAG.cpp.

References llvm::ISD::ADD, llvm::ISD::Constant, G, llvm::getConstantStringInfo(), llvm::GlobalAddressSDNode::getGlobal(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), and llvm::ISD::GlobalAddress.

Referenced by getMemcpyLoadsAndStores().

static int isSignedOp ( ISD::CondCode  Opcode)
static

isSignedOp - For an integer comparison, return 1 if the comparison is a signed operation and 2 if the result is an unsigned comparison.

Return zero if the operation does not depend on the sign of the input (setne and seteq).

Definition at line 297 of file SelectionDAG.cpp.

References llvm_unreachable, llvm::ISD::SETEQ, llvm::ISD::SETGE, llvm::ISD::SETGT, llvm::ISD::SETLE, llvm::ISD::SETLT, llvm::ISD::SETNE, llvm::ISD::SETUGE, llvm::ISD::SETUGT, llvm::ISD::SETULE, and llvm::ISD::SETULT.

Referenced by llvm::ISD::getSetCCAndOperation(), and llvm::ISD::getSetCCOrOperation().

static SDVTList makeVTList ( const EVT VTs,
unsigned  NumVTs 
)
static

makeVTList - Return an instance of the SDVTList struct initialized with the specified members.

Definition at line 58 of file SelectionDAG.cpp.

Referenced by llvm::SelectionDAG::getVTList().

static void VerifySDNode ( SDNode N)
static

Variable Documentation

ManagedStatic<std::set<EVT, EVT::compareRawBits> > EVTs
static

Definition at line 6621 of file SelectionDAG.cpp.

ManagedStatic<EVTArray> SimpleVTArray
static

Definition at line 6622 of file SelectionDAG.cpp.

ManagedStatic<sys::SmartMutex<true> > VTMutex
static

Definition at line 6623 of file SelectionDAG.cpp.