[PATCH] Middle-end dead code elimination

Diego Novillo dnovillo@redhat.com
Thu Apr 17 16:45:00 GMT 2003


On Thu, Apr 17, 2003 at 05:13:30PM +0100, Joern Rennecke wrote:
> > Yes, the linearizer should be removing them, but the point is to avoid
> generating thousands of useless blocks to begin with.
> 
> It seems to me the most straightforward way to achieve this is to do a
> little bit of optimization on the saved tree of an inlined function, before
> it is used for any inlineing.  Thus, when you have 8000 destructor calls
> inlined, you optimize all 8000 for the price of one.  Moreover, after this
> optimization, we can gauge the number of instructions in the to-be-inlined
> function more exactly.
>
With the new call-graph based inliner we already do that in most
cases.  It's one of the reasons why we have needed to fix various
things in the flowgraph builder (we weren't handling empty
statements very gracefully).


Diego.



More information about the Gcc-patches mailing list