[llvm] [CHERI] Add a Support utility for determining alignment requirements of CHERI capabilities. (PR #197402)

Owen Anderson via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 1 03:37:27 PDT 2026


resistor wrote:

> In CHERI LLVM it's in TLI and TLOF. I can see an argument for having it exposed to the frontend and middle-end, so you want something more Support-y, but I think you still want one implementation per target, with a possible dynamic dispatch layer on top of it.

In the CHERIoT tree, we're additionally using it in LLD and in the clang static analyzer, which is why it's in Support.

While it _can_ be made to dispatch through the target, I'm not seeing why that would be particularly desirable. Capability formats aren't intrinsically tied to a target (other than address size), and since the only target being upstreamed right now is RISCV, dispatching on that doesn't contribute anything to the decision tree.

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


More information about the llvm-commits mailing list