LLVM  6.0.0svn
Classes | Namespaces | Macros | Functions | Variables
ARMInstructionSelector.cpp File Reference

This file implements the targeting of the InstructionSelector class for ARM. More...

#include "ARMRegisterBankInfo.h"
#include "ARMSubtarget.h"
#include "ARMTargetMachine.h"
#include "llvm/CodeGen/GlobalISel/InstructionSelector.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Support/Debug.h"
#include "llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h"
#include "ARMGenGlobalISel.inc"
Include dependency graph for ARMInstructionSelector.cpp:

Go to the source code of this file.

Classes

struct  ARMInstructionSelector::CmpConstants
 
struct  ARMInstructionSelector::InsertInfo
 

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Macros

#define DEBUG_TYPE   "arm-isel"
 
#define GET_GLOBALISEL_PREDICATE_BITSET
 
#define GET_GLOBALISEL_PREDICATES_DECL
 
#define GET_GLOBALISEL_TEMPORARIES_DECL
 
#define GET_GLOBALISEL_IMPL
 
#define GET_GLOBALISEL_PREDICATES_INIT
 
#define GET_GLOBALISEL_TEMPORARIES_INIT
 

Functions

InstructionSelectorllvm::createARMInstructionSelector (const ARMBaseTargetMachine &TM, const ARMSubtarget &STI, const ARMRegisterBankInfo &RBI)
 
static bool selectMergeValues (MachineInstrBuilder &MIB, const ARMBaseInstrInfo &TII, MachineRegisterInfo &MRI, const TargetRegisterInfo &TRI, const RegisterBankInfo &RBI)
 
static bool selectUnmergeValues (MachineInstrBuilder &MIB, const ARMBaseInstrInfo &TII, MachineRegisterInfo &MRI, const TargetRegisterInfo &TRI, const RegisterBankInfo &RBI)
 
static unsigned selectSimpleExtOpc (unsigned Opc, unsigned Size)
 Select the opcode for simple extensions (that translate to a single SXT/UXT instruction). More...
 
static unsigned selectLoadStoreOpCode (unsigned Opc, unsigned RegBank, unsigned Size)
 Select the opcode for simple loads and stores. More...
 
static std::pair< ARMCC::CondCodes, ARMCC::CondCodesgetComparePreds (CmpInst::Predicate Pred)
 

Variables

const unsigned zero_reg = 0
 

Detailed Description

This file implements the targeting of the InstructionSelector class for ARM.

Todo:
This should be generated by TableGen.

Definition in file ARMInstructionSelector.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "arm-isel"

Definition at line 22 of file ARMInstructionSelector.cpp.

◆ GET_GLOBALISEL_IMPL

#define GET_GLOBALISEL_IMPL

Definition at line 102 of file ARMInstructionSelector.cpp.

◆ GET_GLOBALISEL_PREDICATE_BITSET

#define GET_GLOBALISEL_PREDICATE_BITSET

Definition at line 30 of file ARMInstructionSelector.cpp.

◆ GET_GLOBALISEL_PREDICATES_DECL

#define GET_GLOBALISEL_PREDICATES_DECL

Definition at line 79 of file ARMInstructionSelector.cpp.

◆ GET_GLOBALISEL_PREDICATES_INIT

#define GET_GLOBALISEL_PREDICATES_INIT

◆ GET_GLOBALISEL_TEMPORARIES_DECL

#define GET_GLOBALISEL_TEMPORARIES_DECL

Definition at line 85 of file ARMInstructionSelector.cpp.

◆ GET_GLOBALISEL_TEMPORARIES_INIT

#define GET_GLOBALISEL_TEMPORARIES_INIT

Function Documentation

◆ getComparePreds()

static std::pair<ARMCC::CondCodes, ARMCC::CondCodes> getComparePreds ( CmpInst::Predicate  Pred)
static

◆ selectLoadStoreOpCode()

static unsigned selectLoadStoreOpCode ( unsigned  Opc,
unsigned  RegBank,
unsigned  Size 
)
static

Select the opcode for simple loads and stores.

For types smaller than 32 bits, the value will be zero extended. Returns the original opcode if it doesn't know how to select a better one.

Definition at line 242 of file ARMInstructionSelector.cpp.

References isStore().

◆ selectMergeValues()

static bool selectMergeValues ( MachineInstrBuilder MIB,
const ARMBaseInstrInfo TII,
MachineRegisterInfo MRI,
const TargetRegisterInfo TRI,
const RegisterBankInfo RBI 
)
static

◆ selectSimpleExtOpc()

static unsigned selectSimpleExtOpc ( unsigned  Opc,
unsigned  Size 
)
static

Select the opcode for simple extensions (that translate to a single SXT/UXT instruction).

Extension operations more complicated than that should not invoke this. Returns the original opcode if it doesn't know how to select a better one.

Definition at line 224 of file ARMInstructionSelector.cpp.

References llvm::AArch64_AM::SXTB, llvm::AArch64_AM::SXTH, llvm::AArch64_AM::UXTB, and llvm::AArch64_AM::UXTH.

◆ selectUnmergeValues()

static bool selectUnmergeValues ( MachineInstrBuilder MIB,
const ARMBaseInstrInfo TII,
MachineRegisterInfo MRI,
const TargetRegisterInfo TRI,
const RegisterBankInfo RBI 
)
static

Variable Documentation

◆ zero_reg

const unsigned zero_reg = 0

Definition at line 100 of file ARMInstructionSelector.cpp.