[llvm] [ARM] Remove Subtarget from ARMAsmPrinter (PR #168264)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 24 03:07:09 PST 2025
smithp35 wrote:
> Unfortunately It doesnt look like https://godbolt.org/z/MPP5zx4ac contains anything at the functional level that can identify ropi/rwpi, unless I am missing it.
I can't find anything either. The AAPCS describes RWPI as a PCS variant https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst#73read-write-position-independence-rwpi . So it looks like using lto with ropi/rwpi but no linker driver command-line options could never have worked.
Looking at what happens for PIC and PIE, which is analogous to ROPI we get module level flags:
```
!2 = !{i32 8, !"PIC Level", i32 1}
!3 = !{i32 7, !"PIE Level", i32 1}
```
In its full generality RWPI would likely need modelling as a procedure call variant.
Given that ROPI/RWPI +lto and no linker driver command-line options is a niche of a niche use case. I don't think that we should block this change for it.
Would you be willing to update the description with a known limitation that ROPI and RWPI ought to select TargetMachine from the function, but there are currently no per-function ROPI and RWPI properties defined.
https://github.com/llvm/llvm-project/pull/168264
More information about the llvm-commits
mailing list