Mercurial > hg > truffle
comparison src/share/vm/c1/c1_GraphBuilder.cpp @ 3791:2c359f27615c
7057120: Tiered: Allow C1 to inline methods with loops
Summary: Recompile the enclosing methods without inlining of the method that has OSRed to level 4 or recompile the enclosing method at level 4.
Reviewed-by: kvn, never
author | iveresov |
---|---|
date | Fri, 01 Jul 2011 10:37:37 -0700 |
parents | 5d046bf49ce7 |
children | ce3e1d4dc416 |
comparison
equal
deleted
inserted
replaced
3790:6f6e91603a45 | 3791:2c359f27615c |
---|---|
31 #include "ci/ciField.hpp" | 31 #include "ci/ciField.hpp" |
32 #include "ci/ciKlass.hpp" | 32 #include "ci/ciKlass.hpp" |
33 #include "compiler/compileBroker.hpp" | 33 #include "compiler/compileBroker.hpp" |
34 #include "interpreter/bytecode.hpp" | 34 #include "interpreter/bytecode.hpp" |
35 #include "runtime/sharedRuntime.hpp" | 35 #include "runtime/sharedRuntime.hpp" |
36 #include "runtime/compilationPolicy.hpp" | |
36 #include "utilities/bitMap.inline.hpp" | 37 #include "utilities/bitMap.inline.hpp" |
37 | 38 |
38 class BlockListBuilder VALUE_OBJ_CLASS_SPEC { | 39 class BlockListBuilder VALUE_OBJ_CLASS_SPEC { |
39 private: | 40 private: |
40 Compilation* _compilation; | 41 Compilation* _compilation; |
3393 } | 3394 } |
3394 | 3395 |
3395 | 3396 |
3396 bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known) { | 3397 bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known) { |
3397 assert(!callee->is_native(), "callee must not be native"); | 3398 assert(!callee->is_native(), "callee must not be native"); |
3398 if (count_backedges() && callee->has_loops()) { | 3399 if (CompilationPolicy::policy()->should_not_inline(compilation()->env(), callee)) { |
3399 INLINE_BAILOUT("too complex for tiered"); | 3400 INLINE_BAILOUT("inlining prohibited by policy"); |
3400 } | 3401 } |
3401 // first perform tests of things it's not possible to inline | 3402 // first perform tests of things it's not possible to inline |
3402 if (callee->has_exception_handlers() && | 3403 if (callee->has_exception_handlers() && |
3403 !InlineMethodsWithExceptionHandlers) INLINE_BAILOUT("callee has exception handlers"); | 3404 !InlineMethodsWithExceptionHandlers) INLINE_BAILOUT("callee has exception handlers"); |
3404 if (callee->is_synchronized() && | 3405 if (callee->is_synchronized() && |