< prev index next >

src/hotspot/share/opto/graphKit.cpp

Print this page

        

@@ -23,13 +23,10 @@
  */
 
 #include "precompiled.hpp"
 #include "ci/ciUtilities.hpp"
 #include "compiler/compileLog.hpp"
-#include "gc/g1/g1BarrierSet.hpp"
-#include "gc/g1/g1CardTable.hpp"
-#include "gc/g1/heapRegion.hpp"
 #include "gc/shared/barrierSet.hpp"
 #include "gc/shared/cardTable.hpp"
 #include "gc/shared/cardTableBarrierSet.hpp"
 #include "gc/shared/collectedHeap.hpp"
 #include "interpreter/interpreter.hpp"

@@ -46,11 +43,11 @@
 #include "opto/parse.hpp"
 #include "opto/rootnode.hpp"
 #include "opto/runtime.hpp"
 #include "runtime/deoptimization.hpp"
 #include "runtime/sharedRuntime.hpp"
-#if INCLUDE_ALL_GCS
+#if INCLUDE_G1GC
 #include "gc/g1/g1CardTable.hpp"
 #include "gc/g1/g1ThreadLocalData.hpp"
 #include "gc/g1/heapRegion.hpp"
 #endif // INCLUDE_ALL_GCS
 

@@ -1565,13 +1562,16 @@
                            BasicType bt) {
 
   BarrierSet* bs = BarrierSet::barrier_set();
   set_control(ctl);
   switch (bs->kind()) {
+
+#if INCLUDE_G1GC
     case BarrierSet::G1BarrierSet:
       g1_write_barrier_pre(do_load, obj, adr, adr_idx, val, val_type, pre_val, bt);
       break;
+#endif
 
     case BarrierSet::CardTableBarrierSet:
       break;
 
     default      :

@@ -1581,12 +1581,15 @@
 }
 
 bool GraphKit::can_move_pre_barrier() const {
   BarrierSet* bs = BarrierSet::barrier_set();
   switch (bs->kind()) {
+
+#if INCLUDE_G1GC
     case BarrierSet::G1BarrierSet:
       return true; // Can move it if no safepoint
+#endif
 
     case BarrierSet::CardTableBarrierSet:
       return true; // There is no pre-barrier
 
     default      :

@@ -1604,13 +1607,15 @@
                             BasicType bt,
                             bool use_precise) {
   BarrierSet* bs = BarrierSet::barrier_set();
   set_control(ctl);
   switch (bs->kind()) {
+#if INCLUDE_G1GC
     case BarrierSet::G1BarrierSet:
       g1_write_barrier_post(store, obj, adr, adr_idx, val, bt, use_precise);
       break;
+#endif
 
     case BarrierSet::CardTableBarrierSet:
       write_barrier_post(store, obj, adr, adr_idx, val, use_precise);
       break;
 

@@ -3929,10 +3934,13 @@
   }
 
   // Final sync IdealKit and GraphKit.
   final_sync(ideal);
 }
+
+#if INCLUDE_G1GC
+
 /*
  * Determine if the G1 pre-barrier can be removed. The pre-barrier is
  * required by SATB to make sure all objects live at the start of the
  * marking are kept alive, all reference updates need to any previous
  * reference stored before writing.

@@ -4361,10 +4369,11 @@
   // Final sync IdealKit and GraphKit.
   final_sync(ideal);
 }
 #undef __
 
+#endif // INCLUDE_G1GC
 
 Node* GraphKit::load_String_length(Node* ctrl, Node* str) {
   Node* len = load_array_length(load_String_value(ctrl, str));
   Node* coder = load_String_coder(ctrl, str);
   // Divide length by 2 if coder is UTF16
< prev index next >