summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmSpillReload.hs
Commit message (Collapse)AuthorAgeFilesLines
* Replacing copyins and copyouts with data-movement instructionsdias@eecs.harvard.edu2008-05-291-33/+28
| | | | | | | | | | | | | | o Moved BlockId stuff to a new file to avoid module recursion o Defined stack areas for parameter-passing locations and spill slots o Part way through replacing copy in and copy out nodes - added movement instructions for stack pointer - added movement instructions for call and return parameters (but not with the proper calling conventions) o Inserting spills and reloads for proc points is now procpoint-aware (it was relying on the presence of a CopyIn node as a proxy for procpoint knowledge) o Changed ZipDataflow to expect AGraphs (instead of being polymorphic in the type of graph)
* Cmm back end upgradesdias@eecs.harvard.edu2008-05-291-104/+131
| | | | | | | | | | | | | | | | | | | | | Several changes in this patch, partially bug fixes, partially new code: o bug fixes in ZipDataflow - added some checks to verify that facts converge - removed some erroneous checks of convergence on entry nodes - added some missing applications of transfer functions o changed dataflow clients to use ZipDataflow, making ZipDataflow0 obsolete o eliminated DFA monad (no need for separate analysis and rewriting monads with ZipDataflow) o started stack layout changes - no longer generating CopyIn and CopyOut nodes (not yet fully expunged though) - still not using proper calling conventions o simple new optimizations: - common block elimination -- have not yet tried to move the Adams opt out of CmmProcPointZ - block concatenation o piped optimization fuel up to the HscEnv - can be limited by a command-line flag - not tested, and probably not yet properly used by clients o added unique supply to FuelMonad, also lifted unique supply to DFMonad
* minor changes to Cmm left over from September 2007Norman Ramsey2008-05-031-2/+3
| | | | | | | Nothing too deep here; primarily tinking with prettyprinting and names. Also eliminated some warnings. This patch covers most (but not all) of the code NR changed at the very end of September 2007, just before ICFP hit...
* Make the instance of DebugNodes more H98-likesimonpj@microsoft.com2008-01-041-1/+1
|
* move and generalize another instance (#1405)Isaac Dupree2007-12-261-3/+0
| | | | | | | | | | | was instance Outputable CmmGraph type CmmGraph = LGraph Middle Last now instance (ctx) => Outputable (LGraph m l), in module with LGraph where it belongs This also let us reduce the context of DebugNodes to Haskell98, leaving that class's only extension being multi-parameter. (also Outputable (LGraph M Last) with M = ExtendWithSpills Middle was another redundant instance that was then removed)
* massive convulsion in ZipDataflowNorman Ramsey2007-09-211-13/+30
| | | | | | | | | | After my talk, I got the idea of 'shallow rewriting' for the dataflow framework. Here it is implemented, along with some related ideas late making Graph and not LGraph primary. The only bad thing is that the whole bit is stitched together out of ill-fitting pieces, kind of like Frankenstein's monster. A new ZipDataflow will rise out of the ashes.
* added node to push a closure onto the current call contextNorman Ramsey2007-09-171-0/+1
|
* tightened some dataflow code as part of preparing a talkNorman Ramsey2007-09-171-17/+28
|
* reloads are now sunk as deep as possibleNorman Ramsey2007-09-151-3/+65
|
* get rid of MidNopNorman Ramsey2007-09-151-2/+1
|
* tidying cmm/CmmSpillReload.hsNorman Ramsey2007-09-131-16/+12
|
* remove remaining redundancies from ZipCfgCmmRepNorman Ramsey2007-09-121-3/+3
| | | | | | | -- LastBranch no longer takes parameters -- LastJump and LastReturn no longer carry CmmActuals; instead, those are carried by a CopyOut in the same basic block
* Remove warning flags from individual compiler modulesIan Lynagh2007-09-121-1/+0
| | | | We now set the flags once and for all in compiler/Makefile.
* change the zipper representation of callsNorman Ramsey2007-09-121-7/+7
| | | | | | | | | | | | | | | This patch combines two changes: 1. As requested by SimonPJ, the redundancy inherent in having LastCall bear actual parameters has been removed. The actual parameters are now carried by a separate CopyOut node. 2. The internal (to zipper) representation of calls has changed; the representation of calling conventions is more orthogonal, and there is now no such thing as a 'safe' or 'final' call to a CallishMachOp. This change has affected the interface to MkZipCfgCmm, which now provides a static guarantee. Simon's new upstream code will be affected; I've patched the existing code in CmmCvt (which becomes ever hairier).
* split the CmmGraph constructor interface from the representationNorman Ramsey2007-09-111-1/+1
| | | | | | | Interface MkZipCfgCmm should now be sufficient for all construction needs, though some identifiers are re-exported from (and explained in) MkZipCfg. ZipCfgCmmRep should be used only by modules involved in analysis, optimization, or translation of Cmm programs.
* no registers are available after a callNorman Ramsey2007-09-071-0/+1
|
* wrote an analysis to help in sinking Reload instructionsNorman Ramsey2007-09-071-16/+69
|
* a good deal of salutory renamingNorman Ramsey2007-09-071-9/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've renamed a number of type and data constructors within Cmm so that the names used in the compiler may more closely reflect the C-- specification 2.1. I've done a bit of other renaming as well. Highlights: CmmFormal and CmmActual now bear a CmmKind (which for now is a MachHint as before) CmmFormals = [CmmFormal] and CmmActuals = [CmmActual] suitable changes have been made to both code and nonterminals in the Cmm parser (which is as yet untested) For reasons I don't understand, parts of the code generator use a sequence of 'formal parameters' with no C-- kinds. For these we now have the types type CmmFormalWithoutKind = LocalReg type CmmFormalsWithoutKinds = [CmmFormalWithoutKind] A great many appearances of (Tau, MachHint) have been simplified to the appropriate CmmFormal or CmmActual, though I'm sure there are more opportunities. Kind and its data constructors are now renamed to data GCKind = GCKindPtr | GCKindNonPtr to avoid confusion with the Kind used in the type checker and with CmmKind. Finally, in a somewhat unrelated bit (and in honor of Simon PJ, who thought of the name), the Whalley/Davidson 'transaction limit' is now called 'OptimizationFuel' with the net effect that there are no longer two unrelated uses of the abbreviation 'tx'.
* adding new files to do with new cmm functionalityNorman Ramsey2007-09-071-0/+231