Mercurial > hg > graal-compiler
diff src/share/vm/c1/c1_CFGPrinter.cpp @ 1819:f02a8bbe6ed4
6986046: C1 valuestack cleanup
Summary: fixes an historical oddity in C1 with inlining where all of the expression stacks are kept in the topmost ValueStack instead of being in their respective ValueStacks.
Reviewed-by: never
Contributed-by: Christian Wimmer <cwimmer@uci.edu>
author | roland |
---|---|
date | Tue, 29 Dec 2009 19:08:54 +0100 |
parents | c18cbe5936b8 |
children | f95d63e2154a |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_CFGPrinter.cpp Wed Sep 22 23:51:03 2010 -0700 +++ b/src/share/vm/c1/c1_CFGPrinter.cpp Tue Dec 29 19:08:54 2009 +0100 @@ -174,31 +174,6 @@ int index; Value value; - if (state->stack_size() > 0) { - print_begin("stack"); - print("size %d", state->stack_size()); - - for_each_stack_value(state, index, value) { - ip.print_phi(index, value, block); - print_operand(value); - output()->cr(); - } - - print_end("stack"); - } - - if (state->locks_size() > 0) { - print_begin("locks"); - print("size %d", state->locks_size()); - - for_each_lock_value(state, index, value) { - ip.print_phi(index, value, block); - print_operand(value); - output()->cr(); - } - print_end("locks"); - } - for_each_state(state) { print_begin("locals"); print("size %d", state->locals_size()); @@ -210,6 +185,33 @@ output()->cr(); } print_end("locals"); + + if (state->stack_size() > 0) { + print_begin("stack"); + print("size %d", state->stack_size()); + print("method \"%s\"", method_name(state->scope()->method())); + + for_each_stack_value(state, index, value) { + ip.print_phi(index, value, block); + print_operand(value); + output()->cr(); + } + + print_end("stack"); + } + + if (state->locks_size() > 0) { + print_begin("locks"); + print("size %d", state->locks_size()); + print("method \"%s\"", method_name(state->scope()->method())); + + for_each_lock_value(state, index, value) { + ip.print_phi(index, value, block); + print_operand(value); + output()->cr(); + } + print_end("locks"); + } } print_end("states"); @@ -230,7 +232,8 @@ if (instr->is_pinned()) { output()->put('.'); } - output()->print("%d %d ", instr->bci(), instr->use_count()); + + output()->print("%d %d ", instr->printable_bci(), instr->use_count()); print_operand(instr); @@ -271,7 +274,7 @@ print("name \"B%d\"", block->block_id()); print("from_bci %d", block->bci()); - print("to_bci %d", (block->end() == NULL ? -1 : block->end()->bci())); + print("to_bci %d", (block->end() == NULL ? -1 : block->end()->printable_bci())); output()->indent(); output()->print("predecessors ");