beam_ssa_type: Speed up type analysis for huge functions
beam_ssa_type: Speed up type analysis for huge functions

The type analysis pass (`beam_ssa_type`) keeps the type information
for all variables that are in scope. For huge functions, the
`join_types/2` function could get really slow when joining two
maps with thousands of variables in each.

Use a conservative approach to discard type information for
variables only used once by a `br` or `switch` in the same
block as the variable is defined in.

This approach reduces the runtime for the `beam_ssa_type` pass
from a few minutes down to few seconds for this module:

https://github.com/aggelgian/cuter/blob/master/src/cuter_binlib.erl

Rejected approach: Calculate liveness information for all variables
and discard type information for any variable that would not be
used again. That turned out to not work because some optimizations
would invalidate the liveness (in particular, substitutions could
lengthen the lifetime for a variable). Trying to update the
liveness information when doing the optimizations would be tricky.

Noticed-by: Kostis Sagonas

rlipscombe/otp,electricimp/otp,aboroska/otp,bjorng/otp,uabboli/otp,emacsmirror/erlang,aboroska/otp,bjorng/otp,kvakvs/otp,erlang/otp,bjorng/otp,dumbbell/otp,ferd/otp,rlipscombe/otp,isvilen/otp,bjorng/otp,rlipscombe/otp,bsmr-erlang/otp,mikpe/otp,aboroska/otp,vladdu/otp,lrascao/otp,g-andrade/otp,isvilen/otp,erlang/otp,erlang/otp,rlipscombe/otp,erlang/otp,electricimp/otp,ferd/otp,dgud/otp,g-andrade/otp,emacsmirror/erlang,ferd/otp,vinoski/otp,g-andrade/otp,legoscia/otp,jj1bdx/otp,dgud/otp,vladdu/otp,bjorng/otp,vladdu/otp,bsmr-erlang/otp,mikpe/otp,isvilen/otp,potatosalad/otp,lrascao/otp,kvakvs/otp,emacsmirror/erlang,getong/otp,lrascao/otp,g-andrade/otp,vladdu/otp,isvilen/otp,mikpe/otp,vladdu/otp,getong/otp,rlipscombe/otp,lrascao/otp,bsmr-erlang/otp,potatosalad/otp,RoadRunnr/otp,kvakvs/otp,RoadRunnr/otp,g-andrade/otp,dumbbell/otp,potatosalad/otp,dumbbell/otp,dumbbell/otp,dumbbell/otp,vinoski/otp,isvilen/otp,legoscia/otp,bsmr-erlang/otp,mikpe/otp,potatosalad/otp,aboroska/otp,dumbbell/otp,dumbbell/otp,bjorng/otp,ferd/otp,uabboli/otp,dgud/otp,getong/otp,emacsmirror/erlang,ferd/otp,lrascao/otp,vladdu/otp,kvakvs/otp,potatosalad/otp,legoscia/otp,erlang/otp,dumbbell/otp,potatosalad/otp,rlipscombe/otp,rlipscombe/otp,vinoski/otp,emacsmirror/erlang,dumbbell/otp,getong/otp,vladdu/otp,vladdu/otp,emacsmirror/erlang,potatosalad/otp,RoadRunnr/otp,erlang/otp,lrascao/otp,aboroska/otp,dgud/otp,RoadRunnr/otp,RoadRunnr/otp,mikpe/otp,dumbbell/otp,jj1bdx/otp,potatosalad/otp,getong/otp,kvakvs/otp,isvilen/otp,isvilen/otp,g-andrade/otp,uabboli/otp,legoscia/otp,bjorng/otp,legoscia/otp,aboroska/otp,kvakvs/otp,uabboli/otp,vinoski/otp,jj1bdx/otp,jj1bdx/otp,ferd/otp,bsmr-erlang/otp,legoscia/otp,uabboli/otp,bjorng/otp,erlang/otp,mikpe/otp,bsmr-erlang/otp,RoadRunnr/otp,jj1bdx/otp,legoscia/otp,emacsmirror/erlang,vinoski/otp,getong/otp,jj1bdx/otp,electricimp/otp,getong/otp,ferd/otp,dgud/otp,vinoski/otp,ferd/otp,dgud/otp,kvakvs/otp,electricimp/otp,aboroska/otp,emacsmirror/erlang,uabboli/otp,vladdu/otp,getong/otp,electricimp/otp,mikpe/otp,electricimp/otp,bsmr-erlang/otp,electricimp/otp,bsmr-erlang/otp,erlang/otp,g-andrade/otp,uabboli/otp,RoadRunnr/otp,isvilen/otp,jj1bdx/otp,mikpe/otp,erlang/otp,jj1bdx/otp,legoscia/otp,legoscia/otp,potatosalad/otp,jj1bdx/otp,emacsmirror/erlang,lrascao/otp,jj1bdx/otp,potatosalad/otp,rlipscombe/otp,electricimp/otp,isvilen/otp,bsmr-erlang/otp,RoadRunnr/otp,isvilen/otp,kvakvs/otp,vinoski/otp,kvakvs/otp,uabboli/otp,ferd/otp,dgud/otp,lrascao/otp,dgud/otp,mikpe/otp,aboroska/otp,getong/otp,g-andrade/otp,rlipscombe/otp,electricimp/otp,vinoski/otp,lrascao/otp,g-andrade/otp,rlipscombe/otp,emacsmirror/erlang,dgud/otp,bjorng/otp,g-andrade/otp,RoadRunnr/otp,erlang/otp,mikpe/otp,getong/otp,bjorng/otp,uabboli/otp,aboroska/otp,vinoski/otp,dgud/otp,vinoski/otp