Write dce'ed output with method-level granularity.

This completes the first version of the type-aware dead
code elimination.