1.1 --- a/src/share/vm/c1/c1_Optimizer.cpp Tue Oct 09 10:09:34 2012 -0700 1.2 +++ b/src/share/vm/c1/c1_Optimizer.cpp Fri Oct 12 09:22:52 2012 -0700 1.3 @@ -29,6 +29,7 @@ 1.4 #include "c1/c1_ValueSet.hpp" 1.5 #include "c1/c1_ValueStack.hpp" 1.6 #include "utilities/bitMap.inline.hpp" 1.7 +#include "compiler/compileLog.hpp" 1.8 1.9 define_array(ValueSetArray, ValueSet*); 1.10 define_stack(ValueSetList, ValueSetArray); 1.11 @@ -54,7 +55,18 @@ 1.12 // substituted some ifops/phis, so resolve the substitution 1.13 SubstitutionResolver sr(_hir); 1.14 } 1.15 + 1.16 + CompileLog* log = _hir->compilation()->log(); 1.17 + if (log != NULL) 1.18 + log->set_context("optimize name='cee'"); 1.19 } 1.20 + 1.21 + ~CE_Eliminator() { 1.22 + CompileLog* log = _hir->compilation()->log(); 1.23 + if (log != NULL) 1.24 + log->clear_context(); // skip marker if nothing was printed 1.25 + } 1.26 + 1.27 int cee_count() const { return _cee_count; } 1.28 int ifop_count() const { return _ifop_count; } 1.29 1.30 @@ -306,6 +318,15 @@ 1.31 , _merge_count(0) 1.32 { 1.33 _hir->iterate_preorder(this); 1.34 + CompileLog* log = _hir->compilation()->log(); 1.35 + if (log != NULL) 1.36 + log->set_context("optimize name='eliminate_blocks'"); 1.37 + } 1.38 + 1.39 + ~BlockMerger() { 1.40 + CompileLog* log = _hir->compilation()->log(); 1.41 + if (log != NULL) 1.42 + log->clear_context(); // skip marker if nothing was printed 1.43 } 1.44 1.45 bool try_merge(BlockBegin* block) { 1.46 @@ -574,6 +595,15 @@ 1.47 , _work_list(new BlockList()) { 1.48 _visitable_instructions = new ValueSet(); 1.49 _visitor.set_eliminator(this); 1.50 + CompileLog* log = _opt->ir()->compilation()->log(); 1.51 + if (log != NULL) 1.52 + log->set_context("optimize name='null_check_elimination'"); 1.53 + } 1.54 + 1.55 + ~NullCheckEliminator() { 1.56 + CompileLog* log = _opt->ir()->compilation()->log(); 1.57 + if (log != NULL) 1.58 + log->clear_context(); // skip marker if nothing was printed 1.59 } 1.60 1.61 Optimizer* opt() { return _opt; }