comparison src/share/vm/opto/parseHelper.cpp @ 10408:836a62f43af9

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Wed, 19 Jun 2013 10:45:56 +0200
parents 6f3fd5150b67
children c775af091fe9
comparison
equal deleted inserted replaced
10086:e0fb8a213650 10408:836a62f43af9
1 /* 1 /*
2 * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
282 if (OptimizeStringConcat && 282 if (OptimizeStringConcat &&
283 (klass == C->env()->StringBuilder_klass() || 283 (klass == C->env()->StringBuilder_klass() ||
284 klass == C->env()->StringBuffer_klass())) { 284 klass == C->env()->StringBuffer_klass())) {
285 C->set_has_stringbuilder(true); 285 C->set_has_stringbuilder(true);
286 } 286 }
287
288 // Keep track of boxed values for EliminateAutoBox optimizations.
289 if (C->eliminate_boxing() && klass->is_box_klass()) {
290 C->set_has_boxed_value(true);
291 }
287 } 292 }
288 293
289 #ifndef PRODUCT 294 #ifndef PRODUCT
290 //------------------------------dump_map_adr_mem------------------------------- 295 //------------------------------dump_map_adr_mem-------------------------------
291 // Debug dump of the mapping from address types to MergeMemNode indices. 296 // Debug dump of the mapping from address types to MergeMemNode indices.
335 //----------------------increment_and_test_invocation_counter------------------- 340 //----------------------increment_and_test_invocation_counter-------------------
336 void Parse::increment_and_test_invocation_counter(int limit) { 341 void Parse::increment_and_test_invocation_counter(int limit) {
337 if (!count_invocations()) return; 342 if (!count_invocations()) return;
338 343
339 // Get the Method* node. 344 // Get the Method* node.
340 const TypePtr* adr_type = TypeMetadataPtr::make(method()); 345 ciMethod* m = method();
341 Node *method_node = makecon(adr_type); 346 address counters_adr = m->ensure_method_counters();
342 347
343 // Load the interpreter_invocation_counter from the Method*. 348 Node* ctrl = control();
344 int offset = Method::interpreter_invocation_counter_offset_in_bytes(); 349 const TypePtr* adr_type = TypeRawPtr::make(counters_adr);
345 Node* adr_node = basic_plus_adr(method_node, method_node, offset); 350 Node *counters_node = makecon(adr_type);
346 Node* cnt = make_load(NULL, adr_node, TypeInt::INT, T_INT, adr_type); 351 Node* adr_iic_node = basic_plus_adr(counters_node, counters_node,
352 MethodCounters::interpreter_invocation_counter_offset_in_bytes());
353 Node* cnt = make_load(ctrl, adr_iic_node, TypeInt::INT, T_INT, adr_type);
347 354
348 test_counter_against_threshold(cnt, limit); 355 test_counter_against_threshold(cnt, limit);
349 356
350 // Add one to the counter and store 357 // Add one to the counter and store
351 Node* incr = _gvn.transform(new (C) AddINode(cnt, _gvn.intcon(1))); 358 Node* incr = _gvn.transform(new (C) AddINode(cnt, _gvn.intcon(1)));
352 store_to_memory( NULL, adr_node, incr, T_INT, adr_type ); 359 store_to_memory( ctrl, adr_iic_node, incr, T_INT, adr_type );
353 } 360 }
354 361
355 //----------------------------method_data_addressing--------------------------- 362 //----------------------------method_data_addressing---------------------------
356 Node* Parse::method_data_addressing(ciMethodData* md, ciProfileData* data, ByteSize counter_offset, Node* idx, uint stride) { 363 Node* Parse::method_data_addressing(ciMethodData* md, ciProfileData* data, ByteSize counter_offset, Node* idx, uint stride) {
357 // Get offset within MethodData* of the data array 364 // Get offset within MethodData* of the data array