-
Simon Peyton Jones authored
When inlining, we are making a copy of the expression, so we have to be careful about duplicating work. Previously we were using exprIsCheap for that, but it is willing to duplicate a cheap primop -- and that is terribly bad if it happens inside some inner array loop (Trac #5623). So now we use a new function exprIsWorkFree. Even then there is some wiggle room: see Note [exprIsWorkFree] in CoreUtils This commit does make wheel-sieve1 allocate a lot more, but we decided that's just tough; it's more important for inlining to be robust about not duplicating work.
2112f43c