public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/89059] Once we emit switchconf tables, we don't optimize them anymore
       [not found] <bug-89059-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-29  4:28 ` pinskia at gcc dot gnu.org
  2021-08-29  9:12 ` jakub at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-29  4:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89059

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2019-01-25 00:00:00         |2021-8-28

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I wonder if we are doing switch table to const table too early.  Doing it
before inlining might seem too early.

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

* [Bug tree-optimization/89059] Once we emit switchconf tables, we don't optimize them anymore
       [not found] <bug-89059-4@http.gcc.gnu.org/bugzilla/>
  2021-08-29  4:28 ` [Bug tree-optimization/89059] Once we emit switchconf tables, we don't optimize them anymore pinskia at gcc dot gnu.org
@ 2021-08-29  9:12 ` jakub at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-08-29  9:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89059

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It is way too early, but on the other side the inlining decisions want to know
if the switch is optimizable in certain way.
So one possibility would be to lower as we currently do, but add optimizations
to  simplify and/or convert to some other form later after IPA.
And another would be to just do the analysis phase of switches shortly before
inlining and note (either in flags on GIMPLE_SWITCH or in an on-the-side data
structure or whatever) what way we'd optimize the switch, take it into account
during inlining cost computations and lower for real after IPA only.
Though, e.g. if we decide to go with a value table for a switch in an inline
function and if in all the inline copies we still decide to use the same value
table, it would be nice to share the tables.  But, if in each inlined copy VRP
has different ranges and we can build different tables, we shouldn't share
them...

And there is another PR that we should use range info (ranger at this point) in
the switch lowering decisions.

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

end of thread, other threads:[~2021-08-29  9:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-89059-4@http.gcc.gnu.org/bugzilla/>
2021-08-29  4:28 ` [Bug tree-optimization/89059] Once we emit switchconf tables, we don't optimize them anymore pinskia at gcc dot gnu.org
2021-08-29  9:12 ` jakub at gcc dot gnu.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).