8330159: [C2] Remove or clarify Compile::init_start

Reviewed-by: chagedorn, dlong
This commit is contained in:
nelanbu 2024-09-06 06:44:54 +00:00 committed by Christian Hagedorn
parent 9e0ccb8bbd
commit 7db4d46c39
3 changed files with 9 additions and 10 deletions

View File

@ -754,14 +754,14 @@ Compile::Compile( ciEnv* ci_env, ciMethod* target, int osr_bci,
init_tf(TypeFunc::make(domain, range));
StartNode* s = new StartOSRNode(root(), domain);
initial_gvn()->set_type_bottom(s);
init_start(s);
verify_start(s);
cg = CallGenerator::for_osr(method(), entry_bci());
} else {
// Normal case.
init_tf(TypeFunc::make(method()));
StartNode* s = new StartNode(root(), tf()->domain());
initial_gvn()->set_type_bottom(s);
init_start(s);
verify_start(s);
if (method()->intrinsic_id() == vmIntrinsics::_Reference_get) {
// With java.lang.ref.reference.get() we must go through the
// intrinsic - even when get() is the root
@ -1105,13 +1105,12 @@ void Compile::Init(bool aliasing) {
probe_alias_cache(nullptr)->_index = AliasIdxTop;
}
//---------------------------init_start----------------------------------------
// Install the StartNode on this compile object.
void Compile::init_start(StartNode* s) {
if (failing())
return; // already failing
assert(s == start(), "");
#ifdef ASSERT
// Verify that the current StartNode is valid.
void Compile::verify_start(StartNode* s) const {
assert(failing() || s == start(), "should be StartNode");
}
#endif
/**
* Return the 'StartNode'. We must not have a pending failure, since the ideal graph

View File

@ -864,7 +864,7 @@ private:
RootNode* root() const { return _root; }
void set_root(RootNode* r) { _root = r; }
StartNode* start() const; // (Derived from root.)
void init_start(StartNode* s);
void verify_start(StartNode* s) const NOT_DEBUG_RETURN;
Node* immutable_memory();
Node* recent_alloc_ctl() const { return _recent_alloc_ctl; }

View File

@ -261,7 +261,7 @@ void GraphKit::gen_stub(address C_function,
frameptr(),
returnadr());
root()->add_req(_gvn.transform(to_exc)); // bind to root to keep live
C->init_start(start);
C->verify_start(start);
//-----------------------------
// If this is a normal subroutine return, issue the return and be done.