
#8905: Function arguments are always spilled/reloaded if scrutinee is already in WHNF --------------------------------------------+------------------------------ Reporter: tibbe | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime performance bug | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: --------------------------------------------+------------------------------ Comment (by simonpj): I'm puzzled by why the spill code is before the eval check rather than after. Before spilling etc I'd expect to see: {{{ ... if <eval check> goto Leval else goto Ldone Leval: call (I64[R1])(R1) returns to Ldone Ldone: // Now it's evaluated }}} Then the stack-layout stuff should insert spills and reloads ''around the call'', but not interfering with the fast path. So how come the spills affect the fast path at all? Is there some special code-size-saving magic in the code generator? Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8905#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler