Compacting GC interacting with new codegen strangely

Edward Z. Yang ezyang at MIT.EDU
Fri Mar 11 03:57:03 CET 2011


It looks like this change causes the assignment to be emitted before
the initial assignment, which is all quite puzzling to me.

Edward

Excerpts from Edward Z. Yang's message of Wed Mar 09 20:46:12 -0500 2011:
> OK, I looked more closely at my previous attempted solution, but I couldn't
> get it to work:
> 
>     regIdInfo :: Id -> LambdaFormInfo -> LocalReg -> FCode CgIdInfo
>     regIdInfo id lf_info reg = do
>       emit $ mkAssign (CmmLocal reg) (addDynTag (CmmReg (CmmLocal reg)) (lfDynTag lf_info))
>       return (mkCgIdInfo id lf_info (CmmReg (CmmLocal reg)))
> 
> I converted regIdInfo into the FCode monad, added a statement to tag the passed
> in register and then return just that register (not a modified expression).
> Unfortunately, this doesn't work.  Would you happen to know what particular
> invariant I've stepped on?  (regIdInfo is used in three places: StgCmmCon.hs
> and twice in StgCmmBind.hs)
> 
> Edward



More information about the Cvs-ghc mailing list