[PATCH] D156320: [Flang][Driver] Add support for Rpass and related options

Andrzej Warzynski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 14 12:28:02 PDT 2023


awarzynski added a comment.

Thanks for the updates - this is looking really good! A few more suggestions and then I'll scan the whole thing again (sorry, there's been quite a lot of code going back and forth).



================
Comment at: flang/lib/Frontend/CompilerInvocation.cpp:1024
 
+  // add the remark option requested i.e. pass, pass-missed or pass-analysis.
+  // This will be used later during processing warnings and remarks to give
----------------



================
Comment at: flang/lib/Frontend/FrontendActions.cpp:976-1011
+  void
+  optimizationRemarkHandler(const llvm::DiagnosticInfoOptimizationBase &d) {
+    if (d.isPassed()) {
+      // Optimization remarks are active only if the -Rpass flag has a regular
+      // expression that matches the name of the pass name in \p d.
+      if (codeGenOpts.OptimizationRemark.patternMatches(d.getPassName()))
+        emitOptimizationMessage(
----------------



================
Comment at: flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:117
+
+void processWarningOptions(clang::DiagnosticsEngine &diags,
+                           const clang::DiagnosticOptions &opts,
----------------
?


================
Comment at: flang/test/Driver/optimization-remark.f90:53
+end program forttest
\ No newline at end of file

----------------
FIXME


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156320/new/

https://reviews.llvm.org/D156320



More information about the cfe-commits mailing list