simplifier: allow more ticks in argument position in rebuild_app
Ticket: #27556 (closed)
Changes contained in this patch
In cpeApp, we were carefully asserting that all argument ticks were
profiling ticks. This was too strict as we allow any non-floatable
tick in that position, which is described in Note [Ticks and mandatory
eta expansion]. When canCollectArgsThrougTick was introduced, the
rules for ticks in argument positions became more lenient, for instance,
it was not a necessary precondition for the Id to have no binding, which
simply allowed more ticks to float to that position. The test
demonstrates that; with optimized bytecode, a breakpoint tick appears
and takes as argument a primop that has to be eta expanded so we move it
out of the way.
MR Checklist
- This MR solves the problem described in the following issue: #27556 (closed)
- A changelog entry was added in
changelog.d/for user-facing changes (see changelog guide). If this MR does not need a changelog entry, the no-changelog label was applied. - This MR does not make any significant changes to
base, or it has an accompanying CLC proposal. - If this MR has the potential to break user programs, the user-facing label was applied to test against head.hackage.
- All commits are either individually buildable or squashed.
- After all approvals and before landing: all fixup commits are squashed with their originating commits.
- Commit messages describe what they do, referring to tickets using
#NNNNNsyntax. - Source comments describing the change were added. For larger changes notes and cross-references from the relevant places were added (as applicable).
- Testcases to the testsuite were added (as applicable).
- The users guide was updated (as applicable).