aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorAndy Kaylor <akaylor@nvidia.com>2025-03-19 09:42:03 -0700
committerGitHub <noreply@github.com>2025-03-19 09:42:03 -0700
commit39ce99589b05ddd43e5c8b7f89ab5bbfda40d2ce (patch)
tree80a08af9b0ed4208d379867d8fe012a2d3ffc86f /clang/lib/Frontend/CompilerInvocation.cpp
parentcd26dd55959c11c1cd0ea4fe1f07e0fa9cb7a72a (diff)
downloadllvm-39ce99589b05ddd43e5c8b7f89ab5bbfda40d2ce.zip
llvm-39ce99589b05ddd43e5c8b7f89ab5bbfda40d2ce.tar.gz
llvm-39ce99589b05ddd43e5c8b7f89ab5bbfda40d2ce.tar.bz2
[CIR] Upstream cir-canonicalize pass (#131891)
This change introduces the cir-canonicalize pass. This is a simple cir-to-cir transformation that eliminates empty scopes and redundant branches. It will be expanded in future changes to simplify other redundant instruction sequences. MLIR verification and mlir-specific command-line option handling is also introduced here.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index e708bee..b2d8d12 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -3105,6 +3105,14 @@ static bool ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
if (Args.hasArg(OPT_fclangir) || Args.hasArg(OPT_emit_cir))
Opts.UseClangIRPipeline = true;
+#if CLANG_ENABLE_CIR
+ if (Args.hasArg(OPT_clangir_disable_passes))
+ Opts.ClangIRDisablePasses = true;
+
+ if (Args.hasArg(OPT_clangir_disable_verifier))
+ Opts.ClangIRDisableCIRVerifier = true;
+#endif // CLANG_ENABLE_CIR
+
if (Args.hasArg(OPT_aux_target_cpu))
Opts.AuxTargetCPU = std::string(Args.getLastArgValue(OPT_aux_target_cpu));
if (Args.hasArg(OPT_aux_target_feature))