[m-dev.] diff: work around LLDS back-end bug
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Dec 21 14:09:33 AEDT 2000
Estimated hours taken: 2
compiler/ml_elim_nested.m:
Comment out some clauses that just called `fail'.
This aim of this change is to work around a bug in the
LLDS back-end, which was miscompiling this file
(on dec-alpha-osf3.2, with -O5 --opt-space).
Workspace: /home/pgrad/fjh/ws/hg
Index: compiler/ml_elim_nested.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_elim_nested.m,v
retrieving revision 1.19
diff -u -d -r1.19 ml_elim_nested.m
--- compiler/ml_elim_nested.m 2000/11/21 13:37:43 1.19
+++ compiler/ml_elim_nested.m 2000/12/21 02:23:19
@@ -1142,7 +1142,7 @@
:- pred defn_body_contains_defn(mlds__entity_defn, mlds__defn).
:- mode defn_body_contains_defn(in, out) is nondet.
-defn_body_contains_defn(mlds__data(_Type, _Initializer), _Defn) :- fail.
+% defn_body_contains_defn(mlds__data(_Type, _Initializer), _Defn) :- fail.
defn_body_contains_defn(mlds__function(_PredProcId, _Params, MaybeBody),
Name) :-
maybe_statement_contains_defn(MaybeBody, Name).
@@ -1161,7 +1161,7 @@
:- pred maybe_statement_contains_defn(maybe(mlds__statement), mlds__defn).
:- mode maybe_statement_contains_defn(in, out) is nondet.
-maybe_statement_contains_defn(no, _Defn) :- fail.
+% maybe_statement_contains_defn(no, _Defn) :- fail.
maybe_statement_contains_defn(yes(Statement), Defn) :-
statement_contains_defn(Statement, Defn).
@@ -1233,8 +1233,8 @@
:- pred default_contains_defn(mlds__switch_default, mlds__defn).
:- mode default_contains_defn(in, out) is nondet.
-default_contains_defn(default_do_nothing, _) :- fail.
-default_contains_defn(default_is_unreachable, _) :- fail.
+% default_contains_defn(default_do_nothing, _) :- fail.
+% default_contains_defn(default_is_unreachable, _) :- fail.
default_contains_defn(default_case(Statement), Defn) :-
statement_contains_defn(Statement, Defn).
@@ -1287,7 +1287,7 @@
:- pred initializer_contains_var(mlds__initializer, mlds__var).
:- mode initializer_contains_var(in, in) is semidet.
-initializer_contains_var(no_initializer, _) :- fail.
+% initializer_contains_var(no_initializer, _) :- fail.
initializer_contains_var(init_obj(Rval), Name) :-
rval_contains_var(Rval, Name).
initializer_contains_var(init_struct(Inits), Name) :-
@@ -1300,7 +1300,7 @@
:- pred maybe_statement_contains_var(maybe(mlds__statement), mlds__var).
:- mode maybe_statement_contains_var(in, in) is semidet.
-maybe_statement_contains_var(no, _) :- fail.
+% maybe_statement_contains_var(no, _) :- fail.
maybe_statement_contains_var(yes(Statement), Name) :-
statement_contains_var(Statement, Name).
@@ -1388,15 +1388,15 @@
:- pred default_contains_var(mlds__switch_default, mlds__var).
:- mode default_contains_var(in, in) is semidet.
-default_contains_var(default_do_nothing, _) :- fail.
-default_contains_var(default_is_unreachable, _) :- fail.
+% default_contains_var(default_do_nothing, _) :- fail.
+% default_contains_var(default_is_unreachable, _) :- fail.
default_contains_var(default_case(Statement), Name) :-
statement_contains_var(Statement, Name).
:- pred atomic_stmt_contains_var(mlds__atomic_statement, mlds__var).
:- mode atomic_stmt_contains_var(in, in) is semidet.
-atomic_stmt_contains_var(comment(_), _Name) :- fail.
+% atomic_stmt_contains_var(comment(_), _Name) :- fail.
atomic_stmt_contains_var(assign(Lval, Rval), Name) :-
( lval_contains_var(Lval, Name)
; rval_contains_var(Rval, Name)
@@ -1423,8 +1423,8 @@
lval_contains_var(Lval, Name).
trail_op_contains_var(reset_ticket(Rval, _Reason), Name) :-
rval_contains_var(Rval, Name).
-trail_op_contains_var(discard_ticket, _Name) :- fail.
-trail_op_contains_var(prune_ticket, _Name) :- fail.
+% trail_op_contains_var(discard_ticket, _Name) :- fail.
+% trail_op_contains_var(prune_ticket, _Name) :- fail.
trail_op_contains_var(mark_ticket_stack(Lval), Name) :-
lval_contains_var(Lval, Name).
trail_op_contains_var(prune_tickets_to(Rval), Name) :-
@@ -1433,10 +1433,10 @@
:- pred target_code_component_contains_var(target_code_component, mlds__var).
:- mode target_code_component_contains_var(in, in) is semidet.
-target_code_component_contains_var(raw_target_code(_Code), _Name) :-
- fail.
-target_code_component_contains_var(user_target_code(_Code, _Context), _Name) :-
- fail.
+%target_code_component_contains_var(raw_target_code(_Code), _Name) :-
+% fail.
+%target_code_component_contains_var(user_target_code(_Code, _Context), _Name) :-
+% fail.
target_code_component_contains_var(target_code_input(Rval), Name) :-
rval_contains_var(Rval, Name).
target_code_component_contains_var(target_code_output(Lval), Name) :-
@@ -1455,7 +1455,7 @@
:- pred maybe_rval_contains_var(maybe(mlds__rval), mlds__var).
:- mode maybe_rval_contains_var(in, in) is semidet.
-maybe_rval_contains_var(no, _Name) :- fail.
+% maybe_rval_contains_var(no, _Name) :- fail.
maybe_rval_contains_var(yes(Rval), Name) :-
rval_contains_var(Rval, Name).
@@ -1466,7 +1466,7 @@
lval_contains_var(Lval, Name).
rval_contains_var(mkword(_Tag, Rval), Name) :-
rval_contains_var(Rval, Name).
-rval_contains_var(const(_Const), _Name) :- fail.
+% rval_contains_var(const(_Const), _Name) :- fail.
rval_contains_var(unop(_Op, Rval), Name) :-
rval_contains_var(Rval, Name).
rval_contains_var(binop(_Op, X, Y), Name) :-
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list