Add an unreachable code elimination pass.
The register allocator doesn't even try to compile unreachable EBBs, so any values defined in such blocks won't be assigned registers. Since the dominator tree already has determined which EBBs are reachable, we should just eliminate any unreachable blocks instead o trying to do something with the dead code. Not that this is not a "dead code elimination" pass which would also remove individual instructions whose results are not used.
This commit is contained in:
@@ -42,4 +42,5 @@ mod scoped_hash_map;
|
||||
mod simple_gvn;
|
||||
mod stack_layout;
|
||||
mod topo_order;
|
||||
mod unreachable_code;
|
||||
mod write;
|
||||
|
||||
Reference in New Issue
Block a user