[Bug ipa/95781] Missing dead code elimination when a recursive function is inlined.

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

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
   Last reconfirmed|2020-06-22 00:00:00 |2021-9-1

[Bug ipa/95781] Missing dead code elimination when a recursive function is inlined.

2020-06-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95781

Richard Biener  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Keywords||missed-optimization
  Component|other   |ipa
   Last reconfirmed||2020-06-22

--- Comment #1 from Richard Biener  ---
Confirmed.  The recursion is only removed late via tail-recursion but then
cgraph processing order is unfortunate in the sense that we don't have a
IPA phase pass after optimizations and thus dead functions are only
removed reliably outside of (original) cgraph cycles.

For multiple reasons we want to be able to separate actual assembly
output from assembly production thus eventually a per symtab node
assembler fragment and late "IPA" assembling of the assembler file
might help here.