Currently, we build up a reachability map as a pre-pass and then use this to avoid emitting metadata we don't have to emit. I was wondering if it would be possible instead to emit the metadata in a "DFS" fashion, wherein we never build a reachability map but instead just start by emitting metadata for exported/inlined things and then gradually emit metadata for other things that are referenced from those.
@marijnh does this seem plausible or is there an obvious reason it wouldn't work?
Currently, we build up a reachability map as a pre-pass and then use this to avoid emitting metadata we don't have to emit. I was wondering if it would be possible instead to emit the metadata in a "DFS" fashion, wherein we never build a reachability map but instead just start by emitting metadata for exported/inlined things and then gradually emit metadata for other things that are referenced from those.
@marijnh does this seem plausible or is there an obvious reason it wouldn't work?