Mercurial > hg > graal-compiler
comparison src/share/vm/c1/c1_GraphBuilder.cpp @ 14704:b51e29501f30
Merged with jdk9/dev/hotspot changeset 9486a41de3b7
author | twisti |
---|---|
date | Tue, 18 Mar 2014 20:19:10 -0700 |
parents | d8041d695d19 1179450ad3ee |
children | 92aa6797d639 |
comparison
equal
deleted
inserted
replaced
14647:8f483e200405 | 14704:b51e29501f30 |
---|---|
1434 call_register_finalizer(); | 1434 call_register_finalizer(); |
1435 } | 1435 } |
1436 | 1436 |
1437 bool need_mem_bar = false; | 1437 bool need_mem_bar = false; |
1438 if (method()->name() == ciSymbol::object_initializer_name() && | 1438 if (method()->name() == ciSymbol::object_initializer_name() && |
1439 scope()->wrote_final()) { | 1439 (scope()->wrote_final() || (AlwaysSafeConstructors && scope()->wrote_fields()))) { |
1440 need_mem_bar = true; | 1440 need_mem_bar = true; |
1441 } | 1441 } |
1442 | 1442 |
1443 // Check to see whether we are inlining. If so, Return | 1443 // Check to see whether we are inlining. If so, Return |
1444 // instructions become Gotos to the continuation point. | 1444 // instructions become Gotos to the continuation point. |
1546 } | 1546 } |
1547 } | 1547 } |
1548 | 1548 |
1549 if (field->is_final() && (code == Bytecodes::_putfield)) { | 1549 if (field->is_final() && (code == Bytecodes::_putfield)) { |
1550 scope()->set_wrote_final(); | 1550 scope()->set_wrote_final(); |
1551 } | |
1552 | |
1553 if (code == Bytecodes::_putfield) { | |
1554 scope()->set_wrote_fields(); | |
1551 } | 1555 } |
1552 | 1556 |
1553 const int offset = !needs_patching ? field->offset() : -1; | 1557 const int offset = !needs_patching ? field->offset() : -1; |
1554 switch (code) { | 1558 switch (code) { |
1555 case Bytecodes::_getstatic: { | 1559 case Bytecodes::_getstatic: { |
3767 if (is_profiling() && !callee->ensure_method_data()) { | 3771 if (is_profiling() && !callee->ensure_method_data()) { |
3768 INLINE_BAILOUT("mdo allocation failed"); | 3772 INLINE_BAILOUT("mdo allocation failed"); |
3769 } | 3773 } |
3770 | 3774 |
3771 // now perform tests that are based on flag settings | 3775 // now perform tests that are based on flag settings |
3772 if (callee->force_inline()) { | 3776 if (callee->force_inline() || callee->should_inline()) { |
3773 if (inline_level() > MaxForceInlineLevel) INLINE_BAILOUT("MaxForceInlineLevel"); | 3777 if (inline_level() > MaxForceInlineLevel ) INLINE_BAILOUT("MaxForceInlineLevel"); |
3774 print_inlining(callee, "force inline by annotation"); | 3778 if (recursive_inline_level(callee) > MaxRecursiveInlineLevel) INLINE_BAILOUT("recursive inlining too deep"); |
3775 } else if (callee->should_inline()) { | 3779 |
3776 print_inlining(callee, "force inline by CompileOracle"); | 3780 const char* msg = ""; |
3781 if (callee->force_inline()) msg = "force inline by annotation"; | |
3782 if (callee->should_inline()) msg = "force inline by CompileOracle"; | |
3783 print_inlining(callee, msg); | |
3777 } else { | 3784 } else { |
3778 // use heuristic controls on inlining | 3785 // use heuristic controls on inlining |
3779 if (inline_level() > MaxInlineLevel ) INLINE_BAILOUT("inlining too deep"); | 3786 if (inline_level() > MaxInlineLevel ) INLINE_BAILOUT("inlining too deep"); |
3780 if (recursive_inline_level(callee) > MaxRecursiveInlineLevel) INLINE_BAILOUT("recursive inlining too deep"); | 3787 if (recursive_inline_level(callee) > MaxRecursiveInlineLevel) INLINE_BAILOUT("recursive inlining too deep"); |
3781 if (callee->code_size_for_inlining() > max_inline_size() ) INLINE_BAILOUT("callee is too large"); | 3788 if (callee->code_size_for_inlining() > max_inline_size() ) INLINE_BAILOUT("callee is too large"); |