
#15569: Constant folding optimises 1 into 3 -------------------------------------+------------------------------------- Reporter: snowleopard | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: 8.6.1 Component: Compiler | Version: 8.6.1-beta1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9136 | Differential Rev(s): Phab:D5109 Wiki Page: | -------------------------------------+------------------------------------- Comment (by sgraf): @jean, I'm not particularly invested in the field, but on page 6 in the report I linked there is a table of superoptimizers (I confused these with supercompilation in the past, which is totally different), the respective papers of which might be a good start. In particular, everything doing "synthesis" is probably fueled by an SMT solver. I think the essence boils down to formalising source and target language (which should be same algebraic structure in our example) and let the SMT solver synthesize a RHS to a given LHS expression which has minimal cost wrt. some metric. This seems like the most recent approach: https://arxiv.org/pdf/1711.04422.pdf -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15569#comment:22 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler