Skip to content
Snippets Groups Projects
  • Simon Peyton Jones's avatar
    5124b04f
    Drop dead Given bindings in setImplicationStatus · 5124b04f
    Simon Peyton Jones authored
    Trac #13032 pointed out that we sometimes generate unused
    bindings for Givens, and (worse still) we can't always discard
    them later (we don't drop a case binding unless we can prove
    that the scrutinee is non-bottom.
    
    It looks as if this may be a major reason for the performace
    problems in #14338 (see comment:29).
    
    This patch fixes the problem at source, by pruning away all the
    dead Givens.  See Note [Delete dead Given evidence bindings]
    
    Remarkably, compiler allocation falls by 23% in
    perf/compiler/T12227!
    
    I have not confirmed whether this change actualy helps with
    
    (cherry picked from commit 954cbc7c)
    5124b04f
    History
    Drop dead Given bindings in setImplicationStatus
    Simon Peyton Jones authored
    Trac #13032 pointed out that we sometimes generate unused
    bindings for Givens, and (worse still) we can't always discard
    them later (we don't drop a case binding unless we can prove
    that the scrutinee is non-bottom.
    
    It looks as if this may be a major reason for the performace
    problems in #14338 (see comment:29).
    
    This patch fixes the problem at source, by pruning away all the
    dead Givens.  See Note [Delete dead Given evidence bindings]
    
    Remarkably, compiler allocation falls by 23% in
    perf/compiler/T12227!
    
    I have not confirmed whether this change actualy helps with
    
    (cherry picked from commit 954cbc7c)
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
VarEnv.hs 21.31 KiB