[CIR][NFC] Remove unused LLVM lowering for cir.await - #211143
Merged
Merged
Conversation
Andres-Salamanca
requested review from
andykaylor,
bcardosolopes and
xlauko
as code owners
July 21, 2026 23:38
|
@llvm/pr-subscribers-clangir Author: Andres-Salamanca Changes
Full diff: https://github.com/llvm/llvm-project/pull/211143.diff 2 Files Affected:
diff --git a/clang/include/clang/CIR/Dialect/IR/CIROps.td b/clang/include/clang/CIR/Dialect/IR/CIROps.td
index 762ef56248e4c..83e31710c0a96 100644
--- a/clang/include/clang/CIR/Dialect/IR/CIROps.td
+++ b/clang/include/clang/CIR/Dialect/IR/CIROps.td
@@ -4556,6 +4556,7 @@ def CIR_AwaitOp : CIR_Op<"await",[
];
let hasVerifier = 1;
+ let hasLLVMLowering = false;
}
//===----------------------------------------------------------------------===//
// CoroBody
diff --git a/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp b/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
index 0e412090a16da..f413d9260d2d2 100644
--- a/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+++ b/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
@@ -5023,12 +5023,6 @@ mlir::LogicalResult CIRToLLVMIndirectBrOpLowering::matchAndRewrite(
return mlir::success();
}
-mlir::LogicalResult CIRToLLVMAwaitOpLowering::matchAndRewrite(
- cir::AwaitOp op, OpAdaptor adaptor,
- mlir::ConversionPatternRewriter &rewriter) const {
- return mlir::failure();
-}
-
mlir::LogicalResult CIRToLLVMCpuIdOpLowering::matchAndRewrite(
cir::CpuIdOp op, OpAdaptor adaptor,
mlir::ConversionPatternRewriter &rewriter) const {
|
|
@llvm/pr-subscribers-clang Author: Andres-Salamanca Changes
Full diff: https://github.com/llvm/llvm-project/pull/211143.diff 2 Files Affected:
diff --git a/clang/include/clang/CIR/Dialect/IR/CIROps.td b/clang/include/clang/CIR/Dialect/IR/CIROps.td
index 762ef56248e4c..83e31710c0a96 100644
--- a/clang/include/clang/CIR/Dialect/IR/CIROps.td
+++ b/clang/include/clang/CIR/Dialect/IR/CIROps.td
@@ -4556,6 +4556,7 @@ def CIR_AwaitOp : CIR_Op<"await",[
];
let hasVerifier = 1;
+ let hasLLVMLowering = false;
}
//===----------------------------------------------------------------------===//
// CoroBody
diff --git a/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp b/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
index 0e412090a16da..f413d9260d2d2 100644
--- a/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+++ b/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
@@ -5023,12 +5023,6 @@ mlir::LogicalResult CIRToLLVMIndirectBrOpLowering::matchAndRewrite(
return mlir::success();
}
-mlir::LogicalResult CIRToLLVMAwaitOpLowering::matchAndRewrite(
- cir::AwaitOp op, OpAdaptor adaptor,
- mlir::ConversionPatternRewriter &rewriter) const {
- return mlir::failure();
-}
-
mlir::LogicalResult CIRToLLVMCpuIdOpLowering::matchAndRewrite(
cir::CpuIdOp op, OpAdaptor adaptor,
mlir::ConversionPatternRewriter &rewriter) const {
|
erichkeane
approved these changes
Jul 22, 2026
erichkeane
approved these changes
Jul 22, 2026
midhuncodes7
pushed a commit
to midhuncodes7/llvm-project
that referenced
this pull request
Jul 28, 2026
`cir.await` is always eliminated by the FlattenCFG pass before the DirectToLLVM conversion. Since the operation never reaches LLVM lowering, remove the unused lowering implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cir.awaitis always eliminated by the FlattenCFG pass before the DirectToLLVM conversion. Since the operation never reaches LLVM lowering, remove the unused lowering implementation.