[m-rev.] for review: stack slot optimization, part 5

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Mar 13 22:14:05 AEDT 2002


On 09-Mar-2002, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> Index: compiler/stack_opt.m
...
> +% The opt_stack_alloc structure is constructed by  XXX

That comment is incomplete.

> +optimize_live_sets_in_par_conj([]) --> [].
> +optimize_live_sets_in_par_conj([Goal | Goals]) -->
> +	% XXX
> +	optimize_live_sets_in_par_conj(Goals),
> +	optimize_live_sets_in_goal(Goal).

What is that XXX for?

> +leave_branch_start(_BranchConstruct, StartArchor, BeforeId, MaybeResumeVars,
> +		OpenIntervals) -->
> +		% XXX order
> +	record_interval_end(BeforeId, StartArchor),

Likewise?

> +record_interval_vars(Id, NewVars, OptInfo0, OptInfo) :-
> +	VarsMap0 = OptInfo0 ^ interval_vars,
> +	% XXX should be map__lookup
> +	( map__search(VarsMap0, Id, Vars0) ->
> +		Vars = set__insert_list(Vars0, NewVars),
> +		map__det_update(VarsMap0, Id, Vars, VarsMap)
> +	;
> +		set__list_to_set(NewVars, Vars),
> +		map__det_insert(VarsMap0, Id, Vars, VarsMap)
> +	),

Why isn't it map__lookup?

Otherwise this part looks fine.
I didn't review stack_opt.m very closely.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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