[all-commits] [llvm/llvm-project] 31b28f: [CIR] Consume serialized LangOptions in post-CIRGe...
Konstantinos Parasyris via All-commits
all-commits at lists.llvm.org
Mon Sep 21 17:22:40 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 31b28f55900649668bb3dad18ab90f6ce7a77c51
https://github.com/llvm/llvm-project/commit/31b28f55900649668bb3dad18ab90f6ce7a77c51
Author: Konstantinos Parasyris <koparasy at gmail.com>
Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths:
M clang/lib/CIR/CodeGen/CIRGenModule.cpp
M clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
M clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerModule.cpp
M clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerModule.h
M clang/lib/CIR/Lowering/CIRPasses.cpp
A clang/test/CIR/CodeGenCUDA/lowering-lang-options.cu
Log Message:
-----------
[CIR] Consume serialized LangOptions in post-CIRGen lowering (#225224)
Post-CIRGen lowering (LoweringPrepare, CallConvLowering) read a handful
of LangOptions facts from a live clang::LangOptions via the pass's
ASTContext. That prevented a reloaded .cir from lowering the same way it
was compiled, since a serialized module has no ASTContext. PR #224757
serialized those facts onto the module as #cir.lowering_lang_options;
this change makes lowering consume them from there.
To make sure the `lowering_lang_options` attribute is always available,
I moved the constrction of langOpts from release to the constructor. The
overall approach is very close to `LowerModule::getTarget()`
Currently there is still a reliance to `astContext` which I plan to
remove in upcoming PRs. The reliance blocks consuming .cir as an input
and test `cir-opt` with some of such passes.
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list