Skip to content

Commit

Permalink
Only use regular arenas
Browse files Browse the repository at this point in the history
  • Loading branch information
jdksjolen committed Nov 30, 2023
1 parent 5291125 commit ab5f0f7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/opto/chaitin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ void PhaseChaitin::Register_Allocate() {
_matcher._allocation_started = true;

// Explicitly use right constructor
ResourceArea split_arena(&CompilerThread::current()->_chaitin_memory1, mtCompiler); // Arena for Split local resources
ResourceArea live_arena(&CompilerThread::current()->_chaitin_memory2, mtCompiler); // Arena for liveness & IFG info
ResourceArea split_arena(/*&CompilerThread::current()->_chaitin_memory1,*/ mtCompiler); // Arena for Split local resources
ResourceArea live_arena(/*&CompilerThread::current()->_chaitin_memory2,*/ mtCompiler); // Arena for liveness & IFG info
ResourceMark rm(&live_arena);

// Need live-ness for the IFG; need the IFG for coalescing. If the
Expand Down
12 changes: 6 additions & 6 deletions src/hotspot/share/opto/compile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ Compile::Compile( ciEnv* ci_env, ciMethod* target, int osr_bci,
_has_method_handle_invokes(false),
_clinit_barrier_on_entry(false),
_stress_seed(0),
_comp_arena(mtCompiler, &CompilerThread::current()->_compiler_memory),
_comp_arena(mtCompiler/*, &CompilerThread::current()->_compiler_memory*/),
_barrier_set_state(BarrierSet::barrier_set()->barrier_set_c2()->create_barrier_state(comp_arena())),
_env(ci_env),
_directive(directive),
Expand All @@ -649,8 +649,8 @@ Compile::Compile( ciEnv* ci_env, ciMethod* target, int osr_bci,
NOT_PRODUCT(_igv_printer(nullptr) COMMA)
_unique(0),
_dead_node_count(0),
_node_arena_one(mtCompiler, &CompilerThread::current()->_narena_mem_one, Arena::Tag::tag_node),
_node_arena_two(mtCompiler, &CompilerThread::current()->_narena_mem_two, Arena::Tag::tag_node),
_node_arena_one(mtCompiler/*, &CompilerThread::current()->_narena_mem_one*/, Arena::Tag::tag_node),
_node_arena_two(mtCompiler/*, &CompilerThread::current()->_narena_mem_two*/, Arena::Tag::tag_node),
_node_arena(&_node_arena_one),
_mach_constant_base_node(nullptr),
_Compile_types(mtCompiler),
Expand Down Expand Up @@ -919,7 +919,7 @@ Compile::Compile( ciEnv* ci_env,
_has_method_handle_invokes(false),
_clinit_barrier_on_entry(false),
_stress_seed(0),
_comp_arena(mtCompiler, &CompilerThread::current()->_compiler_memory),
_comp_arena(mtCompiler/*, &CompilerThread::current()->_compiler_memory*/),
_barrier_set_state(BarrierSet::barrier_set()->barrier_set_c2()->create_barrier_state(comp_arena())),
_env(ci_env),
_directive(directive),
Expand All @@ -930,8 +930,8 @@ Compile::Compile( ciEnv* ci_env,
_unique(0),
_dead_node_count(0),
_dead_node_list(comp_arena()),
_node_arena_one(mtCompiler, &CompilerThread::current()->_narena_mem_one),
_node_arena_two(mtCompiler, &CompilerThread::current()->_narena_mem_two),
_node_arena_one(mtCompiler/*, &CompilerThread::current()->_narena_mem_one*/),
_node_arena_two(mtCompiler/*, &CompilerThread::current()->_narena_mem_two*/),
_node_arena(&_node_arena_one),
_mach_constant_base_node(nullptr),
_Compile_types(mtCompiler),
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/opto/gcm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ void PhaseCFG::global_code_motion() {
// Enabling the scheduler for register pressure plus finding blocks of size to schedule for it
// is key to enabling this feature.
PhaseChaitin regalloc(C->unique(), *this, _matcher, true);
ResourceArea live_arena(&CompilerThread::current()->_cfg_memory, mtCompiler); // Arena for liveness
ResourceArea live_arena(/*&CompilerThread::current()->_cfg_memory,*/ mtCompiler); // Arena for liveness
ResourceMark rm_live(&live_arena);
PhaseLive live(*this, regalloc._lrg_map.names(), &live_arena, true);
PhaseIFG ifg(&live_arena);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/opto/matcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const uint Matcher::_end_rematerialize = _END_REMATERIALIZE;
//---------------------------Matcher-------------------------------------------
Matcher::Matcher()
: PhaseTransform( Phase::Ins_Select ),
_states_arena(Chunk::medium_size, &CompilerThread::current()->_matcher_memory, mtCompiler),
_states_arena(Chunk::medium_size, /*&CompilerThread::current()->_matcher_memory,*/ mtCompiler),
_new_nodes(C->comp_arena()),
_visited(&_states_arena),
_shared(&_states_arena),
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/opto/phaseX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,7 @@ void PhaseCCP::analyze() {
// CCP worklist is placed on a local arena, so that we can allow ResourceMarks on "Compile::current()->resource_arena()".
// We also do not want to put the worklist on "Compile::current()->comp_arena()", as that one only gets de-allocated after
// Compile is over. The local arena gets de-allocated at the end of its scope.
ResourceArea local_arena(&CompilerThread::current()->_phaseccp_memory, mtCompiler);
ResourceArea local_arena(/*&CompilerThread::current()->_phaseccp_memory,*/ mtCompiler);
Unique_Node_List worklist(&local_arena);
DEBUG_ONLY(Unique_Node_List worklist_verify(&local_arena);)

Expand Down

0 comments on commit ab5f0f7

Please sign in to comment.