#5598: Function quotRem is inefficient
----------------------------------------------+-----------------------------
Reporter: boris | Owner: igloo
Type: task | Status: new
Priority: normal | Milestone: 7.6.1
Component: Compiler | Version: 7.0.3
Keywords: division, performance, primop | Os: Unknown/Multiple
Architecture: x86 | Failure: Runtime
performance bug
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
----------------------------------------------+-----------------------------
Comment(by simonpj):
Thanks for looking at this. And thank you for checking about the design.
I have some concerns:
* I'm against having a `MachOp` that returns two results. As you point
out we’d then need a `CmmType` for a multiple value, and that has knock-on
consequences that are far reaching and hard to forsee.
* Likewise I’d really like to avoid adding `CmmAssign2`.
* Instead, I suggest we use `CmmNode.CmmUnsafeForeignCall`. That is
already set up to be a “fat machine instruction”, and already has multiple
results. I see no difficulty with this path; it just means adding a
`CallishMachOp`.
I'm not sure exactly what the equivalent in the old codegen path is, but
it'd be ok for the new story to work well only in the new path.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5598#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs