mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 20:14:43 +02:00
6958292: C1: Enable parallel compilation
Enable parallel compilation in C1 Reviewed-by: never, kvn
This commit is contained in:
parent
36f8c82970
commit
00b75f8353
30 changed files with 328 additions and 344 deletions
|
@ -29,8 +29,6 @@
|
|||
// Implementation of Instruction
|
||||
|
||||
|
||||
int Instruction::_next_id = 0;
|
||||
|
||||
#ifdef ASSERT
|
||||
void Instruction::create_hi_word() {
|
||||
assert(type()->is_double_word() && _hi_word == NULL, "only double word has high word");
|
||||
|
@ -193,22 +191,22 @@ ciType* CheckCast::exact_type() const {
|
|||
}
|
||||
|
||||
|
||||
void ArithmeticOp::other_values_do(void f(Value*)) {
|
||||
void ArithmeticOp::other_values_do(ValueVisitor* f) {
|
||||
if (lock_stack() != NULL) lock_stack()->values_do(f);
|
||||
}
|
||||
|
||||
void NullCheck::other_values_do(void f(Value*)) {
|
||||
void NullCheck::other_values_do(ValueVisitor* f) {
|
||||
lock_stack()->values_do(f);
|
||||
}
|
||||
|
||||
void AccessArray::other_values_do(void f(Value*)) {
|
||||
void AccessArray::other_values_do(ValueVisitor* f) {
|
||||
if (lock_stack() != NULL) lock_stack()->values_do(f);
|
||||
}
|
||||
|
||||
|
||||
// Implementation of AccessField
|
||||
|
||||
void AccessField::other_values_do(void f(Value*)) {
|
||||
void AccessField::other_values_do(ValueVisitor* f) {
|
||||
if (state_before() != NULL) state_before()->values_do(f);
|
||||
if (lock_stack() != NULL) lock_stack()->values_do(f);
|
||||
}
|
||||
|
@ -270,7 +268,7 @@ bool LogicOp::is_commutative() const {
|
|||
|
||||
// Implementation of CompareOp
|
||||
|
||||
void CompareOp::other_values_do(void f(Value*)) {
|
||||
void CompareOp::other_values_do(ValueVisitor* f) {
|
||||
if (state_before() != NULL) state_before()->values_do(f);
|
||||
}
|
||||
|
||||
|
@ -302,12 +300,12 @@ IRScope* StateSplit::scope() const {
|
|||
}
|
||||
|
||||
|
||||
void StateSplit::state_values_do(void f(Value*)) {
|
||||
void StateSplit::state_values_do(ValueVisitor* f) {
|
||||
if (state() != NULL) state()->values_do(f);
|
||||
}
|
||||
|
||||
|
||||
void BlockBegin::state_values_do(void f(Value*)) {
|
||||
void BlockBegin::state_values_do(ValueVisitor* f) {
|
||||
StateSplit::state_values_do(f);
|
||||
|
||||
if (is_set(BlockBegin::exception_entry_flag)) {
|
||||
|
@ -318,13 +316,13 @@ void BlockBegin::state_values_do(void f(Value*)) {
|
|||
}
|
||||
|
||||
|
||||
void MonitorEnter::state_values_do(void f(Value*)) {
|
||||
void MonitorEnter::state_values_do(ValueVisitor* f) {
|
||||
StateSplit::state_values_do(f);
|
||||
_lock_stack_before->values_do(f);
|
||||
}
|
||||
|
||||
|
||||
void Intrinsic::state_values_do(void f(Value*)) {
|
||||
void Intrinsic::state_values_do(ValueVisitor* f) {
|
||||
StateSplit::state_values_do(f);
|
||||
if (lock_stack() != NULL) lock_stack()->values_do(f);
|
||||
}
|
||||
|
@ -349,8 +347,9 @@ Invoke::Invoke(Bytecodes::Code code, ValueType* result_type, Value recv, Values*
|
|||
|
||||
assert(args != NULL, "args must exist");
|
||||
#ifdef ASSERT
|
||||
values_do(assert_value);
|
||||
#endif // ASSERT
|
||||
AssertValues assert_value;
|
||||
values_do(&assert_value);
|
||||
#endif
|
||||
|
||||
// provide an initial guess of signature size.
|
||||
_signature = new BasicTypeList(number_of_arguments() + (has_receiver() ? 1 : 0));
|
||||
|
@ -368,7 +367,7 @@ Invoke::Invoke(Bytecodes::Code code, ValueType* result_type, Value recv, Values*
|
|||
}
|
||||
|
||||
|
||||
void Invoke::state_values_do(void f(Value*)) {
|
||||
void Invoke::state_values_do(ValueVisitor* f) {
|
||||
StateSplit::state_values_do(f);
|
||||
if (state_before() != NULL) state_before()->values_do(f);
|
||||
if (state() != NULL) state()->values_do(f);
|
||||
|
@ -500,30 +499,27 @@ BlockBegin* Constant::compare(Instruction::Condition cond, Value right,
|
|||
}
|
||||
|
||||
|
||||
void Constant::other_values_do(void f(Value*)) {
|
||||
void Constant::other_values_do(ValueVisitor* f) {
|
||||
if (state() != NULL) state()->values_do(f);
|
||||
}
|
||||
|
||||
|
||||
// Implementation of NewArray
|
||||
|
||||
void NewArray::other_values_do(void f(Value*)) {
|
||||
void NewArray::other_values_do(ValueVisitor* f) {
|
||||
if (state_before() != NULL) state_before()->values_do(f);
|
||||
}
|
||||
|
||||
|
||||
// Implementation of TypeCheck
|
||||
|
||||
void TypeCheck::other_values_do(void f(Value*)) {
|
||||
void TypeCheck::other_values_do(ValueVisitor* f) {
|
||||
if (state_before() != NULL) state_before()->values_do(f);
|
||||
}
|
||||
|
||||
|
||||
// Implementation of BlockBegin
|
||||
|
||||
int BlockBegin::_next_block_id = 0;
|
||||
|
||||
|
||||
void BlockBegin::set_end(BlockEnd* end) {
|
||||
assert(end != NULL, "should not reset block end to NULL");
|
||||
BlockEnd* old_end = _end;
|
||||
|
@ -738,7 +734,7 @@ void BlockBegin::iterate_postorder(BlockClosure* closure) {
|
|||
}
|
||||
|
||||
|
||||
void BlockBegin::block_values_do(void f(Value*)) {
|
||||
void BlockBegin::block_values_do(ValueVisitor* f) {
|
||||
for (Instruction* n = this; n != NULL; n = n->next()) n->values_do(f);
|
||||
}
|
||||
|
||||
|
@ -930,7 +926,7 @@ void BlockList::blocks_do(void f(BlockBegin*)) {
|
|||
}
|
||||
|
||||
|
||||
void BlockList::values_do(void f(Value*)) {
|
||||
void BlockList::values_do(ValueVisitor* f) {
|
||||
for (int i = length() - 1; i >= 0; i--) at(i)->block_values_do(f);
|
||||
}
|
||||
|
||||
|
@ -973,7 +969,7 @@ void BlockEnd::substitute_sux(BlockBegin* old_sux, BlockBegin* new_sux) {
|
|||
}
|
||||
|
||||
|
||||
void BlockEnd::other_values_do(void f(Value*)) {
|
||||
void BlockEnd::other_values_do(ValueVisitor* f) {
|
||||
if (state_before() != NULL) state_before()->values_do(f);
|
||||
}
|
||||
|
||||
|
@ -1012,6 +1008,6 @@ int Phi::operand_count() const {
|
|||
|
||||
// Implementation of Throw
|
||||
|
||||
void Throw::state_values_do(void f(Value*)) {
|
||||
void Throw::state_values_do(ValueVisitor* f) {
|
||||
BlockEnd::state_values_do(f);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue