public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/35402] Store CCP will not inline static const variable which is default initialized
2008-02-28 22:09 [Bug tree-optimization/35402] New: Store CCP will not inline static const variable which is default initialized pinskia at gcc dot gnu dot org
@ 2008-02-28 22:09 ` pinskia at gcc dot gnu dot org
2008-02-28 22:27 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-02-28 22:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-02-28 22:08 -------
Mine.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-02-28 22:08:57
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35402
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/35402] New: Store CCP will not inline static const variable which is default initialized
@ 2008-02-28 22:09 pinskia at gcc dot gnu dot org
2008-02-28 22:09 ` [Bug tree-optimization/35402] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-02-28 22:09 UTC (permalink / raw)
To: gcc-bugs
Testcase:
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
static const int conststaticvariable;
int f(void)
{
return conststaticvariable;
}
/* There should be no reference to conststaticvariable as we should have
inlined the 0. */
/* { dg-final { scan-tree-dump-times "conststaticvariable" o "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
--
Summary: Store CCP will not inline static const variable which is
default initialized
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35402
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/35402] Store CCP will not inline static const variable which is default initialized
2008-02-28 22:09 [Bug tree-optimization/35402] New: Store CCP will not inline static const variable which is default initialized pinskia at gcc dot gnu dot org
2008-02-28 22:09 ` [Bug tree-optimization/35402] " pinskia at gcc dot gnu dot org
2008-02-28 22:27 ` pinskia at gcc dot gnu dot org
@ 2008-02-28 22:27 ` pinskia at gcc dot gnu dot org
2008-02-29 12:43 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-02-28 22:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2008-02-28 22:26 -------
>/* { dg-final { scan-tree-dump-times "conststaticvariable" o "optimized"} } */
that should be:
/* { dg-final { scan-tree-dump-times "conststaticvariable" 0 "optimized"} } */
:)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35402
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/35402] Store CCP will not inline static const variable which is default initialized
2008-02-28 22:09 [Bug tree-optimization/35402] New: Store CCP will not inline static const variable which is default initialized pinskia at gcc dot gnu dot org
2008-02-28 22:09 ` [Bug tree-optimization/35402] " pinskia at gcc dot gnu dot org
@ 2008-02-28 22:27 ` pinskia at gcc dot gnu dot org
2008-02-28 22:27 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-02-28 22:27 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35402
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/35402] Store CCP will not inline static const variable which is default initialized
2008-02-28 22:09 [Bug tree-optimization/35402] New: Store CCP will not inline static const variable which is default initialized pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-02-28 22:27 ` pinskia at gcc dot gnu dot org
@ 2008-02-29 12:43 ` rguenth at gcc dot gnu dot org
2008-03-05 23:40 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-29 12:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2008-02-29 12:43 -------
Please change tree-ssa-sccvn.c:try_to_simplify accordingly (eventually that
should use a common helper function to extract a constant initializer for
the tcc_reference case, too). Thanks!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35402
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/35402] Store CCP will not inline static const variable which is default initialized
2008-02-28 22:09 [Bug tree-optimization/35402] New: Store CCP will not inline static const variable which is default initialized pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-02-29 12:43 ` rguenth at gcc dot gnu dot org
@ 2008-03-05 23:40 ` pinskia at gcc dot gnu dot org
2008-03-06 21:57 ` pinskia at gcc dot gnu dot org
2008-03-06 21:59 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-03-05 23:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2008-03-05 23:40 -------
(In reply to comment #3)
> Please change tree-ssa-sccvn.c:try_to_simplify accordingly (eventually that
> should use a common helper function to extract a constant initializer for
> the tcc_reference case, too). Thanks!
There is already a helper function in tree-ssa-ccp.c: get_symbol_constant_value
.
This is what I am changing if tree-ssa-sccvn.c:try_to_simplify wants to use it,
it should too.
I think there are too many duplicated functions all around really. This is
just one example.
-- PInski
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35402
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/35402] Store CCP will not inline static const variable which is default initialized
2008-02-28 22:09 [Bug tree-optimization/35402] New: Store CCP will not inline static const variable which is default initialized pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-03-05 23:40 ` pinskia at gcc dot gnu dot org
@ 2008-03-06 21:57 ` pinskia at gcc dot gnu dot org
2008-03-06 21:59 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-03-06 21:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2008-03-06 21:57 -------
Subject: Bug 35402
Author: pinskia
Date: Thu Mar 6 21:56:04 2008
New Revision: 132991
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132991
Log:
2008-03-06 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR tree-opt/35402
* tree-ssa-ccp.c (get_symbol_constant_value): Handle
integral and scalar float variables which have a
NULL DECL_INITIAL.
2008-03-06 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR tree-opt/35402
* gcc.dg/tree-ssa/ssa-store-ccp-1.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-ccp.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35402
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/35402] Store CCP will not inline static const variable which is default initialized
2008-02-28 22:09 [Bug tree-optimization/35402] New: Store CCP will not inline static const variable which is default initialized pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-03-06 21:57 ` pinskia at gcc dot gnu dot org
@ 2008-03-06 21:59 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-03-06 21:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2008-03-06 21:59 -------
Fixed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35402
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-03-06 21:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-28 22:09 [Bug tree-optimization/35402] New: Store CCP will not inline static const variable which is default initialized pinskia at gcc dot gnu dot org
2008-02-28 22:09 ` [Bug tree-optimization/35402] " pinskia at gcc dot gnu dot org
2008-02-28 22:27 ` pinskia at gcc dot gnu dot org
2008-02-28 22:27 ` pinskia at gcc dot gnu dot org
2008-02-29 12:43 ` rguenth at gcc dot gnu dot org
2008-03-05 23:40 ` pinskia at gcc dot gnu dot org
2008-03-06 21:57 ` pinskia at gcc dot gnu dot org
2008-03-06 21:59 ` 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).