Moved global register saving from the backend to codeGen
authorMichael D. Adams <t-madams@microsoft.com>
Fri, 25 May 2007 19:38:04 +0000 (19:38 +0000)
committerMichael D. Adams <t-madams@microsoft.com>
Fri, 25 May 2007 19:38:04 +0000 (19:38 +0000)
commitbd3a364da7956c269d31645995d0d775c52f6a84
treeaf6ad223fc9286190afb80ba8f6847342004a764
parent21bc3ec7555c996ce3a5d8a620831e7758f5f7e9
Moved global register saving from the backend to codeGen

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.
compiler/cmm/Cmm.hs
compiler/cmm/CmmLint.hs
compiler/cmm/CmmOpt.hs
compiler/cmm/PprC.hs
compiler/cmm/PprCmm.hs
compiler/codeGen/CgForeignCall.hs
compiler/codeGen/CgUtils.hs
compiler/nativeGen/AsmCodeGen.lhs
compiler/nativeGen/MachCodeGen.hs
compiler/nativeGen/MachRegs.lhs