trivial diff: deforestation + pragma no_inline

Simon Taylor stayl at cs.mu.OZ.AU
Tue Nov 3 15:51:10 AEDT 1998



Estimated hours taken: 0.1

compiler/deforest.m:
	Respect `:- pragma no_inline(...)' declarations.	


Index: deforest.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/deforest.m,v
retrieving revision 1.5
diff -u -t -u -r1.5 deforest.m
--- deforest.m	1998/09/10 06:38:20	1.5
+++ deforest.m	1998/10/29 21:55:43
@@ -594,7 +594,22 @@
                 % The depth limit was exceeded. This should not
                 % occur too often in practice - the depth limit
                 % is just a safety net.
-                pd_debug__message("\n\n*****Depth limit exceeded*****\n\n", []),
+                pd_debug__message("\n\n*****Depth limit exceeded*****\n\n",
+                        []),
+                { ShouldTry = no }
+        ;
+                % Check whether either of the goals to be
+                % deforested can't be inlined.
+                ( 
+                        { EarlierGoal = call(PredId, _, _, _, _, _) - _ }
+                ;
+                        { LaterGoal = call(PredId, _, _, _, _, _) - _ }
+                ),
+                { module_info_pred_info(ModuleInfo, PredId, PredInfo) },
+                { pred_info_get_markers(PredInfo, Markers) },
+                { check_marker(Markers, no_inline) }
+        ->
+                pd_debug__message("non-inlineable calls\n", []),                
                 { ShouldTry = no }
         ;
                 %



More information about the developers mailing list