-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[mlir][EmitC] Drop unused code (NFC) #80325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
To register the conversion the autogenerated function `registerSCFToEmitC()` calls `createSCFToEmitC()`, which itself is also autogenerated. The removed function, however, isn't used in the upstream codebase.
@llvm/pr-subscribers-mlir Author: Marius Brehler (marbre) ChangesTo register the conversion the autogenerated function Full diff: https://github.com/llvm/llvm-project/pull/80325.diff 2 Files Affected:
diff --git a/mlir/include/mlir/Conversion/SCFToEmitC/SCFToEmitC.h b/mlir/include/mlir/Conversion/SCFToEmitC/SCFToEmitC.h
index 7ff682293f48b..22df7f1c5dcf2 100644
--- a/mlir/include/mlir/Conversion/SCFToEmitC/SCFToEmitC.h
+++ b/mlir/include/mlir/Conversion/SCFToEmitC/SCFToEmitC.h
@@ -20,10 +20,6 @@ class RewritePatternSet;
/// Collect a set of patterns to convert SCF operations to the EmitC dialect.
void populateSCFToEmitCConversionPatterns(RewritePatternSet &patterns);
-
-/// Creates a pass to convert SCF operations to the EmitC dialect.
-std::unique_ptr<Pass> createConvertSCFToEmitCPass();
-
} // namespace mlir
#endif // MLIR_CONVERSION_SCFTOEMITC_SCFTOEMITC_H
diff --git a/mlir/lib/Conversion/SCFToEmitC/SCFToEmitC.cpp b/mlir/lib/Conversion/SCFToEmitC/SCFToEmitC.cpp
index bf69ba503f4e6..367142a520742 100644
--- a/mlir/lib/Conversion/SCFToEmitC/SCFToEmitC.cpp
+++ b/mlir/lib/Conversion/SCFToEmitC/SCFToEmitC.cpp
@@ -199,7 +199,3 @@ void SCFToEmitCPass::runOnOperation() {
applyPartialConversion(getOperation(), target, std::move(patterns))))
signalPassFailure();
}
-
-std::unique_ptr<Pass> mlir::createConvertSCFToEmitCPass() {
- return std::make_unique<SCFToEmitCPass>();
-}
|
Looks like I meant to follow the SCFToCF example but left out the |
Very gladly. Yes, this is likely the case. I nearly implemented something similar for FuncToEmitC and that is why I actually spotted this. |
Just after merging my changes, I noticed that you're comment could likely be interpreted as approval but that it technically wasn't a GitHub PR approval. I missed this and hope that merging was fine anyway. |
Yes it was! (didn't approve at the time only since the Windows build failed) |
This was due to a |
To register the conversion the autogenerated function `registerSCFToEmitC()` calls `createSCFToEmitC()`, which itself is also autogenerated. The removed function, however, isn't used in the upstream codebase.
To register the conversion the autogenerated function
registerSCFToEmitC()
callscreateSCFToEmitC()
, which itself is also autogenerated. The removed function, however, isn't used in the upstream codebase.