grin-compiler / grin

GRIN is a compiler back-end for lazy and strict functional languages with whole program optimization support.
https://grin-compiler.github.io/
1.03k stars 38 forks source link

TypeEnv/HPT based dead code elimination #34

Open csabahruska opened 5 years ago

csabahruska commented 5 years ago

HPT reveals dead/unreachable code. Unreachable values have T_Dead type in the type environment.
Write a transformation to remove all T_Dead values from the program. It is required or LLVM codegen because it can not handle T_Dead types.