Move everything out
This commit is contained in:
10
Fasto/DeadFunctionRemoval.fs
Normal file
10
Fasto/DeadFunctionRemoval.fs
Normal file
@ -0,0 +1,10 @@
|
||||
module DeadFunctionRemoval
|
||||
|
||||
open AbSyn
|
||||
open CallGraph
|
||||
|
||||
let removeDeadFunction (prog : TypedProg) =
|
||||
let graph = callGraph prog
|
||||
let alive (FunDec (fname, _, _, _, _)) =
|
||||
fname = "main" || calls "main" fname graph
|
||||
List.filter alive prog
|
Reference in New Issue
Block a user