[clang] [CIR] Add TargetLowering pass (PR #179245)

Sirui Mu via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 3 05:49:44 PST 2026


================
@@ -17,9 +17,9 @@ namespace cir {
 
 TargetLoweringInfo::~TargetLoweringInfo() = default;
 
-std::string
-TargetLoweringInfo::getLLVMSyncScope(cir::SyncScopeKind syncScope) const {
-  return ""; // default sync scope
+cir::SyncScopeKind
+TargetLoweringInfo::convertSyncScope(cir::SyncScopeKind syncScope) const {
+  return cir::SyncScopeKind::System;
 }
----------------
Lancern wrote:

`TargetLoweringInfo` acts as a base class, and this is just the "default" handling we could have (although x86 just inherits this handling logic). Added a comment explaining this.

In the future we would have something like `X86TargetLoweringInfo`, `AArch64TargetLoweringInfo`, etc. It mimics the `TargetCodeGenInfo` class from OGCG:

https://github.com/llvm/llvm-project/blob/fb8c5f8d6bb564275140f9d6ab4a45b76937d98e/clang/lib/CodeGen/TargetInfo.h#L49

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


More information about the cfe-commits mailing list