Mercurial > hg > truffle
diff src/share/vm/c1/c1_Canonicalizer.cpp @ 1584:b812ff5abc73
6958292: C1: Enable parallel compilation
Summary: Enable parallel compilation in C1
Reviewed-by: never, kvn
author | iveresov |
---|---|
date | Fri, 04 Jun 2010 11:18:04 -0700 |
parents | c18cbe5936b8 |
children | d5d065957597 |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_Canonicalizer.cpp Thu Jun 03 14:20:27 2010 -0700 +++ b/src/share/vm/c1/c1_Canonicalizer.cpp Fri Jun 04 11:18:04 2010 -0700 @@ -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 @@ // 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 @@ // 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; } }