25 #ifndef _JIT_COMPILER2_CONSTANTPROPAGATIONPASS
26 #define _JIT_COMPILER2_CONSTANTPROPAGATIONPASS
Pass superclass All compiler passes should inheritate this class.
virtual bool is_enabled() const
Allows concrete passes to enable/disable themselves the way they like.
alloc::unordered_map< Instruction *, std::size_t >::type InstIntMapTy
virtual bool run(JITData &JD)
Run the Pass.
ConstantPropagationPass()
WorkListTy workList
This work list is used by the algorithm to store the instructions which have to be reconsidered...
static Option< bool > enabled
InstBoolMapTy inWorkList
will be used to look up whether an instruction is currently contained in the worklist to avoid insert...
InstIntMapTy constantOperands
used to track for each instruction the number of its operands which are already known to be constant ...
Stores the interdependencies of a pass.
virtual PassUsage & get_PassUsage(PassUsage &PA) const
Set the requirements for the pass.
std::list< Instruction * > WorkListTy
alloc::unordered_map< Instruction *, bool >::type InstBoolMapTy
This file contains the command line option parsing library.
void propagate(Instruction *inst)
void replace_by_constant(Instruction *isnt, CONSTInst *c, Method *M)
std::unordered_map< Key, T, Hash, KeyEqual, Allocator< std::pair< const Key, T > > > type