Changes between Version 8 and Version 9 of NewPlugins


Ignore:
Timestamp:
Jan 17, 2011 10:25:05 PM (4 years ago)
Author:
thoughtpolice
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NewPlugins

    v8 v9  
    143143}}} 
    144144 
     145`backend` is expected, roughly, to produce some intermediate code of some sort (like .S files for GNU as or .bc for LLVM.) 
     146 
    145147Modifications to compiler pipeline: 
    146148 
     
    151153 * Modify `compiler/main/CodeOutput.lhs` to invoke the plugin callback. 
    152154  * Plugin-based backends should automatically prioritize over built-in backends (i.e., if it gets loaded through `-fplugin`, it is gettin' used no question?) 
     155 * `DriverPipeline` needs to be aware of how to integrate a new backend into the overall compilation phase - for example, see `compiler/main/DriverPipeline.hs`, specifically  
     156   `runPhase` which does things like running the LLVM optimizer, compiler and LLVM mangler when the LLVM backend is invoked. Afterwords, the assembler is invoked on the  
     157   resultant object files. 
     158  * Even though normally the backends are responsible for the code generation up to but not including linking, the Cmm backends need to have some concept of how to link together the final resultant program, and GHC needs to give it that information.