equal
deleted
inserted
replaced
83 // Simple methods are as good being compiled with C1 as C2. |
83 // Simple methods are as good being compiled with C1 as C2. |
84 // Determine if a given method is such a case. |
84 // Determine if a given method is such a case. |
85 bool TieredThresholdPolicy::is_trivial(Method* method) { |
85 bool TieredThresholdPolicy::is_trivial(Method* method) { |
86 if (method->is_accessor() || |
86 if (method->is_accessor() || |
87 method->is_constant_getter()) { |
87 method->is_constant_getter()) { |
88 return true; |
|
89 } |
|
90 #if INCLUDE_JVMCI |
|
91 if (UseJVMCICompiler) { |
|
92 AbstractCompiler* comp = CompileBroker::compiler(CompLevel_full_optimization); |
|
93 if (TieredCompilation && comp != NULL && comp->is_trivial(method)) { |
|
94 return true; |
|
95 } |
|
96 } |
|
97 #endif |
|
98 if (method->has_loops() || method->code_size() >= 15) { |
|
99 return false; |
|
100 } |
|
101 MethodData* mdo = method->method_data(); |
|
102 if (mdo != NULL && !mdo->would_profile() && |
|
103 (method->code_size() < 5 || (mdo->num_blocks() < 4))) { |
|
104 return true; |
88 return true; |
105 } |
89 } |
106 return false; |
90 return false; |
107 } |
91 } |
108 |
92 |