< prev index next >
src/hotspot/share/opto/graphKit.cpp
Print this page
*** 23,35 ****
*/
#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"
--- 23,32 ----
*** 46,56 ****
#include "opto/parse.hpp"
#include "opto/rootnode.hpp"
#include "opto/runtime.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/sharedRuntime.hpp"
! #if INCLUDE_ALL_GCS
#include "gc/g1/g1CardTable.hpp"
#include "gc/g1/g1ThreadLocalData.hpp"
#include "gc/g1/heapRegion.hpp"
#endif // INCLUDE_ALL_GCS
--- 43,53 ----
#include "opto/parse.hpp"
#include "opto/rootnode.hpp"
#include "opto/runtime.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/sharedRuntime.hpp"
! #if INCLUDE_G1GC
#include "gc/g1/g1CardTable.hpp"
#include "gc/g1/g1ThreadLocalData.hpp"
#include "gc/g1/heapRegion.hpp"
#endif // INCLUDE_ALL_GCS
*** 1565,1577 ****
--- 1562,1577 ----
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,1592 ****
--- 1581,1595 ----
}
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,1616 ****
--- 1607,1621 ----
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,3938 ****
--- 3934,3946 ----
}
// 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,4370 ****
--- 4369,4379 ----
// 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 >