* [Bug optimization/9079] Inline constant function pointers
[not found] <20021228032605.9079.173513@bugs.debian.org>
@ 2003-07-08 0:53 ` pinskia at physics dot uc dot edu
2003-07-08 4:50 ` doko at cs dot tu-berlin dot de
` (13 subsequent siblings)
14 siblings, 0 replies; 15+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-08 0:53 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-08 00:53 -------
Mark this a dup of bug 3713 which was for c++ but now for all languages.
*** This bug has been marked as a duplicate of 3713 ***
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/9079] Inline constant function pointers
[not found] <20021228032605.9079.173513@bugs.debian.org>
2003-07-08 0:53 ` [Bug optimization/9079] Inline constant function pointers pinskia at physics dot uc dot edu
@ 2003-07-08 4:50 ` doko at cs dot tu-berlin dot de
2003-07-08 10:46 ` pinskia at physics dot uc dot edu
` (12 subsequent siblings)
14 siblings, 0 replies; 15+ messages in thread
From: doko at cs dot tu-berlin dot de @ 2003-07-08 4:50 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
------- Additional Comments From doko at cs dot tu-berlin dot de 2003-07-08 04:50 -------
Subject: Re: Bug#173513: Inline constant function pointers
pinskia at physics dot uc dot edu writes:
> Mark this a dup of bug 3713 which was for c++ but now for all languages.
>
> *** This bug has been marked as a duplicate of 3713 ***
I fail to see a resolution to this report. The call to funk is not
inlined.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/9079] Inline constant function pointers
[not found] <20021228032605.9079.173513@bugs.debian.org>
2003-07-08 0:53 ` [Bug optimization/9079] Inline constant function pointers pinskia at physics dot uc dot edu
2003-07-08 4:50 ` doko at cs dot tu-berlin dot de
@ 2003-07-08 10:46 ` pinskia at physics dot uc dot edu
2004-04-21 2:38 ` [Bug optimization/9079] [tree-ssa] " pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 15+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-08 10:46 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-08 10:46 -------
Subject: Re: Inline constant function pointers
On Tuesday, Jul 8, 2003, at 00:50 US/Eastern, doko at cs dot tu-berlin
dot de wrote:
> ------- Additional Comments From doko at cs dot tu-berlin dot de
> 2003-07-08 04:50 -------
> Subject: Re: Bug#173513: Inline constant function pointers
>
> pinskia at physics dot uc dot edu writes:
>> Mark this a dup of bug 3713 which was for c++ but now for all
>> languages.
>>
>> *** This bug has been marked as a duplicate of 3713 ***
>
> I fail to see a resolution to this report. The call to funk is not
> inlined.
This bug was the same bug as 3713 which means that they were the same
bug.
Having two bugs referring to the same bug in the database is usually
not good
because we cannot keep track of which bugs are important and which bugs
or not
and we also cannot keep track of which bugs get fixed, that is why bugs
are
marked as duplicates of each other.
I hope this bug gets fixed for the tree-ssa branch which makes working
on the tree a
lot easier and the it can fold the constant function pointer and then
maybe inline it.
Thanks,
Andrew Pinski
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/9079] [tree-ssa] Inline constant function pointers
[not found] <20021228032605.9079.173513@bugs.debian.org>
` (2 preceding siblings ...)
2003-07-08 10:46 ` pinskia at physics dot uc dot edu
@ 2004-04-21 2:38 ` pinskia at gcc dot gnu dot org
2004-04-21 2:38 ` [Bug optimization/9079] " pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-21 2:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-21 02:23 -------
And I have a patch which is for tree-ssa.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|REOPENED |ASSIGNED
Keywords| |pessimizes-code
Summary|Inline constant function |[tree-ssa] Inline constant
|pointers |function pointers
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/9079] Inline constant function pointers
[not found] <20021228032605.9079.173513@bugs.debian.org>
` (3 preceding siblings ...)
2004-04-21 2:38 ` [Bug optimization/9079] [tree-ssa] " pinskia at gcc dot gnu dot org
@ 2004-04-21 2:38 ` pinskia at gcc dot gnu dot org
2004-04-21 2:40 ` [Bug optimization/9079] [tree-ssa] " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-21 2:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-21 02:22 -------
Actually this is different than PR 3713.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|DUPLICATE |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug optimization/9079] [tree-ssa] Inline constant function pointers
[not found] <20021228032605.9079.173513@bugs.debian.org>
` (4 preceding siblings ...)
2004-04-21 2:38 ` [Bug optimization/9079] " pinskia at gcc dot gnu dot org
@ 2004-04-21 2:40 ` pinskia at gcc dot gnu dot org
2004-05-17 16:52 ` [Bug tree-optimization/9079] " pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-21 2:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-21 02:25 -------
I should say that I have a partial fix for the tree-ssa, what needs to be done is inlining
again.
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|0000-00-00 00:00:00 |2004-04-21 02:25:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/9079] [tree-ssa] Inline constant function pointers
[not found] <20021228032605.9079.173513@bugs.debian.org>
` (5 preceding siblings ...)
2004-04-21 2:40 ` [Bug optimization/9079] [tree-ssa] " pinskia at gcc dot gnu dot org
@ 2004-05-17 16:52 ` pinskia at gcc dot gnu dot org
2004-05-18 3:54 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-17 16:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-17 01:32 -------
Patch which also helps it the same way as my cast pass (which I am not going to submit
at all).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/9079] [tree-ssa] Inline constant function pointers
[not found] <20021228032605.9079.173513@bugs.debian.org>
` (6 preceding siblings ...)
2004-05-17 16:52 ` [Bug tree-optimization/9079] " pinskia at gcc dot gnu dot org
@ 2004-05-18 3:54 ` pinskia at gcc dot gnu dot org
2004-05-21 1:50 ` cesarb at nitnet dot com dot br
` (6 subsequent siblings)
14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-18 3:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-17 15:33 -------
The patch which helps is here: <http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00991.html>.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/9079] [tree-ssa] Inline constant function pointers
[not found] <20021228032605.9079.173513@bugs.debian.org>
` (7 preceding siblings ...)
2004-05-18 3:54 ` pinskia at gcc dot gnu dot org
@ 2004-05-21 1:50 ` cesarb at nitnet dot com dot br
2004-05-22 18:26 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 15+ messages in thread
From: cesarb at nitnet dot com dot br @ 2004-05-21 1:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cesarb at nitnet dot com dot br 2004-05-20 00:10 -------
I just hit this bug in a hairy piece of code which I reduced to the testcase
below (a should compile to the same thing as expected).
It's the same as this bug but with two layers of indirection instead of one.
#define inline inline __attribute__((always_inline))
#define regparm __attribute__((regparm(3)))
extern void regparm f(void);
static inline void regparm e(void)
{
f();
}
static inline void regparm d(void)
{
f();
}
static inline void regparm c(int x, void (regparm *p1)(void), void (regparm
*p2)(void))
{
if (x)
p1();
else
p2();
}
static inline void regparm b(int x, void (regparm *p)(int x, void (regparm
*p1)(void), void (regparm *p2)(void)))
{
p(x, d, e);
}
void regparm a(int x)
{
b(x, c);
}
void regparm expected(int x __attribute__((unused)))
{
f();
}
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |cesarb at nitnet dot com dot
| |br
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/9079] [tree-ssa] Inline constant function pointers
[not found] <20021228032605.9079.173513@bugs.debian.org>
` (8 preceding siblings ...)
2004-05-21 1:50 ` cesarb at nitnet dot com dot br
@ 2004-05-22 18:26 ` pinskia at gcc dot gnu dot org
2004-05-24 11:49 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-22 18:26 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|pinskia at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/9079] [tree-ssa] Inline constant function pointers
[not found] <20021228032605.9079.173513@bugs.debian.org>
` (9 preceding siblings ...)
2004-05-22 18:26 ` pinskia at gcc dot gnu dot org
@ 2004-05-24 11:49 ` pinskia at gcc dot gnu dot org
2004-12-13 22:25 ` sxanth at ceid dot upatras dot gr
` (3 subsequent siblings)
14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-24 11:49 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.5.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/9079] [tree-ssa] Inline constant function pointers
[not found] <20021228032605.9079.173513@bugs.debian.org>
` (10 preceding siblings ...)
2004-05-24 11:49 ` pinskia at gcc dot gnu dot org
@ 2004-12-13 22:25 ` sxanth at ceid dot upatras dot gr
2005-01-23 15:14 ` steven at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 15+ messages in thread
From: sxanth at ceid dot upatras dot gr @ 2004-12-13 22:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From sxanth at ceid dot upatras dot gr 2004-12-13 22:25 -------
This is present in 3.4 too
--------------------------------------------
static inline int foo ()
{
return 100;
}
typedef int (*fptr)();
static const fptr a [] = { foo };
static inline int call (int i)
{
return a [i]();
}
static inline int call2 (fptr f)
{
return f();
}
static const fptr F = foo;
int main ()
{
return call (0) + call2 (foo) + F() +foo();
}
---------------------------------------------------
Here only F() and foo() are added at compile time
but it would be better if gcc just returned 400 w/o any other code.
Please fix!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/9079] [tree-ssa] Inline constant function pointers
[not found] <20021228032605.9079.173513@bugs.debian.org>
` (11 preceding siblings ...)
2004-12-13 22:25 ` sxanth at ceid dot upatras dot gr
@ 2005-01-23 15:14 ` steven at gcc dot gnu dot org
2005-01-23 15:18 ` pinskia at gcc dot gnu dot org
2005-02-12 23:08 ` pinskia at gcc dot gnu dot org
14 siblings, 0 replies; 15+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-23 15:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-01-23 15:14 -------
*** This bug has been marked as a duplicate of 3713 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/9079] [tree-ssa] Inline constant function pointers
[not found] <20021228032605.9079.173513@bugs.debian.org>
` (12 preceding siblings ...)
2005-01-23 15:14 ` steven at gcc dot gnu dot org
@ 2005-01-23 15:18 ` pinskia at gcc dot gnu dot org
2005-02-12 23:08 ` pinskia at gcc dot gnu dot org
14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-23 15:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-23 15:17 -------
Again this is different than PR 3713. (steven is closing bugs which are not really fixed or dups right
now).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|DUPLICATE |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug tree-optimization/9079] [tree-ssa] Inline constant function pointers
[not found] <20021228032605.9079.173513@bugs.debian.org>
` (13 preceding siblings ...)
2005-01-23 15:18 ` pinskia at gcc dot gnu dot org
@ 2005-02-12 23:08 ` pinskia at gcc dot gnu dot org
14 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-12 23:08 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
^ permalink raw reply [flat|nested] 15+ messages in thread