Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flambda-backend: Fix missing rewrite ids when unboxing detects invali…
…d apply conts (#2756) * Add tests * More detailed error message * Fix missing rewrite ids when unboxing detect invalid apply conts In some cases (e.g. a do_not_unbox decision, followed by a decision that does unbox, and that discovers that some apply conts are invalids), it could happen that the set of rewrite ids known as being invalid was dropped/reset to empty. That together with the caching of the extra args computsion (done through the rewrite ids seen) meant that we could "forget" some rewrite ids. * Allow overlap of invalid rewrite id and extra_args As the comment states, it can happen that, when adding a extra param and args, there is an overlap between the domain of the extra_args map, and the set of invalids (because of the way these are computed by the unboxing code). This case is reasonable, so in such a case, we can allow the invalid set to take precedenhce. * Force tests to be compiled with O3 Although not strictly necessary for the tests to work, it's safer to ensure that they are optimized as expected
- Loading branch information