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/TargetFrameLowering.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.


#define DEBUG_TYPE   "legalizer"


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 bool isLibCallInTailPosition (MachineInstr &MI)
 True if an instruction is in tail position in its caller. More...
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


#define DEBUG_TYPE   "legalizer"

Definition at line 28 of file LegalizerHelper.cpp.

Function Documentation

◆ conversionLibcall()

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

◆ getConvRTLibDesc()

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

◆ getGCDType()

static LLT getGCDType ( LLT  OrigTy,
LLT  TargetTy 

◆ getNarrowTypeBreakDown()

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

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 41 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 

Definition at line 240 of file LegalizerHelper.cpp.

References assert(), and llvm_unreachable.

Referenced by simpleLibcall().

◆ isLibCallInTailPosition()

static bool isLibCallInTailPosition ( MachineInstr MI)

◆ minMaxToCompare()

static CmpInst::Predicate minMaxToCompare ( unsigned  Opc)

◆ simpleLibcall()

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