[Bug tree-optimization/36100] [4.4 Regression] always_inline attribute is broken at -O0

2008-05-07 Thread hp at gcc dot gnu dot org


--- Comment #12 from hp at gcc dot gnu dot org  2008-05-07 17:02 ---
(In reply to comment #11)
> This is not resolved.  I still see
> FAIL: g++.dg/tree-ssa/pr19637.C scan-tree-dump-times dom1 "return 1;" 3

Oops, different PR, sorry for the noise.


-- 

hp at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36100



[Bug tree-optimization/36100] [4.4 Regression] always_inline attribute is broken at -O0

2008-05-07 Thread hp at gcc dot gnu dot org


--- Comment #11 from hp at gcc dot gnu dot org  2008-05-07 16:55 ---
This is not resolved.  I still see
FAIL: g++.dg/tree-ssa/pr19637.C scan-tree-dump-times dom1 "return 1;" 3
for cris-elf and it's been a few days.
I'm reopening this PR to properly track progress.


-- 

hp at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36100



[Bug tree-optimization/36100] [4.4 Regression] always_inline attribute is broken at -O0

2008-05-04 Thread pinskia at gcc dot gnu dot org


--- Comment #10 from pinskia at gcc dot gnu dot org  2008-05-05 06:14 
---
Fixed by http://gcc.gnu.org/ml/gcc-cvs/2008-05/msg00102.html .


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36100



[Bug tree-optimization/36100] [4.4 Regression] always_inline attribute is broken at -O0

2008-05-04 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Severity|normal  |blocker
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||rejects-valid, wrong-code
   Last reconfirmed|-00-00 00:00:00 |2008-05-05 04:51:35
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36100



[Bug tree-optimization/36100] [4.4 Regression] always_inline attribute is broken at -O0

2008-05-04 Thread hjl dot tools at gmail dot com


--- Comment #9 from hjl dot tools at gmail dot com  2008-05-04 15:35 ---
*** Bug 36118 has been marked as a duplicate of this bug. ***


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 CC||hp at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36100



[Bug tree-optimization/36100] [4.4 Regression] always_inline attribute is broken at -O0

2008-05-02 Thread hubicka at ucw dot cz


--- Comment #8 from hubicka at ucw dot cz  2008-05-02 21:59 ---
Subject: Re:  [4.4 Regression] always_inline attribute is broken at -O0

> FAIL: g++.dg/opt/pr30965.C scan-tree-dump-times optimized ";; Function" 2
> FAIL: gcc.c-torture/execute/va-arg-pack-1.c compilation,  -O0 
> FAIL: gcc.dg/attr-alwaysinline.c scan-assembler-not sabrina
> FAIL: gcc.dg/winline-4.c  (test for warnings, line 4)
> FAIL: gcc.dg/winline-4.c  (test for warnings, line 7)
> FAIL: gcc.dg/torture/nested-fn-1.c  -O0  scan-assembler-not should_not_appear
> FAIL: gcc.target/i386/20060512-1.c (test for excess errors)
> FAIL: gcc.target/i386/20060512-3.c (test for excess errors)

All C failures I get with the patch applied are the following:
FAIL: gcc.c-torture/compile/packed-1.c  -O2  (test for excess errors)
FAIL: gcc.dg/torture/builtin-math-4.c  -O0  (test for excess errors)
FAIL: gcc.dg/torture/builtin-math-4.c  -O1  (test for excess errors)
FAIL: gcc.dg/torture/builtin-math-4.c  -O2  (test for excess errors)
FAIL: gcc.dg/torture/builtin-math-4.c  -O3 -fomit-frame-pointer  (test for
excess errors)
FAIL: gcc.dg/torture/builtin-math-4.c  -O3 -fomit-frame-pointer -funroll-loops 
(test for excess errors)
FAIL: gcc.dg/torture/builtin-math-4.c  -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions  (test for excess errors)
FAIL: gcc.dg/torture/builtin-math-4.c  -O3 -g  (test for excess errors)
FAIL: gcc.dg/torture/builtin-math-4.c  -Os  (test for excess errors)
FAIL: gcc.dg/tree-prof/pr34999.c compilation,  -fprofile-use -D_PROFILE_USE

So hopefully all of those are fixed now. 
I will look into pr30965.C now.

My apologizes for the breakage.  Testing empty patches is obviously easy
job :(

Honza


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36100



[Bug tree-optimization/36100] [4.4 Regression] always_inline attribute is broken at -O0

2008-05-02 Thread hjl dot tools at gmail dot com


--- Comment #7 from hjl dot tools at gmail dot com  2008-05-02 21:49 ---
FYI, revision 134889 has following regressions on Linux/ia32:

FAIL: g++.dg/opt/pr30965.C scan-tree-dump-times optimized ";; Function" 2
FAIL: gcc.c-torture/execute/va-arg-pack-1.c compilation,  -O0 
FAIL: gcc.dg/attr-alwaysinline.c scan-assembler-not sabrina
FAIL: gcc.dg/winline-4.c  (test for warnings, line 4)
FAIL: gcc.dg/winline-4.c  (test for warnings, line 7)
FAIL: gcc.dg/torture/nested-fn-1.c  -O0  scan-assembler-not should_not_appear
FAIL: gcc.target/i386/20060512-1.c (test for excess errors)
FAIL: gcc.target/i386/20060512-3.c (test for excess errors)

I think they are all related to revision 134859.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36100



[Bug tree-optimization/36100] [4.4 Regression] always_inline attribute is broken at -O0

2008-05-02 Thread hubicka at ucw dot cz


--- Comment #6 from hubicka at ucw dot cz  2008-05-02 21:44 ---
Subject: Re:  [4.4 Regression] always_inline attribute is broken at -O0

Just for record, I am still testing the patch.
The testing scripts I used broke in a way that they ended up testing
empty patches (this is obviously why the original patch passed at first
place ;), so I had to start over.

Honza


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36100



[Bug tree-optimization/36100] [4.4 Regression] always_inline attribute is broken at -O0

2008-05-02 Thread hjl dot tools at gmail dot com


--- Comment #5 from hjl dot tools at gmail dot com  2008-05-02 12:59 ---
Gcc can't bootstrap due to PR 36108. Jan, you should revert revision 134865
when you do testing.


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

  BugsThisDependsOn||36108


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36100



[Bug tree-optimization/36100] [4.4 Regression] always_inline attribute is broken at -O0

2008-05-02 Thread hubicka at ucw dot cz


--- Comment #4 from hubicka at ucw dot cz  2008-05-02 11:11 ---
Subject: Re:  [4.4 Regression] always_inline attribute is broken at -O0

Hi,
I am testing the following patch that restores inlining at -O0.

Index: tree-pass.h
===
*** tree-pass.h (revision 134885)
--- tree-pass.h (working copy)
*** extern struct rtl_opt_pass pass_final;
*** 501,506 
--- 501,507 
  extern struct rtl_opt_pass pass_rtl_seqabstr;
  extern struct gimple_opt_pass pass_release_ssa_names;
  extern struct gimple_opt_pass pass_early_inline;
+ extern struct gimple_opt_pass pass_O0_always_inline;
  extern struct gimple_opt_pass pass_inline_parameters;
  extern struct gimple_opt_pass pass_all_early_optimizations;
  extern struct gimple_opt_pass pass_update_address_taken;
Index: ipa-inline.c
===
*** ipa-inline.c(revision 134885)
--- ipa-inline.c(working copy)
*** inline_transform (struct cgraph_node *no
*** 1588,1601 
todo = optimize_inline_calls (current_function_decl);
timevar_pop (TV_INTEGRATION);
  }
-   /* In non-unit-at-a-time we must mark all referenced functions as needed. 
*/
-   if (!flag_unit_at_a_time)
- {
-   struct cgraph_edge *e;
-   for (e = node->callees; e; e = e->next_callee)
-   if (e->callee->analyzed)
-   cgraph_mark_needed_node (e->callee);
- }
return todo | execute_fixup_cfg ();
  }

--- 1588,1593 
*** struct ipa_opt_pass pass_ipa_inline = 
*** 1628,1631 
--- 1620,1681 
   NULL,/* variable_transform */
  };

+ 
+ /* When inlining shall be performed.  */
+ static bool
+ cgraph_gate_O0_always_inline (void)
+ {
+   return !optimize || !flag_unit_at_a_time;
+ }
+ 
+ static unsigned int
+ cgraph_O0_always_inline (void)
+ {
+   struct cgraph_node *node = cgraph_node (current_function_decl);
+   unsigned int todo = 0;
+   bool inlined;
+ 
+   if (sorrycount || errorcount)
+ return 0;
+   /* We might need the body of this function so that we can expand
+  it inline somewhere else.  */
+   inlined = cgraph_decide_inlining_incrementally (node, INLINE_SPEED, 0);
+   if (cgraph_preserve_function_body_p (current_function_decl))
+ save_inline_function_body (node);
+   if (inlined || warn_inline)
+ {
+   timevar_push (TV_INTEGRATION);
+   todo = optimize_inline_calls (current_function_decl);
+   timevar_pop (TV_INTEGRATION);
+ }
+   /* In non-unit-at-a-time we must mark all referenced functions as needed. 
*/
+   if (!flag_unit_at_a_time)
+ {
+   struct cgraph_edge *e;
+   for (e = node->callees; e; e = e->next_callee)
+   if (e->callee->analyzed)
+   cgraph_mark_needed_node (e->callee);
+ }
+   return todo;
+ }
+ 
+ struct gimple_opt_pass pass_O0_always_inline = 
+ {
+  {
+   GIMPLE_PASS,
+   "always_inline",/* name */
+   cgraph_gate_O0_always_inline,   /* gate */
+   cgraph_O0_always_inline,/* execute */
+   NULL,   /* sub */
+   NULL,   /* next */
+   0,  /* static_pass_number */
+   TV_INLINE_HEURISTICS,   /* tv_id */
+   0,  /* properties_required */
+   PROP_cfg,   /* properties_provided */
+   0,  /* properties_destroyed */
+   0,  /* todo_flags_start */
+   TODO_dump_func  /* todo_flags_finish */
+  }
+ };
+ 
  #include "gt-ipa-inline.h"
Index: passes.c
===
*** passes.c(revision 134885)
--- passes.c(working copy)
*** init_optimization_passes (void)
*** 553,558 
--- 553,559 
/* These passes are run after IPA passes on every function that is being
   output to the assembler file.  */
p = &all_passes;
+   NEXT_PASS (pass_O0_always_inline);
NEXT_PASS (pass_all_optimizations);
  {
struct opt_pass **p = &pass_all_optimizations.pass.sub;


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36100



[Bug tree-optimization/36100] [4.4 Regression] always_inline attribute is broken at -O0

2008-05-02 Thread hubicka at gcc dot gnu dot org


--- Comment #3 from hubicka at gcc dot gnu dot org  2008-05-02 11:09 ---
Subject: Bug 36100

Author: hubicka
Date: Fri May  2 11:08:22 2008
New Revision: 134885

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134885
Log:

PR bootstrap/36100
* ipa-inline.c (inline_generate_summary): Make static.
(inline_transform): Do not call inlining at -O0; make static.
* passes.c (execute_todo): Add sanity check.
(execute_one_ipa_transform_pass): Execute proper flags.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-inline.c
trunk/gcc/passes.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36100



[Bug tree-optimization/36100] [4.4 Regression] always_inline attribute is broken at -O0

2008-05-01 Thread hjl dot tools at gmail dot com


--- Comment #2 from hjl dot tools at gmail dot com  2008-05-01 19:32 ---
pass_apply_inline is replaced with pass_ipa_inline.  But pass_ipa_inline is
never used at -O0.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36100



[Bug tree-optimization/36100] [4.4 Regression] always_inline attribute is broken at -O0

2008-05-01 Thread hjl dot tools at gmail dot com


--- Comment #1 from hjl dot tools at gmail dot com  2008-05-01 18:57 ---
Revert revision 134859 fixed this regression.


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

   Target Milestone|--- |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36100