LLVM API Documentation
#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/GlobalVariable.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/Compiler.h"#include "llvm/Support/MathExtras.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/SmallPtrSet.h"#include <map>
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 | ExpandFCOPYSIGNToBitwiseOps (SDNode *Node, MVT NVT, 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. | |
| static RTLIB::Libcall | GetFPLibCall (MVT VT, RTLIB::Libcall Call_F32, RTLIB::Libcall Call_F64, RTLIB::Libcall Call_F80, RTLIB::Libcall Call_PPCF128) |
| GetFPLibCall - Return the right libcall for the given floating point type. | |
| static void | FindWidenVecType (const TargetLowering &TLI, unsigned Width, MVT VVT, MVT &EVT, MVT &VecEVT) |
| static SDValue ExpandConstantFP | ( | ConstantFPSDNode * | CFP, | |
| bool | UseCP, | |||
| SelectionDAG & | DAG, | |||
| const TargetLowering & | TLI | |||
| ) | [static] |
ExpandConstantFP - Expands the ConstantFP node to an integer constant or a load from the constant pool.
Definition at line 550 of file LegalizeDAG.cpp.
References Alignment, llvm::APFloat::bitcastToAPInt(), llvm::ISD::EXTLOAD, llvm::SelectionDAG::getConstant(), llvm::ConstantFPSDNode::getConstantFPValue(), llvm::SelectionDAG::getConstantPool(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getExtLoad(), llvm::SelectionDAG::getLoad(), llvm::TargetLowering::getPointerTy(), llvm::MVT::getSimpleVT(), llvm::MVT::getTypeForMVT(), llvm::ConstantFPSDNode::getValueAPF(), llvm::ConstantFP::getValueAPF(), llvm::SDNode::getValueType(), llvm::TargetLowering::isLoadExtLegal(), llvm::ConstantFPSDNode::isValueValidForType(), and llvm::TargetLowering::ShouldShrinkFPConstant().
| static SDValue ExpandFCOPYSIGNToBitwiseOps | ( | SDNode * | Node, | |
| MVT | NVT, | |||
| SelectionDAG & | DAG, | |||
| const TargetLowering & | TLI | |||
| ) | [static] |
ExpandFCOPYSIGNToBitwiseOps - Expands fcopysign to a series of bitwise operations.
Definition at line 599 of file LegalizeDAG.cpp.
References llvm::ISD::AND, llvm::ISD::BIT_CONVERT, llvm::BitsToDouble(), llvm::BitsToFloat(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getConstantFP(), llvm::SDNode::getDebugLoc(), llvm::SelectionDAG::getNode(), llvm::SDNode::getOperand(), llvm::TargetLowering::getShiftAmountTy(), llvm::MVT::getSizeInBits(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::ISD::OR, llvm::PPCISD::SHL, llvm::PPCISD::SRL, llvm::ISD::TRUNCATE, and llvm::ISD::ZERO_EXTEND.
| static SDValue ExpandUnalignedLoad | ( | LoadSDNode * | LD, | |
| SelectionDAG & | DAG, | |||
| const TargetLowering & | TLI | |||
| ) | [static] |
ExpandUnalignedLoad - Expands an unaligned load to 2 half-size loads.
Definition at line 748 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::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::MVT::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::MVT::isFloatingPoint(), llvm::MVT::isInteger(), llvm::TargetLowering::isLittleEndian(), llvm::TargetLowering::isTypeLegal(), llvm::MVT::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(), llvm::ISD::TokenFactor, and llvm::ISD::ZEXTLOAD.
| static SDValue ExpandUnalignedStore | ( | StoreSDNode * | ST, | |
| SelectionDAG & | DAG, | |||
| const TargetLowering & | TLI | |||
| ) | [static] |
ExpandUnalignedStore - Expands an unaligned store to 2 half-size stores.
Definition at line 644 of file LegalizeDAG.cpp.
References llvm::X86ISD::ADD, Alignment, llvm::ISD::BIT_CONVERT, llvm::SelectionDAG::CreateStackTemporary(), llvm::ISD::EXTLOAD, llvm::MemSDNode::getAlignment(), llvm::StoreSDNode::getBasePtr(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getConstant(), llvm::SDNode::getDebugLoc(), llvm::SelectionDAG::getExtLoad(), llvm::SelectionDAG::getLoad(), llvm::MemSDNode::getMemoryVT(), llvm::SelectionDAG::getNode(), llvm::TargetLowering::getPointerTy(), llvm::TargetLowering::getRegisterType(), llvm::TargetLowering::getShiftAmountTy(), llvm::MVT::getSimpleVT(), llvm::MVT::getSizeInBits(), llvm::MemSDNode::getSrcValue(), llvm::MemSDNode::getSrcValueOffset(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), llvm::SDValue::getValue(), llvm::StoreSDNode::getValue(), llvm::SDValue::getValueType(), llvm::SPISD::Hi, llvm::MVT::isFloatingPoint(), llvm::MVT::isInteger(), llvm::TargetLowering::isLittleEndian(), llvm::TargetLowering::isTypeLegal(), llvm::MVT::isVector(), llvm::MemSDNode::isVolatile(), llvm::SPISD::Lo, Load, llvm::MinAlign(), Offset, llvm::SmallVectorImpl< T >::push_back(), llvm::SmallVectorImpl< T >::size(), llvm::PPCISD::SRL, llvm::SPII::Store, llvm::ISD::TokenFactor, and Val.
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 402 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().
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 442 of file LegalizeDAG.cpp.
References llvm::ISD::CALLSEQ_START, llvm::SDValue::getNode(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), and llvm::SDValue::getValueType().
| static void FindWidenVecType | ( | const TargetLowering & | TLI, | |
| unsigned | Width, | |||
| MVT | VVT, | |||
| MVT & | EVT, | |||
| MVT & | VecEVT | |||
| ) | [static] |
Definition at line 8396 of file LegalizeDAG.cpp.
References llvm::MVT::getSizeInBits(), llvm::TargetLowering::isTypeLegal(), and llvm::Log2_32().
| static RTLIB::Libcall GetFPLibCall | ( | MVT | VT, | |
| RTLIB::Libcall | Call_F32, | |||
| RTLIB::Libcall | Call_F64, | |||
| RTLIB::Libcall | Call_F80, | |||
| RTLIB::Libcall | Call_PPCF128 | |||
| ) | [static] |
GetFPLibCall - Return the right libcall for the given floating point type.
Definition at line 930 of file LegalizeDAG.cpp.
References llvm::RTLIB::UNKNOWN_LIBCALL.
Definition at line 56 of file LegalizeDAG.cpp.
| DenseMap<SDValue, std::pair<SDValue, SDValue> > ExpandedNodes |
ExpandedNodes - For nodes that need to be expanded this map indicates which operands are the expanded version of the input. This allows us to avoid expanding the same node more than once.
Definition at line 95 of file LegalizeDAG.cpp.
| bool IsLegalizingCall |
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 69 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 64 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 85 of file LegalizeDAG.cpp.
PromotedNodes - For nodes that are below legal width, and that have more than one use, this map indicates what promoted value to use. This allows us to avoid promoting the same thing more than once.
Definition at line 90 of file LegalizeDAG.cpp.
| std::map<SDValue, SDValue> ScalarizedNodes |
ScalarizedNodes - For nodes that need to be converted from vector types to scalar types, this contains the mapping of ones we have already processed to the result.
Definition at line 105 of file LegalizeDAG.cpp.
| std::map<SDValue, std::pair<SDValue, SDValue> > SplitNodes |
SplitNodes - For vector nodes that need to be split, this map indicates which operands are the split version of the input. This allows us to avoid splitting the same node more than once.
Definition at line 100 of file LegalizeDAG.cpp.
Definition at line 55 of file LegalizeDAG.cpp.
| bool TypesNeedLegalizing |
Definition at line 57 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 80 of file LegalizeDAG.cpp.
| std::map<SDValue, SDValue> WidenNodes |
WidenNodes - For nodes that need to be widened from one vector type to another, this contains the mapping of those that we have already widen. This allows us to avoid widening more than once.
Definition at line 110 of file LegalizeDAG.cpp.