Skip to content

Commit fd8f070

Browse files
committed
Compiler batch.
1 parent e504cbf commit fd8f070

17 files changed

+49
-24
lines changed

src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ void C1_MacroAssembler::try_allocate(Register obj, Register var_size_in_bytes, i
101101
void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register len, Register t1, Register t2) {
102102
assert_different_registers(obj, klass, len);
103103

104-
if (UseCompactObjectHeaders || EnableValhalla) {
104+
// EnableValhalla legacy
105+
if (UseCompactObjectHeaders || Arguments::enable_preview()) {
105106
// COH: Markword contains class pointer which is only known at runtime.
106107
// Valhalla: Could have value class which has a different prototype header to a normal object.
107108
// In both cases, we need to fetch dynamically.

src/hotspot/cpu/x86/c1_MacroAssembler_x86.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ void C1_MacroAssembler::try_allocate(Register obj, Register var_size_in_bytes, i
8383

8484
void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register len, Register t1, Register t2) {
8585
assert_different_registers(obj, klass, len, t1, t2);
86-
if (UseCompactObjectHeaders || EnableValhalla) {
86+
// EnableValhalla legacy
87+
if (UseCompactObjectHeaders || Arguments::enable_preview()) {
8788
// COH: Markword contains class pointer which is only known at runtime.
8889
// Valhalla: Could have value class which has a different prototype header to a normal object.
8990
// In both cases, we need to fetch dynamically.

src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm,
235235

236236
__ bind(runtime);
237237

238-
if (EnableValhalla && InlineTypePassFieldsAsArgs) {
238+
// EnableValhalla legacy
239+
if (Arguments::enable_preview() && InlineTypePassFieldsAsArgs) {
239240
// Barriers might be emitted when converting between (scalarized) calling conventions for inline
240241
// types. Save all argument registers before calling into the runtime.
241242
// TODO 8366717: use push_set() (see JDK-8283327 push/pop_call_clobbered_registers & aarch64 )
@@ -279,7 +280,8 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm,
279280
__ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_field_pre_entry), pre_val, thread);
280281
}
281282

282-
if (EnableValhalla && InlineTypePassFieldsAsArgs) {
283+
// EnableValhalla legacy
284+
if (Arguments::enable_preview() && InlineTypePassFieldsAsArgs) {
283285
// Restore registers
284286
__ movdbl(j_farg0, Address(rsp, 0));
285287
__ movdbl(j_farg1, Address(rsp, 8));

src/hotspot/share/c1/c1_GraphBuilder.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,8 @@ void GraphBuilder::if_node(Value x, If::Condition cond, Value y, ValueStack* sta
13621362
bool is_bb = tsux->bci() < stream()->cur_bci() || fsux->bci() < stream()->cur_bci();
13631363

13641364
bool subst_check = false;
1365-
if (EnableValhalla && (stream()->cur_bc() == Bytecodes::_if_acmpeq || stream()->cur_bc() == Bytecodes::_if_acmpne)) {
1365+
// EnableValhalla legacy
1366+
if (Arguments::enable_preview() && (stream()->cur_bc() == Bytecodes::_if_acmpeq || stream()->cur_bc() == Bytecodes::_if_acmpne)) {
13661367
ValueType* left_vt = x->type();
13671368
ValueType* right_vt = y->type();
13681369
if (left_vt->is_object()) {
@@ -2566,7 +2567,8 @@ void GraphBuilder::monitorenter(Value x, int bci) {
25662567
#endif
25672568
} else {
25682569
// We are compiling a monitorenter bytecode
2569-
if (EnableValhalla) {
2570+
// EnableValhalla legacy
2571+
if (Arguments::enable_preview()) {
25702572
ciType* obj_type = x->declared_type();
25712573
if (obj_type == nullptr || obj_type->as_klass()->can_be_inline_klass()) {
25722574
// If we're (possibly) locking on an inline type, check for markWord::always_locked_pattern
@@ -4301,7 +4303,8 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known, bool ign
43014303

43024304
// Check if we need a membar at the beginning of the java.lang.Object
43034305
// constructor to satisfy the memory model for strict fields.
4304-
if (EnableValhalla && method()->intrinsic_id() == vmIntrinsics::_Object_init) {
4306+
// EnableValhalla legacy
4307+
if (Arguments::enable_preview() && method()->intrinsic_id() == vmIntrinsics::_Object_init) {
43054308
Value receiver = state()->local_at(0);
43064309
ciType* klass = receiver->exact_type();
43074310
if (klass == nullptr) {

src/hotspot/share/c1/c1_LIRGenerator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3008,7 +3008,8 @@ void LIRGenerator::do_Base(Base* x) {
30083008

30093009
// Check if we need a membar at the beginning of the java.lang.Object
30103010
// constructor to satisfy the memory model for strict fields.
3011-
if (EnableValhalla && method()->intrinsic_id() == vmIntrinsics::_Object_init) {
3011+
// EnableValhalla legacy
3012+
if (Arguments::enable_preview() && method()->intrinsic_id() == vmIntrinsics::_Object_init) {
30123013
__ membar_storestore();
30133014
}
30143015

src/hotspot/share/ci/ciInstanceKlass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,8 @@ ciInstanceKlass* ciInstanceKlass::implementor() {
696696
}
697697

698698
bool ciInstanceKlass::can_be_inline_klass(bool is_exact) {
699-
if (!EnableValhalla) {
699+
// EnableValhalla legacy
700+
if (!Arguments::enable_preview()) {
700701
return false;
701702
}
702703
if (!is_loaded() || is_inlinetype()) {

src/hotspot/share/ci/ciKlass.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
#include "ci/ciType.hpp"
2929
#include "oops/klass.hpp"
30+
#include "runtime/arguments.hpp"
3031

3132
// ciKlass
3233
//
@@ -111,7 +112,8 @@ class ciKlass : public ciType {
111112
}
112113

113114
virtual bool can_be_inline_array_klass() {
114-
return EnableValhalla && is_java_lang_Object();
115+
// EnableValhalla legacy
116+
return Arguments::enable_preview() && is_java_lang_Object();
115117
}
116118

117119
bool is_in_encoding_range() {

src/hotspot/share/gc/shared/memAllocator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,8 @@ oop MemAllocator::finish(HeapWord* mem) const {
380380
if (UseCompactObjectHeaders) {
381381
oopDesc::release_set_mark(mem, _klass->prototype_header());
382382
} else {
383-
if (EnableValhalla) {
383+
// EnableValhalla legacy
384+
if (Arguments::enable_preview()) {
384385
oopDesc::set_mark(mem, _klass->prototype_header());
385386
} else {
386387
oopDesc::set_mark(mem, markWord::prototype());

src/hotspot/share/gc/z/zObjArrayAllocator.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ oop ZObjArrayAllocator::initialize(HeapWord* mem) const {
6767
if (UseCompactObjectHeaders) {
6868
oopDesc::release_set_mark(mem, _klass->prototype_header().set_marked());
6969
} else {
70-
if (EnableValhalla) {
70+
// EnableValhalla legacy
71+
if (Arguments::enable_preview()) {
7172
arrayOopDesc::set_mark(mem, _klass->prototype_header().set_marked());
7273
} else {
7374
arrayOopDesc::set_mark(mem, markWord::prototype().set_marked());
@@ -161,7 +162,8 @@ oop ZObjArrayAllocator::initialize(HeapWord* mem) const {
161162
ZThreadLocalData::clear_invisible_root(_thread);
162163

163164
// Signal to the ZIterator that this is no longer an invisible root
164-
if (UseCompactObjectHeaders || EnableValhalla) {
165+
// EnableValhalla legacy
166+
if (UseCompactObjectHeaders || Arguments::enable_preview()) {
165167
oopDesc::release_set_mark(mem, _klass->prototype_header());
166168
} else {
167169
oopDesc::release_set_mark(mem, markWord::prototype());

src/hotspot/share/opto/callnode.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,8 @@ bool CallJavaNode::validate_symbolic_info() const {
11231123
return true; // call into runtime or uncommon trap
11241124
}
11251125
Bytecodes::Code bc = jvms()->method()->java_code_at_bci(jvms()->bci());
1126-
if (EnableValhalla && (bc == Bytecodes::_if_acmpeq || bc == Bytecodes::_if_acmpne)) {
1126+
// EnableValhalla legacy
1127+
if (Arguments::enable_preview() && (bc == Bytecodes::_if_acmpeq || bc == Bytecodes::_if_acmpne)) {
11271128
return true;
11281129
}
11291130
ciMethod* symbolic_info = jvms()->method()->get_method_at_bci(jvms()->bci());
@@ -1940,11 +1941,13 @@ void AllocateNode::compute_MemBar_redundancy(ciMethod* initializer)
19401941

19411942
Node* AllocateNode::make_ideal_mark(PhaseGVN* phase, Node* control, Node* mem) {
19421943
Node* mark_node = nullptr;
1943-
if (UseCompactObjectHeaders || EnableValhalla) {
1944+
// EnableValhalla legacy
1945+
if (UseCompactObjectHeaders || Arguments::enable_preview()) {
19441946
Node* klass_node = in(AllocateNode::KlassNode);
19451947
Node* proto_adr = phase->transform(new AddPNode(klass_node, klass_node, phase->MakeConX(in_bytes(Klass::prototype_header_offset()))));
19461948
mark_node = LoadNode::make(*phase, control, mem, proto_adr, TypeRawPtr::BOTTOM, TypeX_X, TypeX_X->basic_type(), MemNode::unordered);
1947-
if (EnableValhalla) {
1949+
// EnavleValhalla legacy
1950+
if (Arguments::enable_preview()) {
19481951
mark_node = phase->transform(mark_node);
19491952
// Avoid returning a constant (old node) here because this method is used by LoadNode::Ideal
19501953
mark_node = new OrXNode(mark_node, phase->MakeConX(_larval ? markWord::larval_bit_in_place : 0));

0 commit comments

Comments
 (0)