public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/16451] New: [3.5 regression] Class Initialisation Check Optimisation Lost With Tree-SSA
@ 2004-07-09 13:42 rmathew at gcc dot gnu dot org
  2004-07-09 13:55 ` [Bug java/16451] " rmathew at gcc dot gnu dot org
  2004-07-09 16:51 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: rmathew at gcc dot gnu dot org @ 2004-07-09 13:42 UTC (permalink / raw)
  To: java-prs

Post tree-ssa merge, we lost the little hack that 
implemented this class initialisation optimisation:

  http://gcc.gnu.org/ml/java/1999-q3/msg00124.html

Moreover, emit_init_test_initialization() which implemented
it was removed by this patch:

  http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00743.html

We need to restore the same hack (or something that
achieves the same optimisation) using trees.

The body of the said function looked like this before
it was removed:

-/* Called for every element in DECL_FUNCTION_INIT_TEST_TABLE of a
-   method in order to emit initialization code for each test flag.  */
-
-static int
-emit_init_test_initialization (void **entry, void *x ATTRIBUTE_UNUSED)
-{
-  struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry;
-  tree klass = build_class_ref (ite->key);
-  tree rhs;
-
-  /* If the DECL_INITIAL of the test flag is set to true, it
-     means that the class is already initialized the time it
-     is in use. */
-  if (DECL_INITIAL (ite->value) == boolean_true_node)
-    rhs = boolean_true_node;
-  /* Otherwise, we initialize the class init check variable by looking
-     at the `state' field of the class to see if it is already
-     initialized.  This makes things a bit faster if the class is
-     already initialized, which should be the common case.  */
-  else
-    rhs = build (GE_EXPR, boolean_type_node,
-		 build (COMPONENT_REF, byte_type_node,
-			build1 (INDIRECT_REF, class_type_node, klass),
-			lookup_field (&class_type_node,
-				      get_identifier ("state")),
-			NULL_TREE),
-		 build_int_2 (JV_STATE_DONE, 0));
-
-  expand_expr_stmt (build (MODIFY_EXPR, boolean_type_node, 
-			   ite->value, rhs));
-  return true;
-}
-

-- 
           Summary: [3.5 regression] Class Initialisation Check Optimisation
                    Lost With Tree-SSA
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rmathew at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16451


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug java/16451] [3.5 regression] Class Initialisation Check Optimisation Lost With Tree-SSA
  2004-07-09 13:42 [Bug java/16451] New: [3.5 regression] Class Initialisation Check Optimisation Lost With Tree-SSA rmathew at gcc dot gnu dot org
@ 2004-07-09 13:55 ` rmathew at gcc dot gnu dot org
  2004-07-09 16:51 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: rmathew at gcc dot gnu dot org @ 2004-07-09 13:55 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From rmathew at gcc dot gnu dot org  2004-07-09 13:55 -------
The original patch by Anthony Green that implemented this hack 
is here:

  http://gcc.gnu.org/ml/gcc-patches/2000-02/msg00621.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-07-09 13:55:10
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16451


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug java/16451] [3.5 regression] Class Initialisation Check Optimisation Lost With Tree-SSA
  2004-07-09 13:42 [Bug java/16451] New: [3.5 regression] Class Initialisation Check Optimisation Lost With Tree-SSA rmathew at gcc dot gnu dot org
  2004-07-09 13:55 ` [Bug java/16451] " rmathew at gcc dot gnu dot org
@ 2004-07-09 16:51 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-09 16:51 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-09 16:51 -------
This is a dup of bug 15576.

*** This bug has been marked as a duplicate of 15576 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16451


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-07-09 16:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-09 13:42 [Bug java/16451] New: [3.5 regression] Class Initialisation Check Optimisation Lost With Tree-SSA rmathew at gcc dot gnu dot org
2004-07-09 13:55 ` [Bug java/16451] " rmathew at gcc dot gnu dot org
2004-07-09 16:51 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).