In improving the specialiser's data reprsentaion, thus
Mon Apr 28 16:57:11 GMT Daylight Time 2008 simonpj@microsoft.com
* Fix Trac #1969: perfomance bug in the specialiser
I got the sense of a pair of filter functions back to front.
As a result, almost all specialisation opportunities were being
filtered out, and no specialisations were being generated.
Fortunately, dolio notice and reported Trac #2486. The fix is
simple: put the filters the right way roud.
-- Remove any calls that mention the variables
filterCalls bs calls
= mapFM (\_ cs -> filter_calls cs) $
- filterFM (\k _ -> k `elemVarSet` bs) calls
+ filterFM (\k _ -> not (k `elemVarSet` bs)) calls
where
filter_calls :: CallInfo -> CallInfo
- filter_calls = filterFM (\_ (_, fvs) -> fvs `intersectsVarSet` bs)
+ filter_calls = filterFM (\_ (_, fvs) -> not (fvs `intersectsVarSet` bs))
\end{code}