Skip to content

Conversation

Copy link

Copilot AI commented Nov 17, 2025

The DetectPointerArgOfFn analysis now automatically adds nocapture, readonly, writeonly, and readnone attributes to function pointer arguments based on usage analysis. Test CHECK lines needed updating to match the new output.

Changes

Updated 7 test files in enzyme/test/Enzyme/ReverseMode/:

  • mallocuse.ll - Added nocapture writeonly and nocapture to augmented function parameters
  • maskedload.ll, maskedload2.ll - Added readonly to pointer parameters that are only read
  • maskedstore.ll, maskedstore2.ll - Added writeonly to pointer parameters that are only written
  • memcpy-flt-tt.ll - Added nocapture writeonly/nocapture readonly to memory operation parameters
  • loopcanon.ll - Added nocapture readonly to read-only pointer parameter

Example change:

; Before:
; CHECK: define internal { ptr, double } @augmented__take(ptr %a0, ptr %"a0'", i1 %a1)

; After:
; CHECK: define internal { ptr, double } @augmented__take(ptr nocapture writeonly %a0, ptr nocapture %"a0'", i1 %a1)

Fixes LLVM 15 Debug CI failures.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copy link
Author

Copilot AI commented Nov 17, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/EnzymeAD/Enzyme/actions/runs
    • Triggering command: curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix LLVM tests to include new attributes Update LLVM test expectations for pointer argument attributes Nov 17, 2025
Copilot AI requested a review from wsmoses November 17, 2025 07:57
Copilot finished work on behalf of wsmoses November 17, 2025 07:57
Fixed CHECK lines in LLVM test files to expect nocapture, readonly, readnone, and writeonly attributes that are now automatically added to function parameters by the DetectPointerArgOfFn analysis.

Co-authored-by: wsmoses <1260124+wsmoses@users.noreply.github.com>
@wsmoses wsmoses force-pushed the copilot/sub-pr-2560 branch from 3346e1b to b479aac Compare November 17, 2025 08:06
Base automatically changed from rfu to main November 19, 2025 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants