6958292: C1: Enable parallel compilation

Enable parallel compilation in C1

Reviewed-by: never, kvn
This commit is contained in:
Igor Veresov 2010-06-04 11:18:04 -07:00
parent 36f8c82970
commit 00b75f8353
30 changed files with 328 additions and 344 deletions

View file

@ -26,9 +26,11 @@
#include "incls/_c1_Canonicalizer.cpp.incl"
static void do_print_value(Value* vp) {
(*vp)->print_line();
}
class PrintValueVisitor: public ValueVisitor {
void visit(Value* vp) {
(*vp)->print_line();
}
};
void Canonicalizer::set_canonical(Value x) {
assert(x != NULL, "value must exist");
@ -37,10 +39,11 @@ void Canonicalizer::set_canonical(Value x) {
// in the instructions).
if (canonical() != x) {
if (PrintCanonicalization) {
canonical()->input_values_do(do_print_value);
PrintValueVisitor do_print_value;
canonical()->input_values_do(&do_print_value);
canonical()->print_line();
tty->print_cr("canonicalized to:");
x->input_values_do(do_print_value);
x->input_values_do(&do_print_value);
x->print_line();
tty->cr();
}
@ -202,7 +205,7 @@ void Canonicalizer::do_StoreField (StoreField* x) {
// limit this optimization to current block
if (value != NULL && in_current_block(conv)) {
set_canonical(new StoreField(x->obj(), x->offset(), x->field(), value, x->is_static(),
x->lock_stack(), x->state_before(), x->is_loaded(), x->is_initialized()));
x->lock_stack(), x->state_before(), x->is_loaded(), x->is_initialized()));
return;
}
}