Mercurial > hg > graal-jvmci-8
comparison src/share/vm/c1/c1_Optimizer.cpp @ 6853:d804e148cff8
Merge
author | kvn |
---|---|
date | Fri, 12 Oct 2012 09:22:52 -0700 |
parents | b9a9ed0f8eeb c3e799c37717 |
children | 46f6f063b272 |
comparison
equal
deleted
inserted
replaced
6842:b9a9ed0f8eeb | 6853:d804e148cff8 |
---|---|
27 #include "c1/c1_Optimizer.hpp" | 27 #include "c1/c1_Optimizer.hpp" |
28 #include "c1/c1_ValueMap.hpp" | 28 #include "c1/c1_ValueMap.hpp" |
29 #include "c1/c1_ValueSet.hpp" | 29 #include "c1/c1_ValueSet.hpp" |
30 #include "c1/c1_ValueStack.hpp" | 30 #include "c1/c1_ValueStack.hpp" |
31 #include "utilities/bitMap.inline.hpp" | 31 #include "utilities/bitMap.inline.hpp" |
32 #include "compiler/compileLog.hpp" | |
32 | 33 |
33 define_array(ValueSetArray, ValueSet*); | 34 define_array(ValueSetArray, ValueSet*); |
34 define_stack(ValueSetList, ValueSetArray); | 35 define_stack(ValueSetList, ValueSetArray); |
35 | 36 |
36 | 37 |
52 _hir->iterate_preorder(this); | 53 _hir->iterate_preorder(this); |
53 if (_has_substitution) { | 54 if (_has_substitution) { |
54 // substituted some ifops/phis, so resolve the substitution | 55 // substituted some ifops/phis, so resolve the substitution |
55 SubstitutionResolver sr(_hir); | 56 SubstitutionResolver sr(_hir); |
56 } | 57 } |
57 } | 58 |
59 CompileLog* log = _hir->compilation()->log(); | |
60 if (log != NULL) | |
61 log->set_context("optimize name='cee'"); | |
62 } | |
63 | |
64 ~CE_Eliminator() { | |
65 CompileLog* log = _hir->compilation()->log(); | |
66 if (log != NULL) | |
67 log->clear_context(); // skip marker if nothing was printed | |
68 } | |
69 | |
58 int cee_count() const { return _cee_count; } | 70 int cee_count() const { return _cee_count; } |
59 int ifop_count() const { return _ifop_count; } | 71 int ifop_count() const { return _ifop_count; } |
60 | 72 |
61 void adjust_exception_edges(BlockBegin* block, BlockBegin* sux) { | 73 void adjust_exception_edges(BlockBegin* block, BlockBegin* sux) { |
62 int e = sux->number_of_exception_handlers(); | 74 int e = sux->number_of_exception_handlers(); |
304 BlockMerger(IR* hir) | 316 BlockMerger(IR* hir) |
305 : _hir(hir) | 317 : _hir(hir) |
306 , _merge_count(0) | 318 , _merge_count(0) |
307 { | 319 { |
308 _hir->iterate_preorder(this); | 320 _hir->iterate_preorder(this); |
321 CompileLog* log = _hir->compilation()->log(); | |
322 if (log != NULL) | |
323 log->set_context("optimize name='eliminate_blocks'"); | |
324 } | |
325 | |
326 ~BlockMerger() { | |
327 CompileLog* log = _hir->compilation()->log(); | |
328 if (log != NULL) | |
329 log->clear_context(); // skip marker if nothing was printed | |
309 } | 330 } |
310 | 331 |
311 bool try_merge(BlockBegin* block) { | 332 bool try_merge(BlockBegin* block) { |
312 BlockEnd* end = block->end(); | 333 BlockEnd* end = block->end(); |
313 if (end->as_Goto() != NULL) { | 334 if (end->as_Goto() != NULL) { |
572 , _last_explicit_null_check(NULL) | 593 , _last_explicit_null_check(NULL) |
573 , _block_states(BlockBegin::number_of_blocks(), NULL) | 594 , _block_states(BlockBegin::number_of_blocks(), NULL) |
574 , _work_list(new BlockList()) { | 595 , _work_list(new BlockList()) { |
575 _visitable_instructions = new ValueSet(); | 596 _visitable_instructions = new ValueSet(); |
576 _visitor.set_eliminator(this); | 597 _visitor.set_eliminator(this); |
598 CompileLog* log = _opt->ir()->compilation()->log(); | |
599 if (log != NULL) | |
600 log->set_context("optimize name='null_check_elimination'"); | |
601 } | |
602 | |
603 ~NullCheckEliminator() { | |
604 CompileLog* log = _opt->ir()->compilation()->log(); | |
605 if (log != NULL) | |
606 log->clear_context(); // skip marker if nothing was printed | |
577 } | 607 } |
578 | 608 |
579 Optimizer* opt() { return _opt; } | 609 Optimizer* opt() { return _opt; } |
580 IR* ir () { return opt()->ir(); } | 610 IR* ir () { return opt()->ir(); } |
581 | 611 |