LLVM  10.0.0svn
Macros | Functions
LegalizerHelper.cpp File Reference
#include "llvm/CodeGen/GlobalISel/LegalizerHelper.h"
#include "llvm/CodeGen/GlobalISel/CallLowering.h"
#include "llvm/CodeGen/GlobalISel/GISelChangeObserver.h"
#include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for LegalizerHelper.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "legalizer"
 

Functions

static std::pair< int, int > getNarrowTypeBreakDown (LLT OrigTy, LLT NarrowTy, LLT &LeftoverTy)
 Try to break down OrigTy into NarrowTy sized pieces. More...
 
static LLT getGCDType (LLT OrigTy, LLT TargetTy)
 
static RTLIB::Libcall getRTLibDesc (unsigned Opcode, unsigned Size)
 
static LegalizerHelper::LegalizeResult simpleLibcall (MachineInstr &MI, MachineIRBuilder &MIRBuilder, unsigned Size, Type *OpType)
 
static RTLIB::Libcall getConvRTLibDesc (unsigned Opcode, Type *ToType, Type *FromType)
 
static LegalizerHelper::LegalizeResult conversionLibcall (MachineInstr &MI, MachineIRBuilder &MIRBuilder, Type *ToType, Type *FromType)
 
static CmpInst::Predicate minMaxToCompare (unsigned Opc)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "legalizer"

Definition at line 27 of file LegalizerHelper.cpp.

Function Documentation

◆ conversionLibcall()

static LegalizerHelper::LegalizeResult conversionLibcall ( MachineInstr MI,
MachineIRBuilder MIRBuilder,
Type ToType,
Type FromType 
)
static

◆ getConvRTLibDesc()

static RTLIB::Libcall getConvRTLibDesc ( unsigned  Opcode,
Type ToType,
Type FromType 
)
static

◆ getGCDType()

static LLT getGCDType ( LLT  OrigTy,
LLT  TargetTy 
)
static

◆ getNarrowTypeBreakDown()

static std::pair<int, int> getNarrowTypeBreakDown ( LLT  OrigTy,
LLT  NarrowTy,
LLT LeftoverTy 
)
static

Try to break down OrigTy into NarrowTy sized pieces.

Returns the number of NarrowTy elements needed to reconstruct OrigTy, with any leftover piece as type LeftoverTy

Returns -1 in the first element of the pair if the breakdown is not satisfiable.

Definition at line 40 of file LegalizerHelper.cpp.

References assert(), llvm::LLT::getScalarSizeInBits(), llvm::LLT::getSizeInBits(), llvm::LLT::isValid(), llvm::LLT::isVector(), llvm::LLT::scalar(), llvm::LLT::scalarOrVector(), and Size.

Referenced by llvm::LegalizerHelper::fewerElementsVectorMultiEltType(), llvm::LegalizerHelper::fewerElementsVectorPhi(), and llvm::LegalizerHelper::reduceLoadStoreWidth().

◆ getRTLibDesc()

static RTLIB::Libcall getRTLibDesc ( unsigned  Opcode,
unsigned  Size 
)
static

Definition at line 239 of file LegalizerHelper.cpp.

References assert(), and llvm_unreachable.

Referenced by simpleLibcall().

◆ minMaxToCompare()

static CmpInst::Predicate minMaxToCompare ( unsigned  Opc)
static

◆ simpleLibcall()

static LegalizerHelper::LegalizeResult simpleLibcall ( MachineInstr MI,
MachineIRBuilder MIRBuilder,
unsigned  Size,
Type OpType 
)
static