* [Bug tree-optimization/17687] sincos can be folded at the tree level
[not found] <bug-17687-7849@http.gcc.gnu.org/bugzilla/>
@ 2006-08-10 6:28 ` bonzini at gnu dot org
2006-08-10 7:41 ` rguenth at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: bonzini at gnu dot org @ 2006-08-10 6:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from bonzini at gnu dot org 2006-08-10 06:28 -------
Was this implemented? There is an expand_builtin_sincos, but I think it cannot
remove TREE_ADDRESSABLE on the arguments, making most of the performance
advantages go away...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17687
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17687] sincos can be folded at the tree level
[not found] <bug-17687-7849@http.gcc.gnu.org/bugzilla/>
2006-08-10 6:28 ` [Bug tree-optimization/17687] sincos can be folded at the tree level bonzini at gnu dot org
@ 2006-08-10 7:41 ` rguenth at gcc dot gnu dot org
2006-08-10 8:04 ` paolo dot bonzini at lu dot unisi dot ch
` (11 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-08-10 7:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2006-08-10 07:41 -------
I implemented the expander to allow the x87 backend using fsincos for it. The
problems (TREE_ADDRESSABLE, no real folding, no CSE with previous sin/cos)
still exist. I had/have (I don't remember if I submitted them) patches to
canonicalize sin/cos/sincos to cexp and expand cexp to sin/cos/sincos dependent
on arguments.
If this PR was only about x87 using fsincos for sincos this is fixed now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17687
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17687] sincos can be folded at the tree level
[not found] <bug-17687-7849@http.gcc.gnu.org/bugzilla/>
2006-08-10 6:28 ` [Bug tree-optimization/17687] sincos can be folded at the tree level bonzini at gnu dot org
2006-08-10 7:41 ` rguenth at gcc dot gnu dot org
@ 2006-08-10 8:04 ` paolo dot bonzini at lu dot unisi dot ch
2006-08-10 8:08 ` [Bug tree-optimization/17687] sincos expansion is suboptimal bonzini at gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: paolo dot bonzini at lu dot unisi dot ch @ 2006-08-10 8:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from paolo dot bonzini at lu dot unisi dot ch 2006-08-10 08:04 -------
Subject: Re: sincos can be folded at the tree
level
> If this PR was only about x87 using fsincos for sincos this is fixed now.
Well, it was mostly about getting rid of TREE_ADDRESSABLE, which you can
really do efficiently only on x87, using fsincos.
But maybe it's time to change the subject.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17687
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17687] sincos expansion is suboptimal
[not found] <bug-17687-7849@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2006-08-10 8:04 ` paolo dot bonzini at lu dot unisi dot ch
@ 2006-08-10 8:08 ` bonzini at gnu dot org
2006-08-10 8:11 ` bonzini at gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: bonzini at gnu dot org @ 2006-08-10 8:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from bonzini at gnu dot org 2006-08-10 08:08 -------
see patch at http://gcc.gnu.org/ml/gcc-patches/2005-12/msg01151.html
--
bonzini at gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|sincos can be folded at the |sincos expansion is
|tree level |suboptimal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17687
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17687] sincos expansion is suboptimal
[not found] <bug-17687-7849@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2006-08-10 8:08 ` [Bug tree-optimization/17687] sincos expansion is suboptimal bonzini at gnu dot org
@ 2006-08-10 8:11 ` bonzini at gnu dot org
2006-08-10 8:16 ` rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: bonzini at gnu dot org @ 2006-08-10 8:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from bonzini at gnu dot org 2006-08-10 08:11 -------
If all that we care about is TREE_ADDRESSABLE, and not folding together with a
previous sin/cos call, we may just change
sincos (x, &s, &c);
to
sincos (x, &t1, &t2);
s = t1;
c = t2;
maybe?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17687
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17687] sincos expansion is suboptimal
[not found] <bug-17687-7849@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2006-08-10 8:11 ` bonzini at gnu dot org
@ 2006-08-10 8:16 ` rguenth at gcc dot gnu dot org
2006-08-10 8:32 ` bonzini at gnu dot org
` (7 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-08-10 8:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2006-08-10 08:16 -------
Created an attachment (id=12055)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12055&action=view)
patch using cexp
Well, then you make t1 and t2 addressable. We could introduce a
__builtin_sane_sincos which returns in a vector, but then at expand time we'd
have the same problems if we ever want to go back to a sincos libcall. With
libgcc-math we could provide one with a sane interface though.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17687
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17687] sincos expansion is suboptimal
[not found] <bug-17687-7849@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2006-08-10 8:16 ` rguenth at gcc dot gnu dot org
@ 2006-08-10 8:32 ` bonzini at gnu dot org
2006-10-24 12:55 ` [Bug tree-optimization/17687] sincos tree representation causes extra addressable vars rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: bonzini at gnu dot org @ 2006-08-10 8:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from bonzini at gnu dot org 2006-08-10 08:32 -------
sure, but t1 and t2 die the moment they are assigned back. it would be just a
trick to return in memory, but not make s and c addressable all the way down to
RA.
though i don't remember how big a penalty is if your variable is addressable
just for the sake of one or two uses.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17687
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17687] sincos tree representation causes extra addressable vars
[not found] <bug-17687-7849@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2006-08-10 8:32 ` bonzini at gnu dot org
@ 2006-10-24 12:55 ` rguenth at gcc dot gnu dot org
2006-12-06 9:54 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-10-24 12:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from rguenth at gcc dot gnu dot org 2006-10-24 12:55 -------
This PR is only about a non-optimal tree-representation for __builtin_sincos.
See also http://gcc.gnu.org/ml/gcc-patches/2005-12/msg01151.html for an
alternative and some discussion.
(The other patch was rejected, I believe further discussion is necessary here.
For reference:
http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01571.html
)
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
URL|http://gcc.gnu.org/ml/gcc- |
|patches/2005- |
|03/msg01571.html |
Keywords|patch |
Last reconfirmed|2005-12-09 04:25:17 |2006-10-24 12:55:11
date| |
Summary|sincos expansion is |sincos tree representation
|suboptimal |causes extra addressable
| |vars
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17687
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17687] sincos tree representation causes extra addressable vars
[not found] <bug-17687-7849@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2006-10-24 12:55 ` [Bug tree-optimization/17687] sincos tree representation causes extra addressable vars rguenth at gcc dot gnu dot org
@ 2006-12-06 9:54 ` rguenth at gcc dot gnu dot org
2006-12-06 9:58 ` paolo dot bonzini at lu dot unisi dot ch
` (4 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-12-06 9:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from rguenth at gcc dot gnu dot org 2006-12-06 09:54 -------
Paolo, are you working on this?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17687
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17687] sincos tree representation causes extra addressable vars
[not found] <bug-17687-7849@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2006-12-06 9:54 ` rguenth at gcc dot gnu dot org
@ 2006-12-06 9:58 ` paolo dot bonzini at lu dot unisi dot ch
2006-12-06 10:04 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: paolo dot bonzini at lu dot unisi dot ch @ 2006-12-06 9:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from paolo dot bonzini at lu dot unisi dot ch 2006-12-06 09:58 -------
Subject: Re: sincos tree representation causes
extra addressable vars
> Paolo, are you working on this?
No. :-(
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17687
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17687] sincos tree representation causes extra addressable vars
[not found] <bug-17687-7849@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2006-12-06 9:58 ` paolo dot bonzini at lu dot unisi dot ch
@ 2006-12-06 10:04 ` rguenth at gcc dot gnu dot org
2006-12-07 12:50 ` patchapp at dberlin dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-12-06 10:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from rguenth at gcc dot gnu dot org 2006-12-06 10:04 -------
So I hope you don't mind...
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|bonzini at gnu dot org |rguenth at gcc dot gnu dot
| |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17687
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17687] sincos tree representation causes extra addressable vars
[not found] <bug-17687-7849@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2006-12-06 10:04 ` rguenth at gcc dot gnu dot org
@ 2006-12-07 12:50 ` patchapp at dberlin dot org
2006-12-08 13:10 ` patchapp at dberlin dot org
2006-12-13 10:28 ` rguenth at gcc dot gnu dot org
13 siblings, 0 replies; 14+ messages in thread
From: patchapp at dberlin dot org @ 2006-12-07 12:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from patchapp at dberlin dot org 2006-12-07 12:50 -------
Subject: Bug number PR17687
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00476.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17687
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17687] sincos tree representation causes extra addressable vars
[not found] <bug-17687-7849@http.gcc.gnu.org/bugzilla/>
` (11 preceding siblings ...)
2006-12-07 12:50 ` patchapp at dberlin dot org
@ 2006-12-08 13:10 ` patchapp at dberlin dot org
2006-12-13 10:28 ` rguenth at gcc dot gnu dot org
13 siblings, 0 replies; 14+ messages in thread
From: patchapp at dberlin dot org @ 2006-12-08 13:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from patchapp at dberlin dot org 2006-12-08 13:10 -------
Subject: Bug number PR17687
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00536.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17687
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17687] sincos tree representation causes extra addressable vars
[not found] <bug-17687-7849@http.gcc.gnu.org/bugzilla/>
` (12 preceding siblings ...)
2006-12-08 13:10 ` patchapp at dberlin dot org
@ 2006-12-13 10:28 ` rguenth at gcc dot gnu dot org
13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-12-13 10:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #20 from rguenth at gcc dot gnu dot org 2006-12-13 10:27 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17687
^ permalink raw reply [flat|nested] 14+ messages in thread