LLVM  10.0.0svn
Namespaces | Macros | Functions | Variables
ARCOptAddrMode.cpp File Reference

This pass folds LD/ST + ADD pairs into Pre/Post-increment form of load/store instructions. More...

#include "ARC.h"
#include "ARCInstrInfo.h"
#include "ARCTargetMachine.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for ARCOptAddrMode.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This class represents lattice values for constants.
 

Macros

#define GET_INSTRMAP_INFO
 
#define OPTADDRMODE_DESC   "ARC load/store address mode"
 
#define OPTADDRMODE_NAME   "arc-addr-mode"
 
#define DEBUG_TYPE   "arc-addr-mode"
 

Functions

FunctionPassllvm::createARCOptAddrMode ()
 
void llvm::initializeARCOptAddrModePass (PassRegistry &)
 
 INITIALIZE_PASS_BEGIN (ARCOptAddrMode, OPTADDRMODE_NAME, OPTADDRMODE_DESC, false, false) INITIALIZE_PASS_END(ARCOptAddrMode
 
static false bool isValidLoadStoreOffset (int64_t Off)
 
static bool isValidIncrementOffset (int64_t Off)
 
static bool isAddConstantOp (const MachineInstr &MI, int64_t &Amount)
 
static bool dominatesAllUsesOf (const MachineInstr *MI, unsigned VReg, MachineDominatorTree *MDT, MachineRegisterInfo *MRI)
 
static bool isLoadStoreThatCanHandleDisplacement (const TargetInstrInfo *TII, const MachineInstr &MI, int64_t Disp)
 

Variables

 OPTADDRMODE_NAME
 
 OPTADDRMODE_DESC
 
 false
 

Detailed Description

This pass folds LD/ST + ADD pairs into Pre/Post-increment form of load/store instructions.

Definition in file ARCOptAddrMode.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "arc-addr-mode"

Definition at line 32 of file ARCOptAddrMode.cpp.

◆ GET_INSTRMAP_INFO

#define GET_INSTRMAP_INFO

Definition at line 15 of file ARCOptAddrMode.cpp.

◆ OPTADDRMODE_DESC

#define OPTADDRMODE_DESC   "ARC load/store address mode"

Definition at line 30 of file ARCOptAddrMode.cpp.

◆ OPTADDRMODE_NAME

#define OPTADDRMODE_NAME   "arc-addr-mode"

Definition at line 31 of file ARCOptAddrMode.cpp.

Function Documentation

◆ dominatesAllUsesOf()

static bool dominatesAllUsesOf ( const MachineInstr MI,
unsigned  VReg,
MachineDominatorTree MDT,
MachineRegisterInfo MRI 
)
static

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( ARCOptAddrMode  ,
OPTADDRMODE_NAME  ,
OPTADDRMODE_DESC  ,
false  ,
false   
)

◆ isAddConstantOp()

static bool isAddConstantOp ( const MachineInstr MI,
int64_t &  Amount 
)
static

◆ isLoadStoreThatCanHandleDisplacement()

static bool isLoadStoreThatCanHandleDisplacement ( const TargetInstrInfo TII,
const MachineInstr MI,
int64_t  Disp 
)
static

◆ isValidIncrementOffset()

static bool isValidIncrementOffset ( int64_t  Off)
static

Definition at line 120 of file ARCOptAddrMode.cpp.

Referenced by isLoadStoreThatCanHandleDisplacement().

◆ isValidLoadStoreOffset()

static false bool isValidLoadStoreOffset ( int64_t  Off)
static

Definition at line 116 of file ARCOptAddrMode.cpp.

Referenced by isLoadStoreThatCanHandleDisplacement().

Variable Documentation

◆ false

false

Definition at line 111 of file ARCOptAddrMode.cpp.

◆ OPTADDRMODE_DESC

OPTADDRMODE_DESC

Definition at line 111 of file ARCOptAddrMode.cpp.

◆ OPTADDRMODE_NAME

OPTADDRMODE_NAME

Definition at line 111 of file ARCOptAddrMode.cpp.