Commit a0a541a8 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Fix Trac #2486: restore the specialiser to a working state

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.
parent 23845e41
......@@ -1191,10 +1191,10 @@ filterCalls :: VarSet -> CallDetails -> CallDetails
-- 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}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment