LLVM API Documentation

LegalizeDAG.cpp File Reference

#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/DwarfWriter.h"
#include "llvm/Analysis/DebugInfo.h"
#include "llvm/CodeGen/PseudoSourceValue.h"
#include "llvm/Target/TargetFrameInfo.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Target/TargetSubtarget.h"
#include "llvm/CallingConv.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Function.h"
#include "llvm/GlobalVariable.h"
#include "llvm/LLVMContext.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include <map>

Include dependency graph for LegalizeDAG.cpp:

Go to the source code of this file.

Functions

static SDNode * FindCallEndFromCallStart (SDNode *Node)
static SDNode * FindCallStartFromCallEnd (SDNode *Node)
static SDValue ExpandConstantFP (ConstantFPSDNode *CFP, bool UseCP, SelectionDAG &DAG, const TargetLowering &TLI)
static SDValue ExpandUnalignedStore (StoreSDNode *ST, SelectionDAG &DAG, const TargetLowering &TLI)
 ExpandUnalignedStore - Expands an unaligned store to 2 half-size stores.
static SDValue ExpandUnalignedLoad (LoadSDNode *LD, SelectionDAG &DAG, const TargetLowering &TLI)
 ExpandUnalignedLoad - Expands an unaligned load to 2 half-size loads.


Function Documentation

static SDValue ExpandConstantFP ( ConstantFPSDNode *  CFP,
bool  UseCP,
SelectionDAG &  DAG,
const TargetLowering &  TLI 
) [static]

static SDValue ExpandUnalignedLoad ( LoadSDNode *  LD,
SelectionDAG &  DAG,
const TargetLowering &  TLI 
) [static]

ExpandUnalignedLoad - Expands an unaligned load to 2 half-size loads.

Definition at line 489 of file LegalizeDAG.cpp.

References llvm::X86ISD::ADD, Alignment, llvm::ISD::BIT_CONVERT, llvm::SelectionDAG::CreateStackTemporary(), llvm::ISD::EXTLOAD, llvm::ISD::FP_EXTEND, llvm::MemSDNode::getAlignment(), llvm::LoadSDNode::getBasePtr(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SDNode::getDebugLoc(), llvm::LoadSDNode::getExtensionType(), llvm::SelectionDAG::getExtLoad(), llvm::SelectionDAG::getLoad(), llvm::MemSDNode::getMemoryVT(), llvm::SelectionDAG::getMergeValues(), llvm::SelectionDAG::getNode(), llvm::TargetLowering::getPointerTy(), llvm::TargetLowering::getRegisterType(), llvm::TargetLowering::getShiftAmountTy(), llvm::EVT::getSizeInBits(), llvm::MemSDNode::getSrcValue(), llvm::MemSDNode::getSrcValueOffset(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::SPISD::Hi, llvm::EVT::isFloatingPoint(), llvm::EVT::isInteger(), llvm::TargetLowering::isLittleEndian(), llvm::TargetLowering::isTypeLegal(), llvm::EVT::isVector(), llvm::MemSDNode::isVolatile(), llvm::SPISD::Lo, Load, llvm::MinAlign(), llvm::ISD::NON_EXTLOAD, Offset, llvm::ISD::OR, llvm::SmallVectorImpl< T >::push_back(), llvm::PPCISD::SHL, llvm::SmallVectorImpl< T >::size(), StackPtr, llvm::X86II::TF, llvm::ISD::TokenFactor, and llvm::ISD::ZEXTLOAD.

static SDValue ExpandUnalignedStore ( StoreSDNode *  ST,
SelectionDAG &  DAG,
const TargetLowering &  TLI 
) [static]

static SDNode* FindCallEndFromCallStart ( SDNode *  Node  )  [static]

FindCallEndFromCallStart - Given a chained node that is part of a call sequence, find the CALLSEQ_END node that terminates the call sequence.

Definition at line 250 of file LegalizeDAG.cpp.

References llvm::ISD::CALLSEQ_END, E, llvm::SDNode::getNumOperands(), llvm::SDNode::getNumValues(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::SDNode::getValueType(), llvm::SDNode::use_begin(), llvm::SDNode::use_empty(), and llvm::SDNode::use_end().

static SDNode* FindCallStartFromCallEnd ( SDNode *  Node  )  [static]

FindCallStartFromCallEnd - Given a chained node that is part of a call sequence, find the CALLSEQ_START node that initiates the call sequence.

Definition at line 290 of file LegalizeDAG.cpp.

References llvm::ISD::CALLSEQ_START, llvm::SDValue::getNode(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), and llvm::SDValue::getValueType().


Variable Documentation

Definition at line 59 of file LegalizeDAG.cpp.

IsLegalizingCall - This member is used *only* for purposes of providing helpful assertions that a libcall isn't created while another call is being legalized (which could lead to non-serialized call sequences).

Definition at line 72 of file LegalizeDAG.cpp.

LastCALLSEQ_END - This keeps track of the CALLSEQ_END node that has been legalized. We use this to ensure that calls are properly serialized against each other, including inserted libcalls.

Definition at line 67 of file LegalizeDAG.cpp.

LegalizedNodes - For nodes that are of legal width, and that have more than one use, this map indicates what regularized operand to use. This allows us to avoid legalizing the same thing more than once.

Definition at line 88 of file LegalizeDAG.cpp.

Definition at line 60 of file LegalizeDAG.cpp.

Definition at line 58 of file LegalizeDAG.cpp.

ValueTypeActions - This is a bitvector that contains two bits for each value type, where the two bits correspond to the LegalizeAction enum. This can be queried with "getTypeAction(VT)".

Definition at line 83 of file LegalizeDAG.cpp.