JDK-6666343 : Compile::has_loops not always set correctly
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2008-02-21
  • Updated: 2011-04-20
  • Resolved: 2011-04-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 Other
6u14Fixed hs12Fixed
C2 estimates of whether a compile has loops by calling has_loops() on the root of the compile but not on any inlinees.  This means that inlining something with loops into something without loops might result in loop opts not being run.  Sometimes it will be run anyway because we have split_ifs but it certainly should take inlinees into account.

SUGGESTED FIX repo: /net/jano2.sfbay/export2/hotspot/hg/hotspot-comp.clean changeset: 50:16e1cb7cde24 user: never date: Tue Mar 18 11:17:37 2008 -0700 description: 6666343: Compile::has_loops not always set correctly Summary: Compile::has_loops() should be set from inlined methods Reviewed-by: kvn, rasbold files: src/share/vm/opto/doCall.cpp

EVALUATION inlining should accumulate the has_loop flag.

SUGGESTED FIX diff -r a61af66fc99e src/share/vm/opto/doCall.cpp --- a/src/share/vm/opto/doCall.cpp Sat Dec 01 00:00:00 2007 +0000 +++ b/src/share/vm/opto/doCall.cpp Thu Feb 21 14:46:17 2008 -0800 @@ -390,6 +390,8 @@ void Parse::do_call() { } if (cg->is_inline()) { + // Accumulate has_loops estimate + C->set_has_loops(C->has_loops() || call_method->has_loops()); C->env()->notice_inlined_method(call_method); }