Simplifier infelicities
In my travels through the optimiser I discovered two small infelicities
-
In OccurAnal the function
occAnalAppwas failing to resetocc_encltoOccVanilla. This omission sometimes resulted in over-pessimistic occurrence information. -
In
Simplify.mkDupableAltswe were building a new alternative likecase e of K a b c -> $j a cbut with no occ-info on a, c. As a result, if
eturned out to beK e1 e2 e3, we'd end up withlet a = e1; c = e3 in $j a cwhich took another Simplifier iteration to turn into
$j e1 e3. I found cases (in compiling GHC itself) where this added entirely-unnecessary Simplifier iterations, which has a bad effect on compiler perf.
Edited by Simon Peyton Jones