CACAO
Data Structures | Macros | Functions
ConstantPropagationPass.cpp File Reference

Go to the source code of this file.

Data Structures

struct  BinaryOperation< T, Instruction::ADDInstID >
 Template specialization for ADDInstID. More...
 
struct  BinaryOperation< T, Instruction::SUBInstID >
 Template specialization for SUBInstID. More...
 
struct  BinaryOperation< T, Instruction::MULInstID >
 Template specialization for MULInstID. More...
 
struct  BinaryOperation< T, Instruction::DIVInstID >
 Template specialization for DIVInstID. More...
 
struct  BinaryOperation< T, Instruction::ANDInstID >
 Template specialization for ANDInstID. More...
 
struct  UnaryOperation< T, ID >
 UnaryOperation function object class. More...
 
struct  UnaryOperation< T, Instruction::NEGInstID >
 Template specialization for NEGInstID. More...
 

Macros

#define DEBUG_NAME   "compiler2/ConstantPropagationPass"
 

Functions

 STAT_REGISTER_SUBGROUP (compiler2_constantpropagationpass_stat,"constantpropagationpass","constantpropagationpass", compiler2_stat) STAT_REGISTER_GROUP_VAR(std
 
template<typename T >
binaryOperate (Instruction::InstID ID, const T &lhs, const T &rhs)
 function wrapper for BinaryOperation More...
 
CONSTInst * foldBinaryInst (BinaryInst *inst)
 
template<typename T >
unaryOperate (Instruction::InstID ID, const T &op)
 function wrapper for UnaryOperation More...
 
CONSTInst * foldUnaryInst (UnaryInst *inst)
 
template<typename T >
CONSTInst * castOperate (CASTInst *inst, const T &op)
 
CONSTInst * foldCASTInst (CASTInst *inst)
 
CONSTInst * foldInstruction (Instruction *inst)
 
bool has_only_constant_operands (Instruction *inst)
 
bool can_be_statically_evaluated (Instruction *inst)
 
static PassRegistry
< ConstantPropagationPass > 
X ("ConstantPropagationPass")
 

Macro Definition Documentation

#define DEBUG_NAME   "compiler2/ConstantPropagationPass"

Definition at line 36 of file ConstantPropagationPass.cpp.

Function Documentation

template<typename T >
T binaryOperate ( Instruction::InstID  ID,
const T &  lhs,
const T &  rhs 
)
inline

function wrapper for BinaryOperation

Definition at line 104 of file ConstantPropagationPass.cpp.

bool can_be_statically_evaluated ( Instruction *  inst)

Definition at line 303 of file ConstantPropagationPass.cpp.

template<typename T >
CONSTInst* castOperate ( CASTInst *  inst,
const T &  op 
)

Definition at line 201 of file ConstantPropagationPass.cpp.

CONSTInst* foldBinaryInst ( BinaryInst *  inst)

Definition at line 122 of file ConstantPropagationPass.cpp.

CONSTInst* foldCASTInst ( CASTInst *  inst)

Definition at line 217 of file ConstantPropagationPass.cpp.

CONSTInst* foldInstruction ( Instruction *  inst)

Definition at line 236 of file ConstantPropagationPass.cpp.

CONSTInst* foldUnaryInst ( UnaryInst *  inst)

Definition at line 176 of file ConstantPropagationPass.cpp.

bool has_only_constant_operands ( Instruction *  inst)

Definition at line 271 of file ConstantPropagationPass.cpp.

STAT_REGISTER_SUBGROUP ( compiler2_constantpropagationpass_stat  ,
"constantpropagationpass"  ,
"constantpropagationpass"  ,
compiler2_stat   
)

Definition at line 39 of file ConstantPropagationPass.cpp.

template<typename T >
T unaryOperate ( Instruction::InstID  ID,
const T &  op 
)
inline

function wrapper for UnaryOperation

Definition at line 163 of file ConstantPropagationPass.cpp.

static PassRegistry<ConstantPropagationPass> X ( "ConstantPropagationPass"  )
static