Skip to content

Conversation

@eugeneepshteyn
Copy link
Contributor

This option has long been replaced by -fc1 -fdebug-dump-pft. Removed the old option and updated one test that still used it.

This option has long been replaced by -fc1 -fdebug-dump-pft.
Removed the old option and updated one test that still used it.
@eugeneepshteyn eugeneepshteyn marked this pull request as ready for review November 14, 2025 04:09
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir labels Nov 14, 2025
@llvmbot
Copy link
Member

llvmbot commented Nov 14, 2025

@llvm/pr-subscribers-flang-fir-hlfir

Author: Eugene Epshteyn (eugeneepshteyn)

Changes

This option has long been replaced by -fc1 -fdebug-dump-pft. Removed the old option and updated one test that still used it.


Full diff: https://github.com/llvm/llvm-project/pull/168008.diff

2 Files Affected:

  • (modified) flang/lib/Lower/Bridge.cpp (-6)
  • (modified) flang/test/Lower/ifconvert.f90 (+1-1)
diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp
index 5bfcff310c232..cb324892a06f0 100644
--- a/flang/lib/Lower/Bridge.cpp
+++ b/flang/lib/Lower/Bridge.cpp
@@ -86,10 +86,6 @@
 
 #define DEBUG_TYPE "flang-lower-bridge"
 
-static llvm::cl::opt<bool> dumpBeforeFir(
-    "fdebug-dump-pre-fir", llvm::cl::init(false),
-    llvm::cl::desc("dump the Pre-FIR tree prior to FIR generation"));
-
 static llvm::cl::opt<bool> forceLoopToExecuteOnce(
     "always-execute-loop-body", llvm::cl::init(false),
     llvm::cl::desc("force the body of a loop to execute at least once"));
@@ -7027,8 +7023,6 @@ void Fortran::lower::LoweringBridge::lower(
     const Fortran::semantics::SemanticsContext &semanticsContext) {
   std::unique_ptr<Fortran::lower::pft::Program> pft =
       Fortran::lower::createPFT(prg, semanticsContext);
-  if (dumpBeforeFir)
-    Fortran::lower::dumpPFT(llvm::errs(), *pft);
   FirConverter converter{*this};
   converter.run(*pft);
 }
diff --git a/flang/test/Lower/ifconvert.f90 b/flang/test/Lower/ifconvert.f90
index 50ced6b42addf..cbd1e79bd0114 100644
--- a/flang/test/Lower/ifconvert.f90
+++ b/flang/test/Lower/ifconvert.f90
@@ -1,4 +1,4 @@
-! RUN: bbc -fdebug-dump-pre-fir %s 2>&1 | FileCheck %s
+! RUN: %flang_fc1 -fdebug-dump-pft %s 2>&1 | FileCheck %s
 
 ! Note: PFT dump output is fairly stable, including node indexes and
 !       annotations, so all output is CHECKed.

Copy link
Contributor

@jeanPerier jeanPerier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clean-up Eugene.

@eugeneepshteyn eugeneepshteyn merged commit 056f744 into llvm:main Nov 14, 2025
10 checks passed
@eugeneepshteyn eugeneepshteyn deleted the remove-dump-before-fir branch November 14, 2025 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flang:fir-hlfir flang Flang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants