[Bug rtl-optimization/49477] Should have user/debugger-oriented fine-tuning of optimizations available

2021-09-13 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49477

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Richard Biener  ---
Yes, -Og is what the bug asked for.  Well, it is supposed to be it - but it's
far from perfect yet.  Still there's now -Og which can be further tuned.

[Bug rtl-optimization/49477] Should have user/debugger-oriented fine-tuning of optimizations available

2021-09-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49477

Andrew Pinski  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=53316

--- Comment #2 from Andrew Pinski  ---
Does -Og solve this?  -Og was added at r0-118944-gbf7a718571e1722 for GCC
4.8.0.

[Bug rtl-optimization/49477] Should have user/debugger-oriented fine-tuning of optimizations available

2011-06-21 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49477

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.06.21 09:48:59
 CC||hubicka at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2011-06-21 
09:48:59 UTC ---
Confirmed.

We should

 1) disable unneeded optimization at -O0 (we do a lot of folding)
 2) look at -O1 (it's basically untuned for the last years), make
it the intended reasonable optimization with good compile-time
and debugging experience again.

For -O1 my idea was to simply _only_ do early optimizations, thus drop
any IPA optimizations from it and not execute pass_all_optimizations.
In addition to that from early optimizations disable
pass_sra_early, pass_early_ipa_sra and pass_convert_switch.  Eventually
insert a DSE pass early (not really sure).

It'll of course change fundamentally what code we emit for -O1, but at
least we have strong CSE/DCE passes and early inlining that is able
to remove C++ abstraction.

Patch that will arrive there half-way (eventually needs fixing so we
still handle some special builtins):

Index: gcc/tree-optimize.c
===
--- gcc/tree-optimize.c (revision 175205)
+++ gcc/tree-optimize.c (working copy)
@@ -53,7 +53,7 @@ along with GCC; see the file COPYING3.
 static bool
 gate_all_optimizations (void)
 {
-  return (optimize = 1
+  return (optimize  1
  /* Don't bother doing anything if the program has errors.
 We have to pass down the queue if we already went into SSA */
   (!seen_error () || gimple_in_ssa_p (cfun)));