Improve shortOutIndirections slightly
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 22 Mar 2018 14:31:45 +0000 (14:31 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 22 Mar 2018 14:33:46 +0000 (14:33 +0000)
commit034c32f6b8abd15eb9affca972844d3c6842af69
treecb77db712d316cc3003e3eb27a8416e8d49766ac
parentefc844f5b955385d69d8e20b80d38311083a6665
Improve shortOutIndirections slightly

I found (when investigating Trac #14955) a binding looking like

   Rec { exported_id = ....big...lcl_id...
       ; lcl_id = exported_id }

but bizarrely 'lcl_id' was chosen as the loop breaker, and never
inlined.  It turned out to be an unintended consequence of the
shortOutIndirections code in SimplCore.  Easily fixed.
compiler/basicTypes/BasicTypes.hs
compiler/simplCore/SimplCore.hs