Draft: Augment StgCase with allocation info flag for #16064
This patch is PART1 of Implementation Plan described here: https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/rts/haskell-execution/heap-checks
We extend StgCase
with extra allocation boolean flag, with the following meaning:
- Flag = True <=> each alternative is responsible for adding a heap check for its own allocation
- Flag = False <=> alternatives do not do heap checks. Instead their allocation (or the max of allocation across the branches) is combined into the heap-check for the parent
By "parent" we mean the expression of which the case
is a part.
We will then consult this info to determine the GcPlan
in codegen.
Main ticket: #16064