Skip to content
Snippets Groups Projects
Commit edaa9e08 authored by ram's avatar ram
Browse files

Added code to LOCAL-CALL-ANALYZE to delete functions that were never

referenced.
parent 2b3407fb
No related branches found
No related tags found
No related merge requests found
......@@ -260,12 +260,18 @@
(loop
(unless (component-new-functions component) (return))
(let ((fun (pop (component-new-functions component))))
(unless (eq (functional-kind fun) :deleted)
(when (lambda-p fun)
(push fun (component-lambdas component)))
(local-call-analyze-1 fun)
(when (lambda-p fun)
(maybe-let-convert fun)))))
(cond ((eq (functional-kind fun) :deleted))
((and (null (leaf-refs fun))
(ecase (functional-kind fun)
((nil :escape :cleanup) t)
((:optional :top-level) nil)))
(delete-functional fun))
(t
(when (lambda-p fun)
(push fun (component-lambdas component)))
(local-call-analyze-1 fun)
(when (lambda-p fun)
(maybe-let-convert fun))))))
(undefined-value))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment