[m-rev.] trivial diff: disable inlining in robdd.m

Julien Fischer juliensf at cs.mu.OZ.AU
Tue Dec 21 15:03:28 AEDT 2004


Estimated hours taken: 1
Branches: main

Fix one of the problems that is currently preventing the
compiler from building on hosts that compile with
intermodule-optimization enabled.

library/robdd.m:
	Do not inline foreign_procs from this module that refer
	to declarations that are only locally defined, such
	as MR_ROBDD_NODE_TYPE.  Otherwise, the foreign_procs
	may be opt_exported and the compilation of any module
	that opt_imports them will fail because the local
	declarations from library/robdd.m will not be visible.

Julien.

Index: library/robdd.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/robdd.m,v
retrieving revision 1.2
diff -u -r1.2 robdd.m
--- library/robdd.m	15 Dec 2004 06:57:41 -0000	1.2
+++ library/robdd.m	21 Dec 2004 03:49:44 -0000
@@ -818,7 +818,7 @@
 :- func tr(robdd(T)) = robdd(T).
 :- func fa(robdd(T)) = robdd(T).

-:- pragma inline(value/1).
+:- pragma no_inline(value/1).
 :- pragma foreign_proc("C",
 	value(F::in) = (Value::out),
 	[will_not_call_mercury, promise_pure],
@@ -826,7 +826,7 @@
 	Value = (MR_ROBDD_NODE_TYPE) ((MR_ROBDD_node *) F)->value;
 ").

-:- pragma inline(tr/1).
+:- pragma no_inline(tr/1).
 :- pragma foreign_proc("C",
 	tr(F::in) = (Tr::out),
 	[will_not_call_mercury, promise_pure],
@@ -834,7 +834,7 @@
 	Tr = (MR_ROBDD_NODE_TYPE) ((MR_ROBDD_node *) F)->tr;
 ").

-:- pragma inline(fa/1).
+:- pragma no_inline(fa/1).
 :- pragma foreign_proc("C",
 	fa(F::in) = (Fa::out),
 	[will_not_call_mercury, promise_pure],
@@ -927,6 +927,7 @@
 		[]
 	).

+:- pragma no_inline(restrict/2).
 :- pragma foreign_proc("C",
 	restrict(V::in, F::in) = (R::out),
 	[will_not_call_mercury, promise_pure],
@@ -934,6 +935,7 @@
 	R = (MR_ROBDD_NODE_TYPE) MR_ROBDD_restrict(V, (MR_ROBDD_node *) F);
 ").

+:- pragma no_inline(restrict_threshold/2).
 :- pragma foreign_proc("C",
 	restrict_threshold(V::in, F::in) = (R::out),
 	[will_not_call_mercury, promise_pure],
@@ -959,6 +961,7 @@
 % variables in both the Then and Else sub graphs are > Var.

 :- func make_node(var(T), robdd(T), robdd(T)) = robdd(T).
+:- pragma no_inline(make_node/3).
 :- pragma foreign_proc("C",
 	make_node(Var::in, Then::in, Else::in) = (Node::out),
 	[will_not_call_mercury, promise_pure],

--------------------------------------------------------------------------
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