mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
6976186: integrate Shark HotSpot changes
Shark is a JIT compiler for Zero that uses the LLVM compiler infrastructure. Reviewed-by: kvn, twisti
This commit is contained in:
parent
c9ac8cc788
commit
d7310fb0f7
67 changed files with 12200 additions and 40 deletions
|
@ -55,10 +55,10 @@ ciMethod::ciMethod(methodHandle h_m) : ciObject(h_m) {
|
|||
_exception_handlers = NULL;
|
||||
_liveness = NULL;
|
||||
_method_blocks = NULL;
|
||||
#ifdef COMPILER2
|
||||
#if defined(COMPILER2) || defined(SHARK)
|
||||
_flow = NULL;
|
||||
_bcea = NULL;
|
||||
#endif // COMPILER2
|
||||
#endif // COMPILER2 || SHARK
|
||||
|
||||
ciEnv *env = CURRENT_ENV;
|
||||
if (env->jvmti_can_hotswap_or_post_breakpoint() && _is_compilable) {
|
||||
|
@ -123,10 +123,10 @@ ciMethod::ciMethod(ciInstanceKlass* holder,
|
|||
_can_be_statically_bound = false;
|
||||
_method_blocks = NULL;
|
||||
_method_data = NULL;
|
||||
#ifdef COMPILER2
|
||||
#if defined(COMPILER2) || defined(SHARK)
|
||||
_flow = NULL;
|
||||
_bcea = NULL;
|
||||
#endif // COMPILER2
|
||||
#endif // COMPILER2 || SHARK
|
||||
}
|
||||
|
||||
|
||||
|
@ -229,6 +229,20 @@ int ciMethod::vtable_index() {
|
|||
}
|
||||
|
||||
|
||||
#ifdef SHARK
|
||||
// ------------------------------------------------------------------
|
||||
// ciMethod::itable_index
|
||||
//
|
||||
// Get the position of this method's entry in the itable, if any.
|
||||
int ciMethod::itable_index() {
|
||||
check_is_loaded();
|
||||
assert(holder()->is_linked(), "must be linked");
|
||||
VM_ENTRY_MARK;
|
||||
return klassItable::compute_itable_index(get_methodOop());
|
||||
}
|
||||
#endif // SHARK
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ciMethod::native_entry
|
||||
//
|
||||
|
@ -294,34 +308,34 @@ bool ciMethod::has_balanced_monitors() {
|
|||
// ------------------------------------------------------------------
|
||||
// ciMethod::get_flow_analysis
|
||||
ciTypeFlow* ciMethod::get_flow_analysis() {
|
||||
#ifdef COMPILER2
|
||||
#if defined(COMPILER2) || defined(SHARK)
|
||||
if (_flow == NULL) {
|
||||
ciEnv* env = CURRENT_ENV;
|
||||
_flow = new (env->arena()) ciTypeFlow(env, this);
|
||||
_flow->do_flow();
|
||||
}
|
||||
return _flow;
|
||||
#else // COMPILER2
|
||||
#else // COMPILER2 || SHARK
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
#endif // COMPILER2
|
||||
#endif // COMPILER2 || SHARK
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// ciMethod::get_osr_flow_analysis
|
||||
ciTypeFlow* ciMethod::get_osr_flow_analysis(int osr_bci) {
|
||||
#ifdef COMPILER2
|
||||
#if defined(COMPILER2) || defined(SHARK)
|
||||
// OSR entry points are always place after a call bytecode of some sort
|
||||
assert(osr_bci >= 0, "must supply valid OSR entry point");
|
||||
ciEnv* env = CURRENT_ENV;
|
||||
ciTypeFlow* flow = new (env->arena()) ciTypeFlow(env, this, osr_bci);
|
||||
flow->do_flow();
|
||||
return flow;
|
||||
#else // COMPILER2
|
||||
#else // COMPILER2 || SHARK
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
#endif // COMPILER2
|
||||
#endif // COMPILER2 || SHARK
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue