Changes between Version 75 and Version 76 of Commentary/Compiler/NewCodeGen

Sep 5, 2012 8:44:12 AM (3 years ago)

remove old irrelevant stuff


  • Commentary/Compiler/NewCodeGen

    v75 v76  
    8484 * #2253
    8585 * #2289
    87 ----------------------------------
    88 '''Below here is old stuff, mostly out of date'''
    90 == Loose ends as at October 2008 ==
    92 Testing
    93   * Check nofib performance regressions (one or two allocation (odd)); several on time.
    94   * Compile libraries and test
    96 Short term
    97  * Nuke `CmmCPSGen`, `CmmCPS`, and the two `Maybe`s in `CmmInfo` data type.
    98  * Remove `optionallyConvertAndOrCPS` from main pipeline.
    99  * Fix if-then-else special case in `StgCmmExpr`
    100  * Perhaps some obvious CSE opportunities
    101  * We only use one GC entry point, but there should be a bunch of canned ones.
    103  * To `Convention` add `StaticNative` (which does not use R1), and use it appropriately.  Replace `GC` by `gc = Native`.
    104  * Allow .cmx files to come in ''before'' the new pipeline, to aid graceful migration of RTS.
    106 Larger
    107  * Migrate RTS to use procedures
    108  * Explore new calling conventions
    110 Tidying up
    112  * Get rid of SRTs and live-variable info from STG, and from the Core-to-Stg phase.
    113  * Do not split proc-points into separate `CmmProc`. Not a trivial change, because it involves attaching info tables to blocks, not just to `CmmProc`s.
    114  * Nuke old code gen, and associated Cmm cruft
    115  * Simplify dataflow framework, by doing deep rewriting only.  If possible kill `LastExit` (Simon's favourite hate).
    117 == Notes about the state of play in August, 2008 ==
    119 These notes are largely out of date, but I don't want to dump them till we're sure that we've sucked all the juice out of them.
    121  * Code generator: first draft done.
    122  * Control-flow opt: simple ones done
    123    * Common block elimination: done
    124    * Block concatenation: done
    125  * Adams optimisation: currently done in [[GhcFile(compiler/cmm/CmmProcPointZ.hs)]].  The Adams optimization should be divorced from this module and replaced with common-block elimination, to be done after the proc-point transformation.  In principle this combination may be slightly less effective than the current code, since the selection of proc-point protocols is guided by Adams's criteria, but NR thinks it will be easy to get the common, important cases nailed.  Note that the Adams optimization is designed to avoid generating extra continuations in the case of [wiki:Commentary/Compiler/CPS#Branchestocontinuations heap checks after a function call].
    126  * Proc-point analysis and transformation: working, although there is plenty of room for experimentation with the calling conventions at proc points.  In practice NR recommends the following procedure:
    127     * All optional proc points to be generated with no parameters (all live variables on the stack)
    128     * This situation to be remedied when the code generator is reorganized along the lines NR proposed in July 2007, i.e., the register allocator runs on C-- with calls (as opposed to C-- with jumps only) and therefore ''before'' proc-point analysis
    129  * Bypassing proc-point analysis for native back ends: not done.
    130  * Add spill/reload: Implemented to NR's satisfaction in [[GhcFile(compiler/cmm/CmmSpillReload.hs)]], with the proviso that spilling is done to ''abstract'' stack slots rather than real stack positions (see comments below on stack-slot allocation)
    131  * Stack slot allocation: implemented with a greedy algorithm. There is room for improvement here.
    132  * Make stack explicit: done.
    133  * Split into multiple !CmmProcs: done.
    135 !ToDo: main issues
    137  * How do we write continuations in the RTS?  E.g. the update-frame continuation?  Michael Adams had a syntax with two sets of parameters, the the ones on the stack and the return values.
    139  * Review code gen for calls with lots of args.  In the existing codegen we push magic continuations that say "apply the return value to N more args".  Do we want to do this?  !ToDo: how rare is it to have too many args?
    141  * Figure out how PAPs work.  This may interact with the GC check and stack check at the start of a function call.  The concern is how to enter the garbage collector with an infotable that properly describes the live variables. Now that we generate info tables on demand at the end of the pipeline, we can enter the gc with a regular procedure call and expect that the proper info table will be generated.
    143   * Was there something about sinking spills and hoisting reloads?
    146 !ToDo: small issues
    147  * Shall we rename Branch to !GoTo?!
    148  * Change the C-- parser (which parses RTS .cmm files) to directly construct `CmmGraph`. 
    149  * (SLPJ) See let-no-escape todos in `StgCmmExpr`.