LLVM: lib/Target/PowerPC/PPCMIPeephole.cpp File Reference (original ) (raw )Go to the source code of this file.
Variables
static 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 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 cl::opt < bool >
EnableSExtElimination ("ppc-eliminate-signext", cl::desc ("enable elimination of sign-extensions"), cl::init(true), cl::Hidden)
static cl::opt < bool >
EnableZExtElimination ("ppc-eliminate-zeroext", cl::desc ("enable elimination of zero -extensions"), cl::init(true), cl::Hidden)
static cl::opt < bool >
EnableTrapOptimization ("ppc-opt -conditional-trap", cl::desc ("enable optimization of conditional traps"), cl::init(false), cl::Hidden)
DEBUG_TYPE
PowerPC MI Peephole
Optimization
PowerPC MI Peephole
false
◆ addRegToUpdate
#define addRegToUpdate
(
R
)
◆ DEBUG_TYPE#define DEBUG_TYPE "ppc-mi-peepholes"
◆ DEBUG_COUNTER() [1/2]
DEBUG_COUNTER
(
PeepholePerOpCounter
,
"ppc-per-op -peephole"
,
"Controls whether PPC per opcode peephole is performed on a MI"
)
◆ DEBUG_COUNTER() [2/2]
DEBUG_COUNTER
(
PeepholeXToICounter
,
"ppc-xtoi-peephole"
,
"Controls whether PPC reg+reg to reg+imm peephole is performed on a MI"
)
◆ INITIALIZE_PASS_BEGIN()
INITIALIZE_PASS_BEGIN
(
PPCMIPeephole
,
DEBUG_TYPE
,
"PowerPC MI Peephole Optimization"
,
false
,
false
)
◆ STATISTIC() [1/12]
STATISTIC
(
MultiTOCSaves
,
"Number of functions with multiple TOC saves that must be kept"
)
◆ STATISTIC() [2/12]
STATISTIC
(
NumConvertedToImmediateForm
,
"Number of instructions converted to their immediate form"
)
◆ STATISTIC() [3/12]
STATISTIC
(
NumEliminatedSExt
,
"Number of eliminated sign-extensions"
)
◆ STATISTIC() [4/12]
STATISTIC
(
NumEliminatedZExt
,
"Number of eliminated zero -extensions"
)
◆ STATISTIC() [5/12]
STATISTIC
(
NumEXTSWAndSLDICombined
,
"Number of pairs of EXTSW and SLDI combined as EXTSWSLI"
)
◆ STATISTIC() [6/12]
STATISTIC
(
NumFixedPointIterations
,
"Number of fixed-point iterations converting reg-reg instructions " "to reg-imm ones"
)
◆ STATISTIC() [7/12]
STATISTIC
(
NumFunctionsEnteredInMIPeephole
,
"Number of functions entered in PPC MI Peepholes"
)
◆ STATISTIC() [8/12]
STATISTIC
(
NumLoadImmZeroFoldedAndRemoved
,
"Number of LI(8)
reg ,
0 that are folded to r0 and removed"
)
◆ STATISTIC() [9/12]
STATISTIC
(
NumOptADDLIs
,
"Number of optimized ADD instruction fed by LI"
)
◆ STATISTIC() [10/12]
STATISTIC
(
NumRotatesCollapsed
,
"Number of pairs of rotate
left ,
clear left/right collapsed"
)
◆ STATISTIC() [11/12]
STATISTIC
(
NumTOCSavesInPrologue
,
"Number of TOC saves placed in the prologue"
)
◆ STATISTIC() [12/12]
STATISTIC
(
RemoveTOCSave
,
"Number of TOC saves removed"
)
◆ 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")) ( "ppc-convert-rr-to-ri" , cl::Hidden , cl::init(true) , cl::desc ("Convert eligible reg+reg instructions to reg+imm") )
static
◆ DEBUG_TYPE◆ EnableSExtElimination
cl::opt < bool > EnableSExtElimination("ppc-eliminate-signext", cl::desc ("enable elimination of sign-extensions"), cl::init(true), cl::Hidden) ( "ppc-eliminate-signext" , cl::desc ("enable elimination of sign-extensions") , cl::init(true) , cl::Hidden )
static
◆ EnableTrapOptimization◆ EnableZExtElimination
cl::opt < bool > EnableZExtElimination("ppc-eliminate-zeroext", cl::desc ("enable elimination of zero -extensions"), cl::init(true), cl::Hidden) ( "ppc-eliminate-zeroext" , cl::desc ("enable elimination of zero -extensions") , cl::init(true) , cl::Hidden )
static
◆ falsePowerPC MI Peephole false
◆ 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")) ( "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
◆ OptimizationPowerPC MI Peephole Optimization