
#9718: Avoid TidyPgm predicting what CorePrep will do
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Resolution: | Keywords: CodeGen, CAFs
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by osa1):
I almost finished the analysis implementation (I don't update the .hi file
or
ModIface yet). I currently have a sanity check that after analysis
compares
CafInfos computed by TidyPgm with the CafInfos the new analysis computes,
and I
can see cases when building stage 2 where the results differ. For example,
for
this definition:
(libraries/base/GHC/Base.hs)
{{{
GHC.Base.$fFunctor-> [InlPrag=NOUSERINLINE CONLIKE]
:: forall r. GHC.Base.Functor ((->) r)
[GblId[DFunId], Str=m] =
CCS_DONT_CARE GHC.Base.C:Functor! [GHC.Base..
GHC.Base.$fFunctor->_$c<$];
}}}
This definition itself is not a CAF, so we look at the free variables
`GHC.Base.$fFunctor->_$c<$` and `GHC.Base..`:
{{{
GHC.Base.. [InlPrag=INLINE (sat-args=2)]
:: forall b c a. (b -> c) -> (a -> b) -> a -> c
[GblId,
Arity=3,
Caf=NoCafRefs,
Str=