JS Backend add simple optimizer
This MR changes some simple optimizations and is a first step in re-architecting the JS backend pipeline to add the optimizer. In particular it:
- removes simple peep hole optimizations from
GHC.StgToJS.Printerand removes that module - adds module
GHC.JS.Opt - defines the same peep hole opts that were removed only now they are
Syntax -> Syntaxtransformations rather thanSyntax -> JS codeoptimizations - hooks the optimizer into code gen
Working Ticket:
Related MRs:
- MR !10142 (closed)
- MR !10000
Left before ready:
-
squash with good commit message -
CI passes -
Cleanup and docs in GHC.JS.Optimizer
--- Post review
-
remove unsafe ops -
alter code gen to generate the right code ( Forinstead ofWhile,FuncStatinstead ofvar func..) -
use CPS style
Edited by jeffrey young