performance bug
Simon TAYLOR
stayl at students.cs.mu.oz.au
Tue Jun 17 14:55:07 AEST 1997
On mercury-bugs, Fergus wrote:
> There is a bug with intermodule optimization: it is including
> lots of dead code in the generated .c files, for functions
> which are defined in other modules but never used.
> For example, the text size of library/library.o is about 50k, whereas
> it ought to be less than 1k.
This is caused by using the wrong version of a module_info
in dead_proc_elim.m.
There is a performance problem with inter-module optimization in that
it performs analysis on all predicates imported from `.opt' files,
not just the ones that are used in the current module. I'll fix that
one soon.
Estimated hours taken: 0.5
compiler/dead_proc_elim.m
Dead procedure elimination was claiming to remove dead procedures
but wasn't actually removing them due to using the wrong version
of a module_info.
Index: dead_proc_elim.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/dead_proc_elim.m,v
retrieving revision 1.28
diff -u -r1.28 dead_proc_elim.m
--- dead_proc_elim.m 1997/06/12 04:23:07 1.28
+++ dead_proc_elim.m 1997/06/17 04:19:03
@@ -440,7 +440,7 @@
module_info_base_gen_infos(ModuleInfo2, BaseGenInfos0),
dead_proc_elim__eliminate_base_gen_infos(BaseGenInfos0, Needed,
BaseGenInfos),
- module_info_set_base_gen_infos(ModuleInfo1, BaseGenInfos, ModuleInfo).
+ module_info_set_base_gen_infos(ModuleInfo2, BaseGenInfos, ModuleInfo).
% eliminate any unused procedures for this pred
More information about the developers
mailing list