Cache the number of data cons in DataTyCon and SumTyCon
authorBartosz Nitka <niteria@gmail.com>
Tue, 26 Dec 2017 12:54:27 +0000 (12:54 +0000)
committerBartosz Nitka <niteria@gmail.com>
Thu, 4 Jan 2018 14:03:54 +0000 (14:03 +0000)
commit6c34824434a67baa34e4ee2ddb753708eb61c5bc
treeca8c84cae978b3cc61ff096f74016d7aebfd1707
parent649e777211fe08432900093002547d7358f92d82
Cache the number of data cons in DataTyCon and SumTyCon

This is a follow-up after faf60e85 - Make tagForCon non-linear.
On the mailing list @simonpj suggested to solve the
linear behavior by caching the sizes.

Test Plan: ./validate

Reviewers: simonpj, simonmar, bgamari, austin

Reviewed By: simonpj

Subscribers: carter, goldfire, rwbarton, thomie, simonpj

Differential Revision: https://phabricator.haskell.org/D4131
compiler/codeGen/StgCmmClosure.hs
compiler/iface/BuildTyCl.hs
compiler/prelude/TysWiredIn.hs
compiler/types/TyCon.hs
compiler/vectorise/Vectorise/Generic/PData.hs
compiler/vectorise/Vectorise/Type/TyConDecl.hs