compiler plugin pass order

Ben Gamari ben at smart-cactus.org
Mon Sep 16 17:59:20 UTC 2019


Anton Antich <anton.antich at gmail.com> writes:

> Dear all,
>
> we started exploring Haskell-to-DotNet compiler in frames of a larger
> project and would like to clarify one issue: is it possible to control the
> order in the compilation pipeline in which the compiler plugins get called?
> Inserting .Net compilation via Plugin seems a cleaner way than using GHC
> API from scratch for a lot of reasons, but the challenge is as follows: we
> compile from STG but inside the plugin core2core passes have not been
> called yet, and without them some important optimizations are missing.
>
Just so we are all on the same page: Precisely what type of plugin are
you implementing?

If it's a Core plugin then you should be able install your plugin
anywhere in the list of CoreToDos given to the installCoreToDos
function.

Cheers,

- Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20190916/92048699/attachment.sig>


More information about the ghc-devs mailing list