[GHC] #10137: Rewrite switch code generation
GHC
ghc-devs at haskell.org
Wed Mar 4 23:15:05 UTC 2015
#10137: Rewrite switch code generation
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner:
Type: task | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.9
(CodeGen) | Keywords:
Resolution: | Architecture:
Operating System: Unknown/Multiple | Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by simonpj):
Sounds good. I do think that some work can be done in Core. For example:
{{{
case x of
1# -> e1
2# -> e2
7# -> e1
_ -> e2
}}}
might turn into
{{{
case (x ==# 1# `orI#` x ==# 7#) of
0# -> e2 -- False
1# -> e1 -- True
}}}
I would also '''dearly''' like to implement #8317 to get rid of all those
stupid `tagToEnum#` calls that clutter up the code. We don't do this for
a stupid reason: #8326. As part of your crusade, dealing with this would
be fantastic.
I'd be happy to advise/help.
Simon
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10137#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list