< prev index next >

src/hotspot/share/c1/c1_LIRGenerator.hpp

BarrierSetC1_v3

BarrierSetC1_v2
  */
 
 #ifndef SHARE_VM_C1_C1_LIRGENERATOR_HPP
 #define SHARE_VM_C1_C1_LIRGENERATOR_HPP
 
-#include "gc/shared/c1/barrierSetC1.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;

@@ -150,14 +152,10 }; // only the classes below belong in the same file class LIRGenerator: public InstructionVisitor, public BlockClosure { - friend class BarrierSetC1; - friend class ModRefBarrierSetC1; - friend class CardTableBarrierSetC1; - friend class G1BarrierSetC1; // LIRGenerator should never get instatiated on the heap. private: void* operator new(size_t size) throw(); void* operator new[](size_t size) throw(); void operator delete(void* p) { ShouldNotReachHere(); }
@@ -176,27 +174,30 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);
@@ -236,18 +237,19 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(); + 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);
@@ -261,28 +263,31 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); - // GC Barriers + // Access API - // generic interface + private: + BarrierSetC1 *_barrier_set; + public: void access_store_at(DecoratorSet decorators, BasicType type, LIRItem& base, LIR_Opr offset, LIR_Opr value, - CodeEmitInfo* patch_info, CodeEmitInfo* store_emit_info); + 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, CodeEmitInfo* load_emit_info); + 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,
@@ -488,11 +493,12 LIRGenerator(Compilation* compilation, ciMethod* method) : _compilation(compilation) , _method(method) , _virtual_register_number(LIR_OprDesc::vreg_base) - , _vreg_flags(num_vreg_flags) { + , _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 >