[clang] [llvm] Define pointer layout for AVR program address space (PR #134254)

2025-05-07 Thread James Wainwright via cfe-commits
https://github.com/jwnrt converted_to_draft https://github.com/llvm/llvm-project/pull/134254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Define pointer layout for AVR program address space (PR #134254)

2025-05-07 Thread James Wainwright via cfe-commits
jwnrt wrote: Sorry for the long delay. I think you're right that there's no difference to the RTL. I need to test this properly and learn more about address spaces. In particular, I think address space zero has some special casing around it being the generic / fallback address space that inte

[clang] [llvm] Define pointer layout for AVR program address space (PR #134254)

2025-04-08 Thread Ben Shi via cfe-commits
benshi001 wrote: Is this change necessary? I find there is not change in the size of addrspace 0/1 pointers, before and after your patch. for program ```c++ clang a.c --target=avr -mmcu=atmega2560 int gf(int a); int (*p)(int) = gf; int f; int *p1 = &f; ``` the generated assembly is unique by

[clang] [llvm] Define pointer layout for AVR program address space (PR #134254)

2025-04-05 Thread James Wainwright via cfe-commits
jwnrt wrote: CC @benshi001 To be 100% honest I haven't tested this on AVR silicon yet. My motivation for the change is to allow for non-zero data address spaces in Rust which parses these LLVM address spaces, but would then use both 64-bit and 16-bit pointers for AVR. Apologies if this is bad

[clang] [llvm] Define pointer layout for AVR program address space (PR #134254)

2025-04-04 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [llvm] Define pointer layout for AVR program address space (PR #134254)

2025-04-04 Thread Ben Shi via cfe-commits
benshi001 wrote: > CC @benshi001 > > To be 100% honest I haven't tested this on AVR silicon yet. My motivation for > the change is to allow for non-zero data address spaces in Rust which parses > these LLVM data format specs, but would then use both 64-bit and 16-bit > pointers for AVR. Apolo

[clang] [llvm] Define pointer layout for AVR program address space (PR #134254)

2025-04-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: James Wainwright (jwnrt) Changes AVR uses separate address spaces for data (0) and program (1) memory, however pointer layout is only defined for address space 0 in the data layout string. The `p[n]` directive defines pointer layouts wher

[clang] [llvm] Define pointer layout for AVR program address space (PR #134254)

2025-04-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: James Wainwright (jwnrt) Changes AVR uses separate address spaces for data (0) and program (1) memory, however pointer layout is only defined for address space 0 in the data layout string. The `p[n]` directive defines pointer la

[clang] [llvm] Define pointer layout for AVR program address space (PR #134254)

2025-04-03 Thread James Wainwright via cfe-commits
https://github.com/jwnrt created https://github.com/llvm/llvm-project/pull/134254 AVR uses separate address spaces for data (0) and program (1) memory, however pointer layout is only defined for address space 0 in the data layout string. The `p[n]` directive defines pointer layouts where `n` d