diff src/mono_reduce.sml @ 1393:802c179dac1f

alwaysInline .urp setting
author Adam Chlipala <adam@chlipala.net>
date Thu, 13 Jan 2011 18:15:04 -0500
parents 02fc16faecf3
children d328983dc5a6
line wrap: on
line diff
--- a/src/mono_reduce.sml	Thu Jan 13 13:20:14 2011 -0500
+++ b/src/mono_reduce.sml	Thu Jan 13 18:15:04 2011 -0500
@@ -374,12 +374,13 @@
                 TFun (t1, t2) => functionInside' t1 orelse functionInside t2
               | _ => functionInside' t
 
-        fun mayInline (n, e, t) =
+        fun mayInline (n, e, t, s) =
             case IM.find (uses, n) of
                 NONE => false
               | SOME count => count <= 1
                               orelse size e <= Settings.getMonoInline ()
                               orelse functionInside t
+                              orelse Settings.checkAlwaysInline s
 
         fun summarize d (e, _) =
             let
@@ -711,7 +712,7 @@
                 let
                     val eo = case eo of
                                  NONE => NONE
-                               | SOME e => if mayInline (n, e, t) then
+                               | SOME e => if mayInline (n, e, t, s) then
                                                SOME e
                                            else
                                                NONE