Skip to content

Change how Extract_projections handles nested sets of closures#484

Merged
mshinwell merged 1 commit intoocaml:4.03from
lpw25:fix-extract-projections
Feb 26, 2016
Merged

Change how Extract_projections handles nested sets of closures#484
mshinwell merged 1 commit intoocaml:4.03from
lpw25:fix-extract-projections

Conversation

@lpw25
Copy link
Copy Markdown
Contributor

@lpw25 lpw25 commented Feb 25, 2016

The patch fixes an issue with how extract projections works on nested sets of closures. Mostly for @chambart to review.

Previously, any mention of a variable as a free variable or specialised arg would stop that variable from being lifted by unbox_specialised_args or unbox_free_variables. With this patch we recurse into the body of nested sets of closures and if all uses of the free variable or specialised arg are as projections then extract projections can still apply to the original variable.

Previously, applying unbox_specialised_args to a set_of_closures would prevent applying unbox_specialised_args to any set_of_closures containing the original set_of_closures. With this patch unbox_specialised_args works correctly on nested sets_of_closures.

@mshinwell mshinwell changed the title Change how extract projections handles nested sets of closures Change how Extract_projections handles nested sets of closures Feb 26, 2016
@mshinwell
Copy link
Copy Markdown
Contributor

This is OK

@mshinwell mshinwell added this to the 4.03.0 milestone Feb 26, 2016
mshinwell added a commit that referenced this pull request Feb 26, 2016
GPR#484: Change how Extract_projections handles nested sets of closures
@mshinwell mshinwell merged commit 8641de1 into ocaml:4.03 Feb 26, 2016
mshinwell added a commit that referenced this pull request Feb 26, 2016
GPR#484: Change how Extract_projections handles nested sets of closures
Octachron pushed a commit to Octachron/ocaml that referenced this pull request Feb 29, 2016
GPR#484: Change how Extract_projections handles nested sets of closures
mshinwell added a commit to mshinwell/ocaml that referenced this pull request Jul 13, 2021
…#484)

* Replace Rec_info with type of kind Rec_info in func decl types

With necessary changes in the simplifier. This finally removes the old
`Rec_info` module. The new inlining logic is still not hooked up.

* Code review

* Add assertions; be conservative in `Alias_set.inter`

Since the intersection of alias sets is used to find common aliases when
joining, we can safely be conservative and just leave an element out if
it appears in both alias sets but with different coercions.

* Add rec info to free names, exported ids

Co-authored-by: Mark Shinwell <mshinwell@gmail.com>
chambart pushed a commit to chambart/ocaml-1 that referenced this pull request Feb 1, 2022
stedolan pushed a commit to stedolan/ocaml that referenced this pull request Mar 22, 2022
stedolan added a commit to stedolan/ocaml that referenced this pull request May 24, 2022
86526aa flambda-backend: Middle-end support for local allocs (ocaml#491)
969b937 flambda-backend: Backend support for local allocations (ocaml#478)
2d1e6ef flambda-backend: Remove leading space from LINE. (ocaml#484)

git-subtree-dir: ocaml
git-subtree-split: 86526aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants