• Michael D. Adams's avatar
    Moved global register saving from the backend to codeGen · bd3a364d
    Michael D. Adams authored
    This frees the Cmm data type from keeping a list of live global registers
    in CmmCall which helps prepare for the CPS conversion phase.
    
    CPS conversion does its own liveness analysis and takes input that should
    not directly refer to parameter registers (e.g. R1, F5, D3, L2).  Since
    these are the only things which could occur in the live global register
    list, CPS conversion makes that field of the CmmCall constructor obsolite.
    
    Once the CPS conversion pass is fully implemented, global register saving
    will move from codeGen into the CPS pass.  Until then, this patch
    is worth scrutinizing and testing to ensure it doesn't cause any performance
    or correctness problems as the code passed to the backends by the CPS
    converting will look very similar to the code that this patch makes codeGen
    pass to the backend.
    bd3a364d
CmmLint.hs 5.27 KB