inline

Matthew Fluet Matthew Fluet <fluet@CS.Cornell.EDU>
Mon, 5 Nov 2001 20:01:58 -0500 (EST)


> > So, I can run through the assembly and remove any statement that
> > references an label that isn't reachable; such statements should
> > presumably be dead code.  Or, we can just live with this in the short term
> > and assume that such massive amounts of dead code don't make it back to
> > the codegen.
> 
> I think the problem is in your DFS.  It should count L_6365 as
> reachable because it appears in a reachable SetHandler statement.

Well, in the x86-codegen world, there aren't distinguished SetHandler
statements.  All I see are statements that happen to have immediate
labels in their srcs.  To keep things reasonable, I inherit the transfers
from Machine IL that indicate the handler for non-tail calls; that way,
for CFG traversals, I just need to look at the Transfer.t.  The
alternative is to walk through all of the statements each time.