This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/14703] [4.4 regression] Inadequate optimization of inline templated functions, infinite loop in ipa-reference and memory hog



------- Comment #8 from hubicka at gcc dot gnu dot org  2008-09-06 12:37 -------
Hi,
the following patch fixes inlining problem:
Index: passes.c
===================================================================
--- passes.c    (revision 139985)
+++ passes.c    (working copy)
@@ -565,6 +565,7 @@ init_optimization_passes (void)
        }
       NEXT_PASS (pass_release_ssa_names);
       NEXT_PASS (pass_rebuild_cgraph_edges);
+      NEXT_PASS (pass_inline_parameters);
     }
   NEXT_PASS (pass_ipa_increase_alignment);
   NEXT_PASS (pass_ipa_matrix_reorg);
Early inliner does not recompute body size after optimization.  This call got
lost in some cleanups.

With this we inline well, but we leak so much memory so compiler explode.  I am
just looking into it.

However this testcase send ipa-reference to infinite loop on unpatched
compiler.
Kenny, I can not make much sense of merge_callee_local_info.
If you want to produce combined summary of the function after inlining, you
need to produce duplicate copy of the local properties and recusively walk the
inlined edges of the inline clones (not masters) merging in the original infos
from masters.
But I don't see why you want to do this at first place and you can't just run
propagation on the expanded tree?

Honza


-- 

hubicka at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zadeck at naturalbridge dot
                   |                            |com
           Severity|enhancement                 |normal
   Last reconfirmed|2006-03-01 02:48:47         |2008-09-06 12:37:51
               date|                            |
            Summary|Inadequate optimization of  |[4.4 regression] Inadequate
                   |inline templated functions  |optimization of inline
                   |                            |templated functions,
                   |                            |infinite loop in ipa-
                   |                            |reference and memory hog


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]