[m-rev.] diff: enable constant propagation in .profdeep grades
Julien Fischer
juliensf at cs.mu.OZ.AU
Wed Aug 3 18:03:44 AEST 2005
Estimated hours taken: 0.5
Branches: main, release
Allow constant propagation to be run in deep profiling grades.
There's no reason not to run it, and doing so eliminates irrelevant
information from profiles, e.g appending of constant strings etc.
(We possibly use to allow this anyway, but the changes to the
way inlining is handled in the compiler disabled it; on the other
hand the deep profiling grades were broken for quite a while so
it's also possible we did not.)
compiler/handle_options.m:
Allow constant propagation in deep profiling grades.
Julien.
Index: compiler/handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.232
diff -u -r1.232 handle_options.m
--- compiler/handle_options.m 8 Jul 2005 04:22:02 -0000 1.232
+++ compiler/handle_options.m 3 Aug 2005 03:33:15 -0000
@@ -1042,9 +1042,23 @@
% don't work with -ansi.
option_implies(parallel, ansi_c, bool(no)),
- % `--constant-propagation' effectively inlines builtins.
option_neg_implies(inline_builtins, constant_propagation, bool(no)),
- option_neg_implies(allow_inlining, constant_propagation, bool(no)),
+
+ % `--constant-propagation' effectively inlines builtins.
+ %
+ % We want to allow constant propagation in deep profiling grades,
+ % so '--no-allow-inlining' should not cause it to be disabled.
+ % (Other forms of inlining must be disabled for deep profiling.)
+ %
+ % '--no-allow-inlining' should imply '--no-constant-propagation'
+ % otherwise, e.g. when tracing is enabled.
+ %
+ ( { ProfileDeep = no } ->
+ option_neg_implies(allow_inlining, constant_propagation,
+ bool(no))
+ ;
+ []
+ ),
% --no-reorder-conj implies --no-deforestation,
% --no-constraint-propagation and --no-local-constraint-propagation.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list