public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/18190] New: [4.0 regression] primitive array optimization is gone
@ 2004-10-28  1:15 tromey at gcc dot gnu dot org
  2004-10-28  1:39 ` [Bug java/18190] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2004-10-28  1:15 UTC (permalink / raw)
  To: java-prs

Sample source:

public class t
{
  public static final int[] x = { 5, 7, 9, 11 };
}

In gcc 3.3 (and 3.4 and earlier than 3.3), this code compiled
to something like:

.LJv0.0:
	.long	_Jv_intVTable
	.long	4
	.long	5
	.long	7
	.long	9
	.long	11

Now we actually emit code for this.

The culprits are a combination of this patch to gcj:

2004-07-08  Richard Henderson  <rth@redhat.com>

	* expr.c (case_identity, get_primitive_array_vtable,
	java_expand_expr, emit_init_test_initialization): Remove.
	* java-tree.h (java_expand_expr): Remove.
	* lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.

and this patch to libgcj (which removed the primitive vtables):

2004-07-23  Bryce McKinlay  <mckinlay@redhat.com>

	* prims.cc (_Jv_InitPrimClass): Don't create an array class.
	(_Jv_CreateJavaVM): Don't pass array vtable parameter to
	_Jv_InitPrimClass.
	(DECLARE_PRIM_TYPE): Don't declare array vtables.
	* include/jvm.h (struct _Jv_ArrayVTable): Removed.
	* java/lang/Class.h (_Jv_InitPrimClass): Update friend declaration.

-- 
           Summary: [4.0 regression] primitive array optimization is gone
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tromey 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=18190


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

* [Bug java/18190] [4.0 regression] primitive array optimization is gone
  2004-10-28  1:15 [Bug java/18190] New: [4.0 regression] primitive array optimization is gone tromey at gcc dot gnu dot org
@ 2004-10-28  1:39 ` pinskia at gcc dot gnu dot org
  2004-11-04  4:53 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-28  1:39 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-28 01:39 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |missed-optimization
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-28 01:39:42
               date|                            |
   Target Milestone|---                         |4.0.0


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


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

* [Bug java/18190] [4.0 regression] primitive array optimization is gone
  2004-10-28  1:15 [Bug java/18190] New: [4.0 regression] primitive array optimization is gone tromey at gcc dot gnu dot org
  2004-10-28  1:39 ` [Bug java/18190] " pinskia at gcc dot gnu dot org
@ 2004-11-04  4:53 ` pinskia at gcc dot gnu dot org
  2004-11-04 18:46 ` mckinlay at redhat dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-04  4:53 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-04 04:53 -------
Some of the code from java_expand_expr should be moved into java_gimplify_new_array_init.
And maybe fix up libjava code or maybe just storing the array's vtable by using a store.  I might look 
into doing this tomorrow.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2004-10-28 01:39:42         |2004-11-04 04:53:33
               date|                            |


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


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

* [Bug java/18190] [4.0 regression] primitive array optimization is gone
  2004-10-28  1:15 [Bug java/18190] New: [4.0 regression] primitive array optimization is gone tromey at gcc dot gnu dot org
  2004-10-28  1:39 ` [Bug java/18190] " pinskia at gcc dot gnu dot org
  2004-11-04  4:53 ` pinskia at gcc dot gnu dot org
@ 2004-11-04 18:46 ` mckinlay at redhat dot com
  2004-11-04 21:19 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: mckinlay at redhat dot com @ 2004-11-04 18:46 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mckinlay at redhat dot com  2004-11-04 18:46 -------
Here's my thoughts about this:

- This optimization only ever worked for source compilation. Bytecode compilers
always emit array initializers as code, so for byte compilation it makes no
difference.

- I don't see a strong reason not to reference the vtable symbols, but if we
decide to remove my patch then we need to be careful that the original bug
remains fixed - see: http://gcc.gnu.org/ml/java-patches/2004-q3/msg00343.html

- Is this optimization really worth worrying about? I'm pretty sure that
performance-wise, the difference is insignificant - binary size is what we
should be concerned about here. Is a binary that initializes arrays in code
significantly larger?



-- 


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


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

* [Bug java/18190] [4.0 regression] primitive array optimization is gone
  2004-10-28  1:15 [Bug java/18190] New: [4.0 regression] primitive array optimization is gone tromey at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-11-04 18:46 ` mckinlay at redhat dot com
@ 2004-11-04 21:19 ` pinskia at gcc dot gnu dot org
  2004-11-04 23:06 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-04 21:19 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-04 21:19 -------
Note I attached the front-end part so the only thing left is to fix up libjava to emit the vtables again.

-- 


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


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

* [Bug java/18190] [4.0 regression] primitive array optimization is gone
  2004-10-28  1:15 [Bug java/18190] New: [4.0 regression] primitive array optimization is gone tromey at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-11-04 21:19 ` pinskia at gcc dot gnu dot org
@ 2004-11-04 23:06 ` pinskia at gcc dot gnu dot org
  2005-01-11 13:48 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-04 23:06 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-04 23:06 -------
I finished up porting the other part of the expand part.

-- 


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


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

* [Bug java/18190] [4.0 regression] primitive array optimization is gone
  2004-10-28  1:15 [Bug java/18190] New: [4.0 regression] primitive array optimization is gone tromey at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-11-04 23:06 ` pinskia at gcc dot gnu dot org
@ 2005-01-11 13:48 ` pinskia at gcc dot gnu dot org
  2005-01-19 18:52 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-11 13:48 UTC (permalink / raw)
  To: java-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
           Priority|P2                          |P3


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


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

* [Bug java/18190] [4.0 regression] primitive array optimization is gone
  2004-10-28  1:15 [Bug java/18190] New: [4.0 regression] primitive array optimization is gone tromey at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-01-11 13:48 ` pinskia at gcc dot gnu dot org
@ 2005-01-19 18:52 ` mmitchel at gcc dot gnu dot org
  2005-03-05 19:58 ` [Bug java/18190] [4.0/4.1 " pinskia at gcc dot gnu dot org
  2005-08-22  1:47 ` mmitchel at gcc dot gnu dot org
  8 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-01-19 18:52 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-01-19 18:52 -------
Ada and Java bugs are not release-critical; therefore, I've removed the target
milsetone.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.0                       |---


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


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

* [Bug java/18190] [4.0/4.1 regression] primitive array optimization is gone
  2004-10-28  1:15 [Bug java/18190] New: [4.0 regression] primitive array optimization is gone tromey at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-01-19 18:52 ` mmitchel at gcc dot gnu dot org
@ 2005-03-05 19:58 ` pinskia at gcc dot gnu dot org
  2005-08-22  1:47 ` mmitchel at gcc dot gnu dot org
  8 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-05 19:58 UTC (permalink / raw)
  To: java-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.0


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


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

* [Bug java/18190] [4.0/4.1 regression] primitive array optimization is gone
  2004-10-28  1:15 [Bug java/18190] New: [4.0 regression] primitive array optimization is gone tromey at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-03-05 19:58 ` [Bug java/18190] [4.0/4.1 " pinskia at gcc dot gnu dot org
@ 2005-08-22  1:47 ` mmitchel at gcc dot gnu dot org
  8 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-08-22  1:47 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-08-22 01:47 -------
Removing target milestone per last comment.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.0                       |---


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


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

* [Bug java/18190] [4.0/4.1 regression] primitive array optimization is gone
       [not found] <bug-18190-360@http.gcc.gnu.org/bugzilla/>
@ 2005-10-30 22:11 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-30 22:11 UTC (permalink / raw)
  To: java-prs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P5
   Target Milestone|---                         |4.1.0


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


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

end of thread, other threads:[~2005-10-30 22:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-28  1:15 [Bug java/18190] New: [4.0 regression] primitive array optimization is gone tromey at gcc dot gnu dot org
2004-10-28  1:39 ` [Bug java/18190] " pinskia at gcc dot gnu dot org
2004-11-04  4:53 ` pinskia at gcc dot gnu dot org
2004-11-04 18:46 ` mckinlay at redhat dot com
2004-11-04 21:19 ` pinskia at gcc dot gnu dot org
2004-11-04 23:06 ` pinskia at gcc dot gnu dot org
2005-01-11 13:48 ` pinskia at gcc dot gnu dot org
2005-01-19 18:52 ` mmitchel at gcc dot gnu dot org
2005-03-05 19:58 ` [Bug java/18190] [4.0/4.1 " pinskia at gcc dot gnu dot org
2005-08-22  1:47 ` mmitchel at gcc dot gnu dot org
     [not found] <bug-18190-360@http.gcc.gnu.org/bugzilla/>
2005-10-30 22:11 ` 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).