Mercurial > hg > truffle
diff src/share/vm/c1/c1_Optimizer.cpp @ 6843:c3e799c37717
7177003: C1: LogCompilation support
Summary: add LogCompilation support in C1 - both client and tiered mode.
Reviewed-by: twisti, kvn
author | vlivanov |
---|---|
date | Fri, 05 Oct 2012 18:57:10 -0700 |
parents | 7eca5de9e0b6 |
children | d804e148cff8 |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_Optimizer.cpp Fri Oct 05 13:37:08 2012 -0700 +++ b/src/share/vm/c1/c1_Optimizer.cpp Fri Oct 05 18:57:10 2012 -0700 @@ -29,6 +29,7 @@ #include "c1/c1_ValueSet.hpp" #include "c1/c1_ValueStack.hpp" #include "utilities/bitMap.inline.hpp" +#include "compiler/compileLog.hpp" define_array(ValueSetArray, ValueSet*); define_stack(ValueSetList, ValueSetArray); @@ -54,7 +55,18 @@ // substituted some ifops/phis, so resolve the substitution SubstitutionResolver sr(_hir); } + + CompileLog* log = _hir->compilation()->log(); + if (log != NULL) + log->set_context("optimize name='cee'"); } + + ~CE_Eliminator() { + CompileLog* log = _hir->compilation()->log(); + if (log != NULL) + log->clear_context(); // skip marker if nothing was printed + } + int cee_count() const { return _cee_count; } int ifop_count() const { return _ifop_count; } @@ -306,6 +318,15 @@ , _merge_count(0) { _hir->iterate_preorder(this); + CompileLog* log = _hir->compilation()->log(); + if (log != NULL) + log->set_context("optimize name='eliminate_blocks'"); + } + + ~BlockMerger() { + CompileLog* log = _hir->compilation()->log(); + if (log != NULL) + log->clear_context(); // skip marker if nothing was printed } bool try_merge(BlockBegin* block) { @@ -574,6 +595,15 @@ , _work_list(new BlockList()) { _visitable_instructions = new ValueSet(); _visitor.set_eliminator(this); + CompileLog* log = _opt->ir()->compilation()->log(); + if (log != NULL) + log->set_context("optimize name='null_check_elimination'"); + } + + ~NullCheckEliminator() { + CompileLog* log = _opt->ir()->compilation()->log(); + if (log != NULL) + log->clear_context(); // skip marker if nothing was printed } Optimizer* opt() { return _opt; }