#4308: LLVM compiles Updates.cmm badly
---------------------------------+------------------------------------------
Reporter: dterei | Owner: dterei
Type: bug | Status: new
Priority: normal | Milestone: 7.2.1
Component: Compiler (LLVM) | Version: 6.13
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: x86_64 (amd64) | Failure: Runtime performance bug
---------------------------------+------------------------------------------
Comment(by simonmar):
Replying to [comment:6 dterei]:
> So how to fix? well could try to change the semantics of 'undef' in
LLVM. But that seems a risky approach as I don't think the LLVM developers
will want to do that. Also there is a better way. We change the Cmm
representation to carry with all calls and jumps the live STG register
information. Then I don't need to keep passing the stg registers around
for every call and can free up some registers for intermediate code. Also
will need to stop the saving and restoring of caller save variables being
done in Cmm and let LLVM do it instead.
Yes, we do need to do this, and we've discussed doing it in the new
backend, but if you have to wait for that it could be a while.
Why not in the meantime propagate the information about dead STG registers
yourself, from the foreign call to the final downstream tail-calls?
Presumably this could be done with a pass over the LLVM intermediate code.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4308#comment:7>
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