8024070: C2 needs some form of type speculation

Record unused type profile information with type system, propagate and use it.

Reviewed-by: kvn, twisti
This commit is contained in:
Roland Westrelin 2013-10-23 12:40:23 +02:00
parent ceb177b16f
commit 1b5bd82335
22 changed files with 1429 additions and 144 deletions

View file

@ -117,6 +117,10 @@ class ciMethod : public ciMetadata {
*bcp = code;
}
// Check bytecode and profile data collected are compatible
void assert_virtual_call_type_ok(int bci);
void assert_call_type_ok(int bci);
public:
// Basic method information.
ciFlags flags() const { check_is_loaded(); return _flags; }
@ -230,6 +234,11 @@ class ciMethod : public ciMetadata {
ciCallProfile call_profile_at_bci(int bci);
int interpreter_call_site_count(int bci);
// Does type profiling provide a useful type at this point?
ciKlass* argument_profiled_type(int bci, int i);
ciKlass* parameter_profiled_type(int i);
ciKlass* return_profiled_type(int bci);
ciField* get_field_at_bci( int bci, bool &will_link);
ciMethod* get_method_at_bci(int bci, bool &will_link, ciSignature* *declared_signature);