LLVM  9.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.


#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 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)

Macro Definition Documentation


#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 

◆ getConvRTLibDesc()

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

◆ 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 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::lower().

◆ getRTLibDesc()

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

Definition at line 215 of file LegalizerHelper.cpp.

References assert(), and llvm_unreachable.

Referenced by simpleLibcall().

◆ simpleLibcall()

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