[clang] [clang] Better bitfield access units (PR #65742)

Nathan Sidwell via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 26 11:50:04 PST 2024


urnathan wrote:

> Yeah, LLVM supports changing subtarget options on a per-function basis. We would presumably make the query based on the global setting.
> 
> Anyway, getting this information from LLVM doesn't seem tractable in the short-to-medium term; it's just unfortunate.

Thinking further, several (AArch64, ARM & Loongson) targets have a 'HasUnaligned' bool in their TargetInfo objects.  Perhaps the way forwards is to promote that to the base TargetInfo and just use that, rather than the bitfield-specific field I added (which just duplicates that functionality on those targets)?


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


More information about the cfe-commits mailing list