[clang] [clang-tools-extra] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

Jessica Clarke via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 17 06:46:04 PST 2024


jrtc27 wrote:

> I had to do something very similar for CHERI downstream: We have to ensure that all globals are precisely representable (which may require rounding up the size+alignment) so you don't end up creating bounds that include adjacent ones. The original patch from 2019 is here: [CTSRD-CHERI/llvm-project at fd224dd](https://github.com/CTSRD-CHERI/llvm-project/commit/fd224dddafefbed3b068a0afc1a242bf8eb65d20)
> 
> I wonder if it would be possible have a hook that CHERI can reuse downstream: something like: `getRequiredGlobalAlignment()` and `getRequiredGlobalSize()`. For MTE this could return 16 for alignment and round the size up to a multiple of 16 and after the next merge the CHERI downstream could reuse those hooks.
> 
> Adding @jrtc27 for visibility.

As far as I can tell this feedback was completely ignored?..

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


More information about the cfe-commits mailing list