Skip to content

feat(riscv): basic datalayout support - #1231

Merged
regehr merged 4 commits into
mainfrom
regehr/datalayout
Aug 11, 2026
Merged

feat(riscv): basic datalayout support#1231
regehr merged 4 commits into
mainfrom
regehr/datalayout

Conversation

@regehr

@regehr regehr commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

this only does the RISC-V side, but we also want datalayout in the LLVM interpreter since it interacts with memory objects as well

@regehr regehr self-assigned this Aug 8, 2026
@regehr
regehr force-pushed the regehr/datalayout branch from 4c2623d to 3b5d144 Compare August 8, 2026 20:47
@regehr
regehr requested a review from nchappe August 8, 2026 21:18

@naveen-seth naveen-seth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Otherwise, LGTM! I’m still new to the project/this area, so I’ll leave the approval to someone else.

Comment thread Veir/DataLayout/RISCV64.lean Outdated
@regehr

regehr commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

Otherwise, LGTM! I’m still new to the project/this area, so I’ll leave the approval to someone else.

fine to approve (or not) as you choose! we typically wait for all reviewers to approve, or at least most, depending on the complexity of the PR

@math-fehr math-fehr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think that's good to me, I don't know how it's done in MLIR/LLVM right now, but you know better!

Comment thread Veir/Interfaces/DataLayoutInterfaces.lean Outdated
Comment thread Veir/Interfaces/DataLayoutInterfaces.lean Outdated
regehr and others added 2 commits August 9, 2026 05:10
Co-authored-by: Mathieu Fehr <mathieu.fehr@gmail.com>
@regehr

regehr commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

I think that's good to me, I don't know how it's done in MLIR/LLVM right now, but you know better!

you can find MLIR's version here:

https://mlir.llvm.org/docs/DataLayout/

the goal in both cases is to provide an interface that answers questions about how objects want to be represented in RAM. there isn't any question that we need to be able to answer these questions, but of course we might disagree on how to best answer them.

the answer here is "these are hard-coded, but then exposed through a generic API." this is far less ambitious than what MLIR provides, which includes things like parsing and printing LLVM-style datalayout strings.

anyway I'm happy to talk about this, discuss alternatives, etc. but for now, this solves practical problems that we've already encountered -- and solved in ad hoc ways.

@luisacicolini luisacicolini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm, thank you :)

@regehr
regehr enabled auto-merge August 10, 2026 17:01
@regehr
regehr added this pull request to the merge queue Aug 11, 2026
Merged via the queue into main with commit 05dad81 Aug 11, 2026
7 checks passed
@regehr
regehr deleted the regehr/datalayout branch August 11, 2026 07:56
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.

4 participants