25 #ifndef _JIT_COMPILER2_GLOBALVALUENUMBERINGPASS
26 #define _JIT_COMPILER2_GLOBALVALUENUMBERINGPASS
28 #include <unordered_map>
53 typedef std::unordered_map<BlockTy*,std::vector<bool>* >
InWorkListTy;
60 typedef std::unordered_map<Instruction::InstID,BlockTy*,std::hash<int> >
OpcodeBlockMapTy;
110 template <
typename T1,
typename T2>
BlockTy * get_block(Instruction *inst)
std::unordered_map< int32_t, BlockTy * > IntBlockMapTy
Pass superclass All compiler passes should inheritate this class.
std::unordered_map< Instruction::InstID, BlockTy *, std::hash< int > > OpcodeBlockMapTy
these types are needed for the creation of the inital blocks
void init_worklist_and_touchedblocks()
void eliminate_redundancies()
std::list< BlockTy * > PartitionTy
alloc::unordered_set< Instruction * >::type BlockTy
GlobalValueNumberingPass()
InstructionListTy * get_users(Instruction *inst, int op_index)
std::list< Instruction * > InstructionListTy
alloc::unordered_set< Instruction * >::type TouchedInstListTy
std::list< WorkListPairTy * > WorkListTy
std::unordered_set< Key, Hash, KeyEqual, Allocator< Key > > type
Inst2BlockMapTy inst2BlockMap
std::unordered_map< BlockTy *, TouchedInstListTy * > Block2TouchedInstListMapTy
virtual bool run(JITData &JD)
Run the Pass.
bool is_in_worklist(BlockTy *block, int index)
void set_in_worklist(BlockTy *block, int index, bool flag)
std::vector< bool > * get_worklist_flags(BlockTy *block)
BlockTy * get_or_create_block(T1 &map, T2 key)
Stores the interdependencies of a pass.
void init_operand_inverse(Method::const_iterator begin, Method::const_iterator end)
std::unordered_map< int64_t, BlockTy * > LongBlockMapTy
Block2TouchedInstListMapTy block2TouchedInstListMap
std::unordered_map< Instruction *, OperandIndex2UsersTy * > OperandInverseMapTy
void split(BlockTy *block, TouchedInstListTy *instructions)
std::unordered_map< double, BlockTy * > DoubleBlockMapTy
void add_to_worklist(BlockTy *block, int operandIndex)
std::pair< BlockTy *, int > WorkListPairTy
GlobalValueNumberingPass.
InstructionListTy::const_iterator const_iterator
static int arity(BlockTy *block)
std::vector< InstructionListTy * > OperandIndex2UsersTy
OperandInverseMapTy operandInverseMap
This file contains the command line option parsing library.
void print_block(BlockTy *block)
static int compute_max_arity(Method::const_iterator begin, Method::const_iterator end)
jmethodID jint const void jint const jvmtiAddrLocationMap * map
TouchedInstListTy * get_touched_instructions(BlockTy *block)
void init_partition(Method::const_iterator begin, Method::const_iterator end)
void add_to_block(BlockTy *block, Instruction *inst)
virtual PassUsage & get_PassUsage(PassUsage &PU) const
Set the requirements for the pass.
std::unordered_map< Instruction *, BlockTy * > Inst2BlockMapTy
void clean_up_operand_inverse()
virtual bool is_enabled() const
Allows concrete passes to enable/disable themselves the way they like.
std::unordered_map< float, BlockTy * > FloatBlockMapTy
std::unordered_map< BeginInst *, BlockTy * > BBBlockMapTy
WorkListPairTy * selectAndDeleteFromWorkList()
BlockTy * create_block()
creates and returns a new block and does some setup work needed for the further execution of the part...
void print_instructions(TouchedInstListTy *instructions)
void eliminate_redundancies_in_block(BlockTy *block)
static Option< bool > enabled
std::unordered_map< BlockTy *, std::vector< bool > * > InWorkListTy