From ccf4e35bb5a461b0ec54a5caad5384b39541881c Mon Sep 17 00:00:00 2001 From: Zoltan Somogyi Date: Fri, 19 Jan 2001 01:42:29 +0000 Subject: [PATCH] Document unneeded_code.m. Estimated hours taken: 0.1 compiler/notes/compiler_design.html: Document unneeded_code.m. --- compiler/notes/compiler_design.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/compiler/notes/compiler_design.html b/compiler/notes/compiler_design.html index 0065228ab..a681ae41d 100644 --- a/compiler/notes/compiler_design.html +++ b/compiler/notes/compiler_design.html @@ -580,7 +580,12 @@ Most of the remaining HLDS-to-HLDS transformations are optimizations:
  • issue warnings about unused arguments from predicates, and create specialized versions without them (unused_args.m); type_infos are - often unused. + +
  • unneeded_code.m looks for goals whose results are either not needed + at all, or needed in some branches of computation but not others. Provided + that the goal in question satisfies some requirements (e.g. it is pure, + it cannot fail etc), it either deletes the goal or moves it to the + computation branches where its output is needed.
  • elimination of dead procedures (dead_proc_elim.m). Inlining, higher-order specialization and the elimination of unused args can make procedures dead @@ -1184,6 +1189,6 @@ Some of them are obsolete; other are work-in-progress.
    -Last update was $Date: 2000-12-13 12:12:59 $ by $Author: fjh $@cs.mu.oz.au.
    +Last update was $Date: 2001-01-19 01:42:29 $ by $Author: zs $@cs.mu.oz.au.