Skip to content

Add OffsetViewInterface to pointer conversions - #3377

Merged
wsmoses merged 1 commit into
mainfrom
vim/pointer-offset-view-interface
Oct 6, 2026
Merged

wsmoses merged 1 commit into
mainfrom
vim/pointer-offset-view-interface

Conversation

@vimarsh6739

Copy link
Copy Markdown
Member

Pointer conversions preserve the starting address, but getBaseObject(value, false) cannot follow them without OffsetViewInterface.

Add the interface to enzymexla.pointer2memref and enzymexla.memref2pointer. Require a zero offset in the result layout of pointer2memref, so the interface guarantee holds. Existing offsets in the source remain intact.

This extracts the shared interface change from #2744, as requested in review. The required Enzyme version is already on main through #3373.

Validation: the optimized build passes. The full LIT suite has 1,415 passes and 9 expected failures, with no unexpected failures. New tests check both base-object modes, nonzero GEP and subview offsets, and invalid result layouts.

Mark pointer2memref and memref2pointer as address-preserving views. Require
pointer2memref result layouts to have zero offset. Test both base-object
queries and rejection of nonzero or unknown result offsets.

Assisted-By: OpenAI Codex
@vimarsh6739
vimarsh6739 requested a review from wsmoses October 6, 2026 01:22
@wsmoses
wsmoses merged commit d689ee9 into main Oct 6, 2026
23 of 30 checks passed
@wsmoses
wsmoses deleted the vim/pointer-offset-view-interface branch October 6, 2026 01:28
@codecov

codecov Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 29.61%. Comparing base (58fe151) to head (b1189d0).
⚠️ Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3377      +/-   ##
==========================================
- Coverage   29.61%   29.61%   -0.01%     
==========================================
  Files         239      240       +1     
  Lines       48403    48460      +57     
==========================================
+ Hits        14336    14351      +15     
- Misses      34067    34109      +42     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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