1.1 --- a/src/share/vm/c1/c1_ValueMap.hpp Wed Mar 20 17:04:45 2013 -0700 1.2 +++ b/src/share/vm/c1/c1_ValueMap.hpp Thu Mar 21 09:27:54 2013 +0100 1.3 @@ -206,6 +206,8 @@ 1.4 void do_ProfileInvoke (ProfileInvoke* x) { /* nothing to do */ }; 1.5 void do_RuntimeCall (RuntimeCall* x) { /* nothing to do */ }; 1.6 void do_MemBar (MemBar* x) { /* nothing to do */ }; 1.7 + void do_RangeCheckPredicate(RangeCheckPredicate* x) { /* nothing to do */ }; 1.8 + void do_Assert (Assert* x) { /* nothing to do */ }; 1.9 }; 1.10 1.11 1.12 @@ -225,15 +227,22 @@ 1.13 1.14 class GlobalValueNumbering: public ValueNumberingVisitor { 1.15 private: 1.16 + Compilation* _compilation; // compilation data 1.17 ValueMap* _current_map; // value map of current block 1.18 ValueMapArray _value_maps; // list of value maps for all blocks 1.19 + ValueSet _processed_values; // marker for instructions that were already processed 1.20 + bool _has_substitutions; // set to true when substitutions must be resolved 1.21 1.22 public: 1.23 // accessors 1.24 + Compilation* compilation() const { return _compilation; } 1.25 ValueMap* current_map() { return _current_map; } 1.26 ValueMap* value_map_of(BlockBegin* block) { return _value_maps.at(block->linear_scan_number()); } 1.27 void set_value_map_of(BlockBegin* block, ValueMap* map) { assert(value_map_of(block) == NULL, ""); _value_maps.at_put(block->linear_scan_number(), map); } 1.28 1.29 + bool is_processed(Value v) { return _processed_values.contains(v); } 1.30 + void set_processed(Value v) { _processed_values.put(v); } 1.31 + 1.32 // implementation for abstract methods of ValueNumberingVisitor 1.33 void kill_memory() { current_map()->kill_memory(); } 1.34 void kill_field(ciField* field, bool all_offsets) { current_map()->kill_field(field, all_offsets); } 1.35 @@ -241,6 +250,7 @@ 1.36 1.37 // main entry point that performs global value numbering 1.38 GlobalValueNumbering(IR* ir); 1.39 + void substitute(Instruction* instr); // substitute instruction if it is contained in current value map 1.40 }; 1.41 1.42 #endif // SHARE_VM_C1_C1_VALUEMAP_HPP