llvm-project
37e2c3bc - [CIR] Serialize lowering-relevant LangOptions as #cir.lowering_lang_options (#224757)

Commit
32 days ago
[CIR] Serialize lowering-relevant LangOptions as #cir.lowering_lang_options (#224757) Post-CIRGen lowering (LoweringPrepare, CallConvLowering) reads a handful of LangOptions flags that have no triple/module representation. A reloaded `.cir` module has no live `clang::LangOptions`, so those flags must be serialized for the file to be self-describing and lower the same way it was compiled. Add a module-level aggregate attribute `#cir.lowering_lang_options` holding the LangOpts facts lowering consumes: "exceptions, threadsafe_statics, cuda, cuda_is_device, hip, gpu_rdc, openmp, openmp_is_target_device, and clang_abi_compat". Target-derived facts (size_t width, CXXABI, comdat, char/pointer/atomic width, SDK version, fp formats) are **NOT** stored: they are rebuilt from `cir.triple` Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author
Parents
Loading