< prev index next >

src/hotspot/share/c1/c1_LIRGenerator.hpp

BarrierSetC1_v3

BarrierSetC1_v2

BarrierSetC1

*** 23,38 **** --- 23,42 ---- */ #ifndef SHARE_VM_C1_C1_LIRGENERATOR_HPP #define SHARE_VM_C1_C1_LIRGENERATOR_HPP + #include "c1/c1_Decorators.hpp" #include "c1/c1_Instruction.hpp" #include "c1/c1_LIR.hpp" #include "ci/ciMethodData.hpp" + #include "gc/shared/barrierSet.hpp" #include "utilities/macros.hpp" #include "utilities/sizes.hpp" + class BarrierSetC1; + // The classes responsible for code emission and register allocation class LIRGenerator; class LIREmitter; ***************
*** 163,197 **** BlockBegin* _block; int _virtual_register_number; Values _instruction_for_operand; BitMap2D _vreg_flags; // flags which can be set on a per-vreg basis LIR_List* _lir; - BarrierSet* _bs; LIRGenerator* gen() { return this; } void print_if_not_loaded(const NewInstance* new_instance) PRODUCT_RETURN; #ifdef ASSERT LIR_List* lir(const char * file, int line) const { _lir->set_file_and_line(file, line); return _lir; } #endif LIR_List* lir() const { return _lir; } // a simple cache of constants used within a block GrowableArray<LIR_Const*> _constants; LIR_OprList _reg_for_constants; Values _unpinned_constants; friend class PhiResolver; // unified bailout support void bailout(const char* msg) const { compilation()->bailout(msg); } bool bailed_out() const { return compilation()->bailed_out(); } void block_do_prolog(BlockBegin* block); --- 167,203 ---- BlockBegin* _block; int _virtual_register_number; Values _instruction_for_operand; BitMap2D _vreg_flags; // flags which can be set on a per-vreg basis LIR_List* _lir; LIRGenerator* gen() { return this; } void print_if_not_loaded(const NewInstance* new_instance) PRODUCT_RETURN; + public: #ifdef ASSERT LIR_List* lir(const char * file, int line) const { _lir->set_file_and_line(file, line); return _lir; } #endif LIR_List* lir() const { return _lir; } + private: // a simple cache of constants used within a block GrowableArray<LIR_Const*> _constants; LIR_OprList _reg_for_constants; Values _unpinned_constants; friend class PhiResolver; + public: // unified bailout support void bailout(const char* msg) const { compilation()->bailout(msg); } bool bailed_out() const { return compilation()->bailed_out(); } void block_do_prolog(BlockBegin* block); ***************
*** 231,248 **** PhiResolverState& resolver_state() { return _resolver_state; } void move_to_phi(PhiResolver* resolver, Value cur_val, Value sux_val); void move_to_phi(ValueStack* cur_state); - // code emission - void do_ArithmeticOp_Long (ArithmeticOp* x); - void do_ArithmeticOp_Int (ArithmeticOp* x); - void do_ArithmeticOp_FPU (ArithmeticOp* x); - // platform dependent LIR_Opr getThreadPointer(); void do_RegisterFinalizer(Intrinsic* x); void do_isInstance(Intrinsic* x); void do_isPrimitive(Intrinsic* x); void do_getClass(Intrinsic* x); void do_currentThread(Intrinsic* x); --- 237,255 ---- PhiResolverState& resolver_state() { return _resolver_state; } void move_to_phi(PhiResolver* resolver, Value cur_val, Value sux_val); void move_to_phi(ValueStack* cur_state); // platform dependent LIR_Opr getThreadPointer(); + private: + // code emission + void do_ArithmeticOp_Long(ArithmeticOp* x); + void do_ArithmeticOp_Int (ArithmeticOp* x); + void do_ArithmeticOp_FPU (ArithmeticOp* x); + void do_RegisterFinalizer(Intrinsic* x); void do_isInstance(Intrinsic* x); void do_isPrimitive(Intrinsic* x); void do_getClass(Intrinsic* x); void do_currentThread(Intrinsic* x); ***************
*** 256,293 **** void do_Reference_get(Intrinsic* x); void do_update_CRC32(Intrinsic* x); void do_update_CRC32C(Intrinsic* x); void do_vectorizedMismatch(Intrinsic* x); LIR_Opr call_runtime(BasicTypeArray* signature, LIRItemList* args, address entry, ValueType* result_type, CodeEmitInfo* info); LIR_Opr call_runtime(BasicTypeArray* signature, LIR_OprList* args, address entry, ValueType* result_type, CodeEmitInfo* info); // convenience functions LIR_Opr call_runtime(Value arg1, address entry, ValueType* result_type, CodeEmitInfo* info); LIR_Opr call_runtime(Value arg1, Value arg2, address entry, ValueType* result_type, CodeEmitInfo* info); ! // GC Barriers ! // generic interface ! void pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val, bool do_load, bool patch, CodeEmitInfo* info); ! void post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val); // specific implementations ! // pre barriers ! ! void G1BarrierSet_pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val, ! bool do_load, bool patch, CodeEmitInfo* info); ! ! // post barriers ! ! void G1BarrierSet_post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val); ! void CardTableBarrierSet_post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val); ! #ifdef CARDTABLEBARRIERSET_POST_BARRIER_HELPER ! void CardTableBarrierSet_post_barrier_helper(LIR_OprDesc* addr, LIR_Const* card_table_base); ! #endif ! static LIR_Opr result_register_for(ValueType* type, bool callee = false); ciObject* get_jobject_constant(Value value); --- 263,311 ---- void do_Reference_get(Intrinsic* x); void do_update_CRC32(Intrinsic* x); void do_update_CRC32C(Intrinsic* x); void do_vectorizedMismatch(Intrinsic* x); + public: LIR_Opr call_runtime(BasicTypeArray* signature, LIRItemList* args, address entry, ValueType* result_type, CodeEmitInfo* info); LIR_Opr call_runtime(BasicTypeArray* signature, LIR_OprList* args, address entry, ValueType* result_type, CodeEmitInfo* info); // convenience functions LIR_Opr call_runtime(Value arg1, address entry, ValueType* result_type, CodeEmitInfo* info); LIR_Opr call_runtime(Value arg1, Value arg2, address entry, ValueType* result_type, CodeEmitInfo* info); ! // Access API ! private: ! BarrierSetC1 *_barrier_set; ! public: ! void access_store_at(DecoratorSet decorators, BasicType type, ! LIRItem& base, LIR_Opr offset, LIR_Opr value, ! CodeEmitInfo* patch_info = NULL, CodeEmitInfo* store_emit_info = NULL); ! ! void access_load_at(DecoratorSet decorators, BasicType type, ! LIRItem& base, LIR_Opr offset, LIR_Opr result, ! CodeEmitInfo* patch_info = NULL, CodeEmitInfo* load_emit_info = NULL); ! ! LIR_Opr access_atomic_cmpxchg_at(DecoratorSet decorators, BasicType type, ! LIRItem& base, LIRItem& offset, LIRItem& cmp_value, LIRItem& new_value); ! ! LIR_Opr access_atomic_xchg_at(DecoratorSet decorators, BasicType type, ! LIRItem& base, LIRItem& offset, LIRItem& value); ! ! LIR_Opr access_atomic_add_at(DecoratorSet decorators, BasicType type, ! LIRItem& base, LIRItem& offset, LIRItem& value); ! ! // These need to guarantee JMM volatile semantics are preserved on each platform ! // and requires one implementation per architecture. ! LIR_Opr atomic_cmpxchg(BasicType type, LIR_Opr addr, LIRItem& cmp_value, LIRItem& new_value); ! LIR_Opr atomic_xchg(BasicType type, LIR_Opr addr, LIRItem& new_value); ! LIR_Opr atomic_add(BasicType type, LIR_Opr addr, LIRItem& new_value); // specific implementations ! void array_store_check(LIR_Opr value, LIR_Opr array, CodeEmitInfo* store_check_info, ciMethod* profiled_method, int profiled_bci); static LIR_Opr result_register_for(ValueType* type, bool callee = false); ciObject* get_jobject_constant(Value value); ***************
*** 352,362 **** int disp, BasicType type); LIR_Address* generate_address(LIR_Opr base, int disp, BasicType type) { return generate_address(base, LIR_OprFact::illegalOpr, 0, disp, type); } ! LIR_Address* emit_array_address(LIR_Opr array_opr, LIR_Opr index_opr, BasicType type, bool needs_card_mark); // the helper for generate_address void add_large_constant(LIR_Opr src, int c, LIR_Opr dest); // machine preferences and characteristics --- 370,380 ---- int disp, BasicType type); LIR_Address* generate_address(LIR_Opr base, int disp, BasicType type) { return generate_address(base, LIR_OprFact::illegalOpr, 0, disp, type); } ! LIR_Address* emit_array_address(LIR_Opr array_opr, LIR_Opr index_opr, BasicType type); // the helper for generate_address void add_large_constant(LIR_Opr src, int c, LIR_Opr dest); // machine preferences and characteristics ***************
*** 431,442 **** #ifdef __SOFTFP__ void do_soft_float_compare(If *x); #endif // __SOFTFP__ - void init(); - SwitchRangeArray* create_lookup_ranges(TableSwitch* x); SwitchRangeArray* create_lookup_ranges(LookupSwitch* x); void do_SwitchRanges(SwitchRangeArray* x, LIR_Opr value, BlockBegin* default_sux); #ifdef TRACE_HAVE_INTRINSICS --- 449,458 ---- ***************
*** 450,459 **** --- 466,476 ---- Value arg, LIR_Opr& mdp, bool not_null, ciKlass* signature_at_call_k, ciKlass* callee_signature_k); void profile_arguments(ProfileCall* x); void profile_parameters(Base* x); void profile_parameters_at_call(ProfileCall* x); + LIR_Opr mask_boolean(LIR_Opr array, LIR_Opr value, CodeEmitInfo*& null_check_info); LIR_Opr maybe_mask_boolean(StoreIndexed* x, LIR_Opr array, LIR_Opr value, CodeEmitInfo*& null_check_info); public: Compilation* compilation() const { return _compilation; } FrameMap* frame_map() const { return _compilation->frame_map(); } ***************
*** 476,487 **** LIRGenerator(Compilation* compilation, ciMethod* method) : _compilation(compilation) , _method(method) , _virtual_register_number(LIR_OprDesc::vreg_base) ! , _vreg_flags(num_vreg_flags) { ! init(); } // for virtual registers, maps them back to Phi's or Local's Instruction* instruction_for_opr(LIR_Opr opr); Instruction* instruction_for_vreg(int reg_num); --- 493,504 ---- LIRGenerator(Compilation* compilation, ciMethod* method) : _compilation(compilation) , _method(method) , _virtual_register_number(LIR_OprDesc::vreg_base) ! , _vreg_flags(num_vreg_flags) ! , _barrier_set(BarrierSet::barrier_set()->barrier_set_c1()) { } // for virtual registers, maps them back to Phi's or Local's Instruction* instruction_for_opr(LIR_Opr opr); Instruction* instruction_for_vreg(int reg_num);
< prev index next >