[llvm] [CHERI][RISCV][MC] Add support for aligning and tail-padding globals for precise bounds tracking on CHERI targets. (PR #203872)

Alexander Richardson via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 6 00:57:13 PDT 2026


https://github.com/arichardson commented:

I think the way I originally did this was not necessarily ideal and rebasing it on top of https://github.com/llvm/llvm-project/pull/121957 would be a bit nicer?

I wonder if we need TailPaddingAmount at all. Could we just do the same as https://github.com/llvm/llvm-project/pull/121957/changes and pass a `MaybeAlign OverAlignment`? I think that approach is a bit cleaner. Reusing the proposed `MaybeAlign getRequiredGlobalAlignment(const GlobalVariable &GV);` would also make this a bit simpler.

https://github.com/llvm/llvm-project/pull/203872


More information about the llvm-commits mailing list