[MLton] Re: PackWord to/from nonsense

Matthew Fluet fluet at tti-c.org
Thu Jul 9 16:18:27 PDT 2009


On Thu, 9 Jul 2009, Wesley W. Terpstra wrote:
> On Wed, Jul 8, 2009 at 9:23 PM, Wesley W. Terpstra <wesley at terpstra.ca>wrote:
>
>> The shrinker is marking the globals? I don't think I am doing so. Should I
>> also have run this pass on the globals? I wasn't clear on what computations
>> (if any) globals can do.
>
> This is the only open question relevant to the patch being "done" or not.

I doubt that applying the transformation to the globals would have any 
effect.

> I've attached the new (final?) version of the optimization. Ok to commit?

Just a couple of comments:

Index: ssa/combine-conversions.fun
===================================================================
--- ssa/combine-conversions.fun	(revision 0)
+++ ssa/combine-conversions.fun	(revision 0)
+             val f = shrink f
+             (* Clear the mess we've made on the variables *)
+             val () = Function.clear f

You don't need the "Function.clear f"; the "shrink f" will clear all 
properties from the function.

Index: ssa/sources.mlb
===================================================================
--- ssa/sources.mlb	(revision 7211)
+++ ssa/sources.mlb	(working copy)
@@ -54,6 +54,8 @@
     global.fun
     multi.sig
     multi.fun
+   combine-conversions.sig
+   combine-conversions.fun
     constant-propagation.sig
     constant-propagation.fun
     contify.sig

Also add to sources.cm to support SML/NJ build.

Index: ssa/combine-conversions.sig
===================================================================
--- ssa/combine-conversions.sig	(revision 0)
+++ ssa/combine-conversions.sig	(revision 0)
@@ -0,0 +1,21 @@
+(* Copyright (C) 2009 Wesley W. Tersptra.
+ * Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh
+ *    Jagannathan, and Stephen Weeks.
+ * Copyright (C) 1997-2000 NEC Research Institute.

Excess copyright.


Beyond that, it looks good to go.



More information about the MLton mailing list