Try making exports of CAFiness, Arity mandatory and make CbvCallingConvention part of IdInfo instead of IdDetails.
Simon suggested we should try exporting caf info and arity at all times as he suspects it would have decent benefits for -O0 runtime and be cheap to do.
I'm afraid this would make recompilation more frequent and hence am hesitant to do this without doing a proper investigation into the drawbacks/benefits.
If we do so it would be convenient to move the CbvMarks which tell us about the "properly tagged" calling convention from IdDetails into IdInfo as well and spj thinks we should so so as well.
That is move from the first to the second variant:
-- First variant:
details = StrictWorkerId marks
info = IdInfo { .... }
v = Var ... (details) (info)
-- Second Variant:
details = VanillaId
info = IdInfo { ...., idInfoStrictWorker = marks }
v = Var ... (details) (info)
and make reading of the marks (and potentially arity/caffiness) mandatory even at -O0.
But as the haddocks of IdInfo
tell us:
-- Performance note: when we update 'IdInfo', we have to reallocate this
-- entire record, so it is a good idea not to let this data structure get
-- too big.
So I'm hesitant to move the cbv marks there. We reallocate IdInfo's quite often. On the other hand IdDetails are only updated very rarely so the extra field there has much less of a cost.
I will look into this eventually.