
#14791: Move stack checks out of code paths that don't use the stack. -------------------------------------+------------------------------------- Reporter: AndreasK | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 (CodeGen) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by AndreasK): There are a number of similar issues already on Trac, although mostly about Heap instead of Stack usage: * #8326 Place heap checks common in case alternatives before the case * #12231 Eliminate redundant heap allocations/deallocations * #1498 Optimisation: eliminate unnecessary heap check in recursive function #8326 is about moving heap checks out of case alternatives by checking for the maximum needed for all branches. While it does the opposite of this issue it contains a lot of good discussion already. #12231 Is a **very** similar issue but for heap checks. #1498 Also sounds like it involves the same moving parts. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14791#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler