LLVM  8.0.1
Macros | Functions | Variables
PPCMIPeephole.cpp File Reference
#include "PPC.h"
#include "PPCInstrBuilder.h"
#include "PPCInstrInfo.h"
#include "PPCTargetMachine.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Support/Debug.h"
#include "MCTargetDesc/PPCPredicates.h"
Include dependency graph for PPCMIPeephole.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "ppc-mi-peepholes"
 

Functions

 STATISTIC (RemoveTOCSave, "Number of TOC saves removed")
 
 STATISTIC (MultiTOCSaves, "Number of functions with multiple TOC saves that must be kept")
 
 STATISTIC (NumEliminatedSExt, "Number of eliminated sign-extensions")
 
 STATISTIC (NumEliminatedZExt, "Number of eliminated zero-extensions")
 
 STATISTIC (NumOptADDLIs, "Number of optimized ADD instruction fed by LI")
 
 STATISTIC (NumConvertedToImmediateForm, "Number of instructions converted to their immediate form")
 
 STATISTIC (NumFunctionsEnteredInMIPeephole, "Number of functions entered in PPC MI Peepholes")
 
 STATISTIC (NumFixedPointIterations, "Number of fixed-point iterations converting reg-reg instructions " "to reg-imm ones")
 
 INITIALIZE_PASS_BEGIN (PPCMIPeephole, DEBUG_TYPE, "PowerPC MI Peephole Optimization", false, false) INITIALIZE_PASS_END(PPCMIPeephole
 

Variables

static cl::opt< boolFixedPointRegToImm ("ppc-reg-to-imm-fixed-point", cl::Hidden, cl::init(true), cl::desc("Iterate to a fixed point when attempting to " "convert reg-reg instructions to reg-imm"))
 
static cl::opt< boolConvertRegReg ("ppc-convert-rr-to-ri", cl::Hidden, cl::init(true), cl::desc("Convert eligible reg+reg instructions to reg+imm"))
 
static cl::opt< boolEnableSExtElimination ("ppc-eliminate-signext", cl::desc("enable elimination of sign-extensions"), cl::init(false), cl::Hidden)
 
static cl::opt< boolEnableZExtElimination ("ppc-eliminate-zeroext", cl::desc("enable elimination of zero-extensions"), cl::init(false), cl::Hidden)
 
 DEBUG_TYPE
 
PowerPC MI Peephole Optimization
 
PowerPC MI Peephole false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "ppc-mi-peepholes"

Definition at line 36 of file PPCMIPeephole.cpp.

Function Documentation

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( PPCMIPeephole  ,
DEBUG_TYPE  ,
"PowerPC MI Peephole Optimization ,
false  ,
false   
)

◆ STATISTIC() [1/8]

STATISTIC ( RemoveTOCSave  ,
"Number of TOC saves removed"   
)

◆ STATISTIC() [2/8]

STATISTIC ( MultiTOCSaves  ,
"Number of functions with multiple TOC saves that must be kept"   
)

◆ STATISTIC() [3/8]

STATISTIC ( NumEliminatedSExt  ,
"Number of eliminated sign-extensions"   
)

◆ STATISTIC() [4/8]

STATISTIC ( NumEliminatedZExt  ,
"Number of eliminated zero-extensions"   
)

◆ STATISTIC() [5/8]

STATISTIC ( NumOptADDLIs  ,
"Number of optimized ADD instruction fed by LI"   
)

◆ STATISTIC() [6/8]

STATISTIC ( NumConvertedToImmediateForm  ,
"Number of instructions converted to their immediate form"   
)

◆ STATISTIC() [7/8]

STATISTIC ( NumFunctionsEnteredInMIPeephole  ,
"Number of functions entered in PPC MI Peepholes"   
)

◆ STATISTIC() [8/8]

STATISTIC ( NumFixedPointIterations  ,
"Number of fixed-point iterations converting reg-reg instructions " "to reg-imm ones"   
)

Variable Documentation

◆ ConvertRegReg

cl::opt<bool> ConvertRegReg("ppc-convert-rr-to-ri", cl::Hidden, cl::init(true), cl::desc("Convert eligible reg+reg instructions to reg+imm"))
static

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 1282 of file PPCMIPeephole.cpp.

◆ EnableSExtElimination

cl::opt<bool> EnableSExtElimination("ppc-eliminate-signext", cl::desc("enable elimination of sign-extensions"), cl::init(false), cl::Hidden)
static

◆ EnableZExtElimination

cl::opt<bool> EnableZExtElimination("ppc-eliminate-zeroext", cl::desc("enable elimination of zero-extensions"), cl::init(false), cl::Hidden)
static

◆ false

PowerPC MI Peephole false

Definition at line 1282 of file PPCMIPeephole.cpp.

◆ FixedPointRegToImm

cl::opt<bool> FixedPointRegToImm("ppc-reg-to-imm-fixed-point", cl::Hidden, cl::init(true), cl::desc("Iterate to a fixed point when attempting to " "convert reg-reg instructions to reg-imm"))
static

◆ Optimization

PowerPC MI Peephole Optimization

Definition at line 1282 of file PPCMIPeephole.cpp.