Skip to content

Commit

Permalink
Mark reshape as nocapture (#2078)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Nov 11, 2024
1 parent 03d7035 commit cfb733b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3704,6 +3704,16 @@ function annotate!(mod, mode)
end
end
end

for fname in ("jl_reshape_array", "ijl_reshape_array")
if haskey(funcs, fname)
for fn in funcs[fname]
push!(parameter_attributes(fn, 3), LLVM.EnumAttribute("readonly"))
push!(parameter_attributes(fn, 3), LLVM.EnumAttribute("nocapture"))
end
end
end

# Key of jl_eqtable_get/put is inactive, definitionally
for fname in ("jl_eqtable_put", "ijl_eqtable_put")
if haskey(funcs, fname)
Expand Down

2 comments on commit cfb733b

@wsmoses
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register subdir="lib/EnzymeCore"

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/119303

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a EnzymeCore-v0.8.6 -m "<description of version>" cfb733b785425707e387d94b0fab16b215e7604d
git push origin EnzymeCore-v0.8.6

Please sign in to comment.