functional derefs

Matthew Fluet
Mon, 13 Aug 2001 12:33:57 -0700 (PDT)

For the most part, deref's are not functional, but there might be some
cases where we can analyze them:

   fun L_5474 () [] =
	 val x_7752 = Ref_deref (global_492)
	 val x_7750 = Ref_deref (global_492)
	 val x_7749 = Ref_deref (global_492)
	 val x_7751 = ID_0 (x_7752, x_7487)
	 val x_7748 = (x_7751, x_7750, x_7749)
	 val x_7747 = (global_55, x_7748)

Not that this is particularly bad for the codegen.  It recognizes that all
of the Ref_deref(global_492) are the same memory location, loads it once
into a register and copies that register into two of the destinations and
finally just reassigns that register to the final destination.  But, we do
burn three registers that carry the same value.