LLVM  8.0.1
Macros | Functions
LegalizeDAG.cpp File Reference
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/ISDOpcodes.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/RuntimeLibcalls.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/SelectionDAGNodes.h"
#include "llvm/CodeGen/TargetFrameLowering.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MachineValueType.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <tuple>
#include <utility>
Include dependency graph for LegalizeDAG.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "legalizedag"
 

Functions

static bool ExpandBVWithShuffles (SDNode *Node, SelectionDAG &DAG, const TargetLowering &TLI, SDValue &Res)
 
static bool isSinCosLibcallAvailable (SDNode *Node, const TargetLowering &TLI)
 Return true if sincos libcall is available. More...
 
static bool useSinCos (SDNode *Node)
 Only issue sincos libcall if both sin and cos are needed. More...
 
static MVT getPromotedVectorElementType (const TargetLowering &TLI, MVT EltVT, MVT NewEltVT)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "legalizedag"

Definition at line 56 of file LegalizeDAG.cpp.

Function Documentation

◆ ExpandBVWithShuffles()

static bool ExpandBVWithShuffles ( SDNode Node,
SelectionDAG DAG,
const TargetLowering TLI,
SDValue Res 
)
static

Definition at line 1783 of file LegalizeDAG.cpp.

References llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), llvm::SmallVectorTemplateCommon< T >::back(), Callee, llvm::SmallVectorImpl< T >::clear(), llvm::dbgs(), F(), llvm::MVT::f128, llvm::MVT::f32, llvm::MVT::f64, llvm::MVT::f80, first, llvm::ConstantInt::get(), llvm::ConstantVector::get(), llvm::UndefValue::get(), getAlignment(), llvm::MachinePointerInfo::getConstantPool(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDNode::getNumOperands(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::Type::getPointerTo(), llvm::Function::getReturnType(), llvm::SDNode::getSimpleValueType(), llvm::EVT::getTypeForEVT(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::EVT::getVectorElementType(), llvm::SelectionDAG::getVectorShuffle(), llvm::ConstantInt::getZExtValue(), llvm::MVT::i128, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm::SmallSet< T, N, C >::insert(), isConstant(), llvm::TargetLoweringBase::isShuffleMaskLegal(), llvm::SDNode::isStrictFPOpcode(), llvm::SDValue::isUndef(), llvm::Type::isVoidTy(), LLVM_DEBUG, llvm_unreachable, llvm::SDNode::op_values(), Phase, llvm::MVT::ppcf128, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorImpl< T >::reserve(), llvm::ISD::SCALAR_TO_VECTOR, llvm::ISD::SDIVREM, second, llvm::TargetLowering::CallLoweringInfo::setChain(), llvm::TargetLowering::CallLoweringInfo::setDebugLoc(), llvm::TargetLowering::CallLoweringInfo::setIsPostTypeLegalization(), llvm::TargetLowering::CallLoweringInfo::setLibCallee(), llvm::TargetLowering::CallLoweringInfo::setSExtResult(), llvm::TargetLowering::CallLoweringInfo::setZExtResult(), llvm::MVT::SimpleTy, llvm::SmallVectorBase::size(), llvm::SmallSet< T, N, C >::size(), and llvm::SmallVectorImpl< T >::swap().

◆ getPromotedVectorElementType()

static MVT getPromotedVectorElementType ( const TargetLowering TLI,
MVT  EltVT,
MVT  NewEltVT 
)
static

◆ isSinCosLibcallAvailable()

static bool isSinCosLibcallAvailable ( SDNode Node,
const TargetLowering TLI 
)
static

◆ useSinCos()

static bool useSinCos ( SDNode Node)
static

Only issue sincos libcall if both sin and cos are needed.

Definition at line 2244 of file LegalizeDAG.cpp.

References llvm::ISD::ABS, llvm::ISD::ADD, llvm::ISD::AND, llvm::SmallVectorImpl< T >::append(), llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), llvm::ISD::ATOMIC_CMP_SWAP, llvm::ISD::ATOMIC_LOAD, llvm::ISD::BITREVERSE, llvm::BitsToDouble(), llvm::ISD::BSWAP, Callee, llvm::ISD::CTLZ, llvm::ISD::CTLZ_ZERO_UNDEF, llvm::ISD::CTPOP, llvm::ISD::CTTZ, llvm::ISD::CTTZ_ZERO_UNDEF, llvm::dbgs(), llvm::ISD::EH_DWARF_CFA, llvm::ISD::EH_LABEL, llvm::ISD::EH_RETURN, llvm::ISD::EH_SJLJ_LONGJMP, llvm::ISD::EH_SJLJ_SETJMP, llvm::ISD::EXTLOAD, llvm::MVT::f128, llvm::MVT::f32, llvm::MVT::f64, llvm::MVT::f80, llvm::ISD::FADD, llvm::ISD::FCOS, llvm::ISD::FLT_ROUNDS_, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::ISD::FRAME_TO_ARGS_OFFSET, llvm::ISD::FRAMEADDR, llvm::ISD::FSIN, llvm::ISD::FSINCOS, llvm::ISD::FSUB, llvm::ConstantInt::get(), getAlignment(), llvm::MachinePointerInfo::getConstantPool(), llvm::Type::getInt64Ty(), llvm::SDValue::getNode(), llvm::SDNode::getNumValues(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::Type::getPointerTo(), llvm::EVT::getScalarSizeInBits(), llvm::MVT::getScalarType(), llvm::SDNode::getSimpleValueType(), llvm::EVT::getSimpleVT(), llvm::EVT::getTypeForEVT(), llvm::HandleSDNode::getValue(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::Type::getVoidTy(), llvm::MipsISD::Hi, I, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm::EVT::isInteger(), llvm::isPowerOf2_32(), LLVM_DEBUG, llvm_unreachable, llvm::MipsISD::Lo, llvm::SPII::Load, Operation, llvm::ISD::OR, llvm::MVT::Other, llvm::MVT::ppcf128, llvm::ISD::PREFETCH, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::ISD::READCYCLECOUNTER, Results, llvm::ISD::RETURNADDR, llvm::TargetLowering::CallLoweringInfo::setChain(), llvm::TargetLowering::CallLoweringInfo::setDebugLoc(), llvm::TargetLowering::CallLoweringInfo::setLibCallee(), llvm::ISD::SETLT, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::MVT::SimpleTy, llvm::ISD::SINT_TO_FP, llvm::ISD::SRL, std::swap(), llvm::ISD::TRUNCATE, llvm::ISD::UINT_TO_FP, llvm::SDNode::use_begin(), llvm::SDNode::use_end(), llvm::ISD::VAEND, llvm::ISD::XOR, and llvm::ISD::ZERO_EXTEND.