callGenerator.cpp revision 3711
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * This code is free software; you can redistribute it and/or modify it
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * under the terms of the GNU General Public License version 2 only, as
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * published by the Free Software Foundation.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * This code is distributed in the hope that it will be useful, but WITHOUT
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * version 2 for more details (a copy is included in the LICENSE file that
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * accompanied this code).
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * You should have received a copy of the GNU General Public License version
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * 2 along with this work; if not, write to the Free Software Foundation,
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * or visit www.oracle.com if you need additional information or have any
4edb61f8b0f8ce9f62d803c706612376498672b4al_xipe * questions.
#include "opto/cfgnode.hpp"
#include "opto/connode.hpp"
#include "opto/rootnode.hpp"
#include "opto/runtime.hpp"
#include "opto/subnode.hpp"
bool _is_osr;
float _expected_uses;
virtual bool is_parse() const { return true; }
if (is_osr()) {
if (C->failing()) {
// Grab signature for matching/allocation
#ifdef ASSERT
if (C->failing()) {
return NULL;
bool _separate_io_proj;
CallStaticJavaNode *call = new (kit.C, tf()->domain()->cnt()) CallStaticJavaNode(tf(), target, method(), kit.bci());
if (!is_static) {
Node* call_site = kit.make_load(kit.control(), call_site_adr, TypeInstPtr::BOTTOM, T_OBJECT, Compile::AliasIdxRaw);
Node* target_mh_adr = kit.basic_plus_adr(call_site, call_site, java_lang_invoke_CallSite::target_offset_in_bytes());
CallStaticJavaNode *call = new (kit.C, tf()->domain()->cnt()) CallStaticJavaNode(tf(), resolve_stub, method(), kit.bci());
int _vtable_index;
virtual bool is_virtual() const { return true; }
CallDynamicJavaNode *call = new (kit.C, tf()->domain()->cnt()) CallDynamicJavaNode(tf(), target, method(), _vtable_index, kit.bci());
return new DynamicCallGenerator(m);
virtual bool is_late_inline() const { return true; }
virtual void do_late_inline();
if (nargs > 0) {
while (p != NULL) {
p = p->caller();
if (C->failing()) return;
virtual bool is_deferred() const { return true; }
if (m->is_CallJava()) {
#ifndef PRODUCT
return jvms;
float _hit_prob;
virtual bool is_virtual() const { return true; }
float hit_prob) {
if (i == tos) {
if( i >= limit ) break;
float _hit_prob;
float hit_prob)
float hit_prob) {
assert(callee->is_method_handle_invoke() || callee->is_method_handle_adapter(), "for_method_handle_call mismatch");
CallGenerator* cg = CallGenerator::for_method_handle_inline(method_handle, jvms, caller, callee, profile);
return cg;
CallGenerator* cg = Compile::current()->call_generator(target_method, -1, false, jvms, true, PROB_ALWAYS);
return cg;
CallGenerator* cg1 = for_method_handle_call(method_handle->in(1), jvms, caller, callee, profile.rescale(1.0 - prob));
CallGenerator* cg2 = for_method_handle_call(method_handle->in(2), jvms, caller, callee, profile.rescale(prob));
return NULL;
CallGenerator* CallGenerator::for_invokedynamic_call(JVMState* jvms, ciMethod* caller, ciMethod* callee, ciCallProfile profile) {
assert(callee->is_method_handle_invoke() || callee->is_method_handle_adapter(), "for_invokedynamic_call mismatch");
CallGenerator* cg = CallGenerator::for_invokedynamic_inline(call_site, jvms, caller, callee, profile);
return cg;
return cg;
return NULL;
const TypeOopPtr* predicted_mh_ptr = TypeOopPtr::make_from_constant(_predicted_method_handle, true);
Node* call_site = kit.make_load(kit.control(), call_site_adr, TypeInstPtr::BOTTOM, T_OBJECT, Compile::AliasIdxRaw);
Node* target_adr = kit.basic_plus_adr(call_site, call_site, java_lang_invoke_CallSite::target_offset_in_bytes());
if (i == tos) {
if( i >= limit ) break;
: CallGenerator(m)
virtual bool is_trap() const { return true; }
bool keep_exact_action = true;
void WarmCallInfo::init(JVMState* call_site, ciMethod* call_method, ciCallProfile& profile, float prof_factor) {
float size_factor;
head = this;
return head;
while (next_p != this) {
return head;
return &_always_hot;
return &_always_cold;
#ifndef PRODUCT
p->print();
int cnt = 0;
cnt++;
return cnt;