Skip to content
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

[flang][driver] rename flang-new to flang #110023

Merged
merged 7 commits into from
Oct 10, 2024

Conversation

everythingfunctional
Copy link
Contributor

This does a global rename from flang-new to flang. I also removed/changed any TODOs that I found related to making this change.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' flang:driver flang:runtime flang Flang issues not falling into any other category flang:fir-hlfir flang:openmp offload labels Sep 25, 2024
@llvmbot
Copy link
Member

llvmbot commented Sep 25, 2024

@llvm/pr-subscribers-github-workflow
@llvm/pr-subscribers-flang-openmp
@llvm/pr-subscribers-flang-fir-hlfir
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-flang-runtime

@llvm/pr-subscribers-flang-driver

Author: Brad Richardson (everythingfunctional)

Changes

This does a global rename from flang-new to flang. I also removed/changed any TODOs that I found related to making this change.


Patch is 81.03 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/110023.diff

64 Files Affected:

  • (modified) clang/include/clang/Driver/Options.td (+2-2)
  • (modified) clang/lib/Driver/Driver.cpp (+1-1)
  • (modified) clang/lib/Driver/ToolChains/Flang.cpp (+2-4)
  • (modified) clang/test/Driver/flang/flang.f90 (+1-1)
  • (modified) clang/test/Driver/flang/flang_ucase.F90 (+1-1)
  • (modified) clang/test/Driver/flang/multiple-inputs-mixed.f90 (+1-1)
  • (modified) clang/test/Driver/flang/multiple-inputs.f90 (+2-2)
  • (modified) flang/docs/FlangDriver.md (+36-40)
  • (modified) flang/docs/ImplementingASemanticCheck.md (+2-2)
  • (modified) flang/docs/Overview.md (+13-13)
  • (modified) flang/examples/FlangOmpReport/FlangOmpReport.cpp (+1-1)
  • (modified) flang/include/flang/Optimizer/Analysis/AliasAnalysis.h (+1-1)
  • (modified) flang/include/flang/Tools/CrossToolHelpers.h (+1-1)
  • (modified) flang/lib/Frontend/CompilerInvocation.cpp (+3-3)
  • (modified) flang/lib/Frontend/FrontendActions.cpp (+1-1)
  • (modified) flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp (+1-1)
  • (modified) flang/runtime/CMakeLists.txt (+3-3)
  • (modified) flang/test/CMakeLists.txt (+1-1)
  • (modified) flang/test/Driver/aarch64-outline-atomics.f90 (+1-1)
  • (modified) flang/test/Driver/color-diagnostics-forwarding.f90 (+2-2)
  • (modified) flang/test/Driver/compiler-options.f90 (+2-2)
  • (modified) flang/test/Driver/convert.f90 (+1-1)
  • (modified) flang/test/Driver/disable-ext-name-interop.f90 (+1-1)
  • (modified) flang/test/Driver/driver-version.f90 (+2-2)
  • (modified) flang/test/Driver/escaped-backslash.f90 (+2-2)
  • (modified) flang/test/Driver/fdefault.f90 (+14-14)
  • (modified) flang/test/Driver/flarge-sizes.f90 (+10-10)
  • (modified) flang/test/Driver/frame-pointer-forwarding.f90 (+1-1)
  • (modified) flang/test/Driver/frontend-forwarding.f90 (+2-2)
  • (modified) flang/test/Driver/hlfir-no-hlfir-error.f90 (+2-2)
  • (modified) flang/test/Driver/intrinsic-module-path.f90 (+1-1)
  • (modified) flang/test/Driver/large-data-threshold.f90 (+3-3)
  • (modified) flang/test/Driver/lto-flags.f90 (+1-1)
  • (modified) flang/test/Driver/macro-def-undef.F90 (+2-2)
  • (modified) flang/test/Driver/missing-input.f90 (+7-7)
  • (modified) flang/test/Driver/multiple-input-files.f90 (+1-1)
  • (modified) flang/test/Driver/omp-driver-offload.f90 (+33-33)
  • (modified) flang/test/Driver/predefined-macros-compiler-version.F90 (+2-2)
  • (modified) flang/test/Driver/std2018-wrong.f90 (+1-1)
  • (modified) flang/test/Driver/std2018.f90 (+1-1)
  • (modified) flang/test/Driver/supported-suffices/f03-suffix.f03 (+1-1)
  • (modified) flang/test/Driver/supported-suffices/f08-suffix.f08 (+1-1)
  • (modified) flang/test/Driver/use-module-error.f90 (+2-2)
  • (modified) flang/test/Driver/use-module.f90 (+2-2)
  • (modified) flang/test/Driver/version-loops.f90 (+9-9)
  • (modified) flang/test/Driver/wextra-ok.f90 (+1-1)
  • (modified) flang/test/HLFIR/hlfir-flags.f90 (+1-1)
  • (modified) flang/test/Lower/Intrinsics/command_argument_count.f90 (+2-2)
  • (modified) flang/test/Lower/Intrinsics/exit.f90 (+1-1)
  • (modified) flang/test/Lower/Intrinsics/ieee_is_normal.f90 (+1-1)
  • (modified) flang/test/Lower/Intrinsics/isnan.f90 (+1-1)
  • (modified) flang/test/Lower/Intrinsics/modulo.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/Todo/omp-declarative-allocate.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/Todo/omp-declare-reduction.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/Todo/omp-declare-simd.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/parallel-lastprivate-clause-scalar.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/parallel-wsloop-reduction-byref.f90 (+1-1)
  • (modified) flang/test/Lower/OpenMP/parallel-wsloop-reduction.f90 (+1-1)
  • (modified) flang/test/lit.cfg.py (+2-2)
  • (modified) flang/tools/f18/CMakeLists.txt (+5-5)
  • (modified) flang/tools/flang-driver/CMakeLists.txt (+6-6)
  • (modified) flang/tools/flang-driver/driver.cpp (+3-3)
  • (modified) llvm/runtimes/CMakeLists.txt (+5-5)
  • (modified) offload/CMakeLists.txt (+2-2)
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 23bd686a85f526..2b8719944cfe88 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -6062,7 +6062,7 @@ def _sysroot_EQ : Joined<["--"], "sysroot=">, Visibility<[ClangOption, FlangOpti
 def _sysroot : Separate<["--"], "sysroot">, Alias<_sysroot_EQ>;
 
 //===----------------------------------------------------------------------===//
-// pie/pic options (clang + flang-new)
+// pie/pic options (clang + flang)
 //===----------------------------------------------------------------------===//
 let Visibility = [ClangOption, FlangOption] in {
 
@@ -6078,7 +6078,7 @@ def fno_pie : Flag<["-"], "fno-pie">, Group<f_Group>;
 } // let Vis = [Default, FlangOption]
 
 //===----------------------------------------------------------------------===//
-// Target Options (clang + flang-new)
+// Target Options (clang + flang)
 //===----------------------------------------------------------------------===//
 let Flags = [TargetSpecific] in {
 let Visibility = [ClangOption, FlangOption] in {
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index d0c8bdba0ede95..4243ee006c1553 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -2021,7 +2021,7 @@ void Driver::PrintHelp(bool ShowHidden) const {
 
 void Driver::PrintVersion(const Compilation &C, raw_ostream &OS) const {
   if (IsFlangMode()) {
-    OS << getClangToolFullVersion("flang-new") << '\n';
+    OS << getClangToolFullVersion("flang") << '\n';
   } else {
     // FIXME: The following handlers should use a callback mechanism, we don't
     // know what the client would like to do.
diff --git a/clang/lib/Driver/ToolChains/Flang.cpp b/clang/lib/Driver/ToolChains/Flang.cpp
index 6ce79d27e98c48..f03a40133c5cff 100644
--- a/clang/lib/Driver/ToolChains/Flang.cpp
+++ b/clang/lib/Driver/ToolChains/Flang.cpp
@@ -887,14 +887,12 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA,
 
   CmdArgs.push_back(Input.getFilename());
 
-  // TODO: Replace flang-new with flang once the new driver replaces the
-  // throwaway driver
-  const char *Exec = Args.MakeArgString(D.GetProgramPath("flang-new", TC));
+  const char *Exec = Args.MakeArgString(D.GetProgramPath("flang", TC));
   C.addCommand(std::make_unique<Command>(JA, *this,
                                          ResponseFileSupport::AtFileUTF8(),
                                          Exec, CmdArgs, Inputs, Output));
 }
 
-Flang::Flang(const ToolChain &TC) : Tool("flang-new", "flang frontend", TC) {}
+Flang::Flang(const ToolChain &TC) : Tool("flang", "flang frontend", TC) {}
 
 Flang::~Flang() {}
diff --git a/clang/test/Driver/flang/flang.f90 b/clang/test/Driver/flang/flang.f90
index ad4a3a3b6bd44d..b52977ee66d7b0 100644
--- a/clang/test/Driver/flang/flang.f90
+++ b/clang/test/Driver/flang/flang.f90
@@ -13,7 +13,7 @@
 ! * (no type specified, resulting in an object file)
 
 ! All invocations should begin with flang -fc1, consume up to here.
-! ALL-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
+! ALL-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
 
 ! Check that f90 files are not treated as "previously preprocessed"
 ! ... in --driver-mode=flang.
diff --git a/clang/test/Driver/flang/flang_ucase.F90 b/clang/test/Driver/flang/flang_ucase.F90
index e89c053b327bc9..88aedc39fb94a7 100644
--- a/clang/test/Driver/flang/flang_ucase.F90
+++ b/clang/test/Driver/flang/flang_ucase.F90
@@ -13,7 +13,7 @@
 ! * (no type specified, resulting in an object file)
 
 ! All invocations should begin with flang -fc1, consume up to here.
-! ALL-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
+! ALL-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
 
 ! Check that f90 files are not treated as "previously preprocessed"
 ! ... in --driver-mode=flang.
diff --git a/clang/test/Driver/flang/multiple-inputs-mixed.f90 b/clang/test/Driver/flang/multiple-inputs-mixed.f90
index 2395dbecf1fe92..98d8cab00bdfdb 100644
--- a/clang/test/Driver/flang/multiple-inputs-mixed.f90
+++ b/clang/test/Driver/flang/multiple-inputs-mixed.f90
@@ -1,7 +1,7 @@
 ! Check that flang can handle mixed C and fortran inputs.
 
 ! RUN: %clang --driver-mode=flang -### -fsyntax-only %S/Inputs/one.f90 %S/Inputs/other.c 2>&1 | FileCheck --check-prefixes=CHECK-SYNTAX-ONLY %s
-! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
+! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
 ! CHECK-SYNTAX-ONLY: "{{[^"]*}}/Inputs/one.f90"
 ! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}clang{{[^"/]*}}" "-cc1"
 ! CHECK-SYNTAX-ONLY: "{{[^"]*}}/Inputs/other.c"
diff --git a/clang/test/Driver/flang/multiple-inputs.f90 b/clang/test/Driver/flang/multiple-inputs.f90
index ada999e927a6a0..3c0f22e5d3e508 100644
--- a/clang/test/Driver/flang/multiple-inputs.f90
+++ b/clang/test/Driver/flang/multiple-inputs.f90
@@ -1,7 +1,7 @@
 ! Check that flang driver can handle multiple inputs at once.
 
 ! RUN: %clang --driver-mode=flang -### -fsyntax-only %S/Inputs/one.f90 %S/Inputs/two.f90 2>&1 | FileCheck --check-prefixes=CHECK-SYNTAX-ONLY %s
-! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
+! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
 ! CHECK-SYNTAX-ONLY: "{{[^"]*}}/Inputs/one.f90"
-! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
+! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
 ! CHECK-SYNTAX-ONLY: "{{[^"]*}}/Inputs/two.f90"
diff --git a/flang/docs/FlangDriver.md b/flang/docs/FlangDriver.md
index e1c11062125028..2bf93ff5aa847c 100644
--- a/flang/docs/FlangDriver.md
+++ b/flang/docs/FlangDriver.md
@@ -15,17 +15,13 @@ local:
 ```
 
 There are two main drivers in Flang:
-* the compiler driver, `flang-new`
-* the frontend driver, `flang-new -fc1`
-
-> **_NOTE:_** The diagrams in this document refer to `flang` as opposed to
-> `flang-new`. Eventually, `flang-new` will be renamed as `flang` and the
-> diagrams reflect the final design that we are still working towards.
+* the compiler driver, `flang`
+* the frontend driver, `flang -fc1`
 
 The **compiler driver** will allow you to control all compilation phases (e.g.
 preprocessing, semantic checks, code-generation, code-optimisation, lowering
 and linking). For frontend specific tasks, the compiler driver creates a
-Fortran compilation job and delegates it to `flang-new -fc1`, the frontend
+Fortran compilation job and delegates it to `flang -fc1`, the frontend
 driver. For linking, it creates a linker job and calls an external linker (e.g.
 LLVM's [`lld`](https://lld.llvm.org/)). It can also call other tools such as
 external assemblers (e.g. [`as`](https://www.gnu.org/software/binutils/)). In
@@ -47,7 +43,7 @@ frontend. It uses MLIR and LLVM for code-generation and can be viewed as a
 driver for Flang, LLVM and MLIR libraries. Contrary to the compiler driver, it
 is not capable of calling any external tools (including linkers).  It is aware
 of all the frontend internals that are "hidden" from the compiler driver. It
-accepts many frontend-specific options not available in `flang-new` and as such
+accepts many frontend-specific options not available in `flang` and as such
 it provides a finer control over the frontend. Note that this tool is mostly
 intended for Flang developers. In particular, there are no guarantees about the
 stability of its interface and compiler developers can use it to experiment
@@ -62,30 +58,30 @@ frontend specific flag from the _compiler_ directly to the _frontend_ driver,
 e.g.:
 
 ```bash
-flang-new -Xflang -fdebug-dump-parse-tree input.f95
+flang -Xflang -fdebug-dump-parse-tree input.f95
 ```
 
-In the invocation above, `-fdebug-dump-parse-tree` is forwarded to `flang-new
+In the invocation above, `-fdebug-dump-parse-tree` is forwarded to `flang
 -fc1`. Without the forwarding flag, `-Xflang`, you would see the following
 warning:
 
 ```bash
-flang-new: warning: argument unused during compilation:
+flang: warning: argument unused during compilation:
 ```
 
-As `-fdebug-dump-parse-tree` is only supported by `flang-new -fc1`, `flang-new`
+As `-fdebug-dump-parse-tree` is only supported by `flang -fc1`, `flang`
 will ignore it when used without `Xflang`.
 
 ## Why Do We Need Two Drivers?
-As hinted above, `flang-new` and `flang-new -fc1` are two separate tools. The
-fact that these tools are accessed through one binary, `flang-new`, is just an
+As hinted above, `flang` and `flang -fc1` are two separate tools. The
+fact that these tools are accessed through one binary, `flang`, is just an
 implementation detail. Each tool has a separate list of options, albeit defined
 in the same file: `clang/include/clang/Driver/Options.td`.
 
 The separation helps us split various tasks and allows us to implement more
-specialised tools. In particular, `flang-new` is not aware of various
+specialised tools. In particular, `flang` is not aware of various
 compilation phases within the frontend (e.g. scanning, parsing or semantic
-checks). It does not have to be. Conversely, the frontend driver, `flang-new
+checks). It does not have to be. Conversely, the frontend driver, `flang
 -fc1`, needs not to be concerned with linkers or other external tools like
 assemblers. Nor does it need to know where to look for various systems
 libraries, which is usually OS and platform specific.
@@ -104,7 +100,7 @@ GCC](https://en.wikibooks.org/wiki/GNU_C_Compiler_Internals/GNU_C_Compiler_Archi
 In fact, Flang needs to adhere to this model in order to be able to re-use
 Clang's driver library. If you are more familiar with the [architecture of
 GFortran](https://gcc.gnu.org/onlinedocs/gcc-4.7.4/gfortran/About-GNU-Fortran.html)
-than Clang, then `flang-new` corresponds to `gfortran` and `flang-new -fc1` to
+than Clang, then `flang` corresponds to `gfortran` and `flang -fc1` to
 `f951`.
 
 ## Compiler Driver
@@ -135,7 +131,7 @@ output from one action is the input for the subsequent one. You can use the
 `-ccc-print-phases` flag to see the sequence of actions that the driver will
 create for your compiler invocation:
 ```bash
-flang-new -ccc-print-phases -E file.f
+flang -ccc-print-phases -E file.f
 +- 0: input, "file.f", f95-cpp-input
 1: preprocessor, {0}, f95
 ```
@@ -143,7 +139,7 @@ As you can see, for `-E` the driver creates only two jobs and stops immediately
 after preprocessing. The first job simply prepares the input. For `-c`, the
 pipeline of the created jobs is more complex:
 ```bash
-flang-new -ccc-print-phases -c file.f
+flang -ccc-print-phases -c file.f
          +- 0: input, "file.f", f95-cpp-input
       +- 1: preprocessor, {0}, f95
    +- 2: compiler, {1}, ir
@@ -158,7 +154,7 @@ command to call the frontend driver is generated (more specifically, an
 instance of `clang::driver::Command`). Every command is bound to an instance of
 `clang::driver::Tool`. For Flang we introduced a specialisation of this class:
 `clang::driver::Flang`. This class implements the logic to either translate or
-forward compiler options to the frontend driver, `flang-new -fc1`.
+forward compiler options to the frontend driver, `flang -fc1`.
 
 You can read more on the design of `clangDriver` in Clang's [Driver Design &
 Internals](https://clang.llvm.org/docs/DriverInternals.html).
@@ -232,12 +228,12 @@ driver, `clang -cc1` and consists of the following classes:
 This list is not exhaustive and only covers the main classes that implement the
 driver. The main entry point for the frontend driver, `fc1_main`, is
 implemented in `flang/tools/flang-driver/driver.cpp`. It can be accessed by
-invoking the compiler driver, `flang-new`, with the `-fc1` flag.
+invoking the compiler driver, `flang`, with the `-fc1` flag.
 
 The frontend driver will only run one action at a time. If you specify multiple
 action flags, only the last one will be taken into account. The default action
 is `ParseSyntaxOnlyAction`, which corresponds to `-fsyntax-only`. In other
-words, `flang-new -fc1 <input-file>` is equivalent to `flang-new -fc1 -fsyntax-only
+words, `flang -fc1 <input-file>` is equivalent to `flang -fc1 -fsyntax-only
 <input-file>`.
 
 ## Adding new Compiler Options
@@ -262,8 +258,8 @@ similar semantics to your new option and start by copying that.
 For every new option, you will also have to define the visibility of the new
 option. This is controlled through the `Visibility` field. You can use the
 following Flang specific visibility flags to control this:
-  * `FlangOption` - this option will be available in the `flang-new` compiler driver,
-  * `FC1Option` - this option will be available in the `flang-new -fc1` frontend driver,
+  * `FlangOption` - this option will be available in the `flang` compiler driver,
+  * `FC1Option` - this option will be available in the `flang -fc1` frontend driver,
 
 Options that are supported by clang should explicitly specify `ClangOption` in
 `Visibility`, and options that are only supported in Flang should not specify
@@ -290,10 +286,10 @@ The parsing will depend on the semantics encoded in the TableGen definition.
 
 When adding a compiler driver option (i.e. an option that contains
 `FlangOption` among in it's `Visibility`) that you also intend to be understood
-by the frontend, make sure that it is either forwarded to `flang-new -fc1` or
+by the frontend, make sure that it is either forwarded to `flang -fc1` or
 translated into some other option that is accepted by the frontend driver. In
 the case of options that contain both `FlangOption` and `FC1Option` among its
-flags, we usually just forward from `flang-new` to `flang-new -fc1`. This is
+flags, we usually just forward from `flang` to `flang -fc1`. This is
 then tested in `flang/test/Driver/frontend-forward.F90`.
 
 What follows is usually very dependant on the meaning of the corresponding
@@ -339,11 +335,11 @@ just added using your new frontend option.
 
 ## CMake Support
 As of [#7246](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7246)
-(and soon to be released CMake 3.24.0), `cmake` can detect `flang-new` as a
+(and soon to be released CMake 3.24.0), `cmake` can detect `flang` as a
 supported Fortran compiler. You can configure your CMake projects to use
-`flang-new` as follows:
+`flang` as follows:
 ```bash
-cmake -DCMAKE_Fortran_COMPILER=<path/to/flang-new> <src/dir>
+cmake -DCMAKE_Fortran_COMPILER=<path/to/flang> <src/dir>
 ```
 You should see the following in the output:
 ```
@@ -353,14 +349,14 @@ where `<version>` corresponds to the LLVM Flang version.
 
 ## Testing
 In LIT, we define two variables that you can use to invoke Flang's drivers:
-* `%flang` is expanded as `flang-new` (i.e. the compiler driver)
-* `%flang_fc1` is expanded as `flang-new -fc1` (i.e. the frontend driver)
+* `%flang` is expanded as `flang` (i.e. the compiler driver)
+* `%flang_fc1` is expanded as `flang -fc1` (i.e. the frontend driver)
 
 For most regression tests for the frontend, you will want to use `%flang_fc1`.
 In some cases, the observable behaviour will be identical regardless of whether
 `%flang` or `%flang_fc1` is used. However, when you are using `%flang` instead
 of `%flang_fc1`, the compiler driver will add extra flags to the frontend
-driver invocation (i.e. `flang-new -fc1 -<extra-flags>`). In some cases that might
+driver invocation (i.e. `flang -fc1 -<extra-flags>`). In some cases that might
 be exactly what you want to test.  In fact, you can check these additional
 flags by using the `-###` compiler driver command line option.
 
@@ -380,7 +376,7 @@ plugins. The process for using plugins includes:
 * [Creating a plugin](#creating-a-plugin)
 * [Loading and running a plugin](#loading-and-running-a-plugin)
 
-Flang plugins are limited to `flang-new -fc1` and are currently only available /
+Flang plugins are limited to `flang -fc1` and are currently only available /
 been tested on Linux.
 
 ### Creating a Plugin
@@ -465,14 +461,14 @@ static FrontendPluginRegistry::Add<PrintFunctionNamesAction> X(
 
 ### Loading and Running a Plugin
 In order to use plugins, there are 2 command line options made available to the
-frontend driver, `flang-new -fc1`:
+frontend driver, `flang -fc1`:
 * [`-load <dsopath>`](#the--load-dsopath-option) for loading the dynamic shared
   object of the plugin
 * [`-plugin <name>`](#the--plugin-name-option) for calling the registered plugin
 
 Invocation of the example plugin is done through:
 ```bash
-flang-new -fc1 -load flangPrintFunctionNames.so -plugin print-fns file.f90
+flang -fc1 -load flangPrintFunctionNames.so -plugin print-fns file.f90
 ```
 
 Both these options are parsed in `flang/lib/Frontend/CompilerInvocation.cpp` and
@@ -493,7 +489,7 @@ reports an error diagnostic and returns `nullptr`.
 
 ### Enabling In-Tree Plugins
 For in-tree plugins, there is the CMake flag `FLANG_PLUGIN_SUPPORT`, enabled by
-default, that controls the exporting of executable symbols from `flang-new`,
+default, that controls the exporting of executable symbols from `flang`,
 which plugins need access to. Additionally, there is the CMake flag
 `LLVM_BUILD_EXAMPLES`, turned off by default, that is used to control if the
 example programs are built. This includes plugins that are in the
@@ -526,7 +522,7 @@ invocations `invokeFIROptEarlyEPCallbacks`, `invokeFIRInlinerCallback`, and
 `invokeFIROptLastEPCallbacks` for Flang drivers to be able to insert additonal
 passes at different points of the default pass pipeline. An example use of these
 extension point callbacks is shown in `registerDefaultInlinerPass` to invoke the
-default inliner pass in `flang-new`.
+default inliner pass in `flang`.
 
 ## LLVM Pass Plugins
 
@@ -539,7 +535,7 @@ documentation for
 [`llvm::PassBuilder`](https://llvm.org/doxygen/classllvm_1_1PassBuilder.html)
 for details.
 
-The framework to enable pass plugins in `flang-new` uses the exact same
+The framework to enable pass plugins in `flang` uses the exact same
 machinery as that used by `clang` and thus has the same capabilities and
 limitations.
 
@@ -547,7 +543,7 @@ In order to use a pass plugin, the pass(es) must be compiled into a dynamic
 shared object which is then loaded using the `-fpass-plugin` option.
 
 ```
-flang-new -fpass-plugin=/path/to/plugin.so <file.f90>
+flang -fpass-plugin=/path/to/plugin.so <file.f90>
 ```
 
 This option is available in both the compiler driver and the frontend driver.
@@ -559,7 +555,7 @@ Pass extensions are similar to plugins, except that they can also be linked
 statically. Setting `-DLLVM_${NAME}_LINK_INTO_TOOLS` to `ON` in the cmake
 command turns the project into a statically linked extension. An example would
 be Polly, e.g., using `-DLLVM_POLLY_LINK_INTO_TOOLS=ON` would link Polly passes
-into `flang-new` as built-in middle-end passes.
+into `flang` as built-in middle-end passes.
 
 See the
 [`WritingAnLLVMNewPMPass`](https://llvm.org/docs/WritingAnLLVMNewPMPass.html#id9)
diff --git a/flang/docs/ImplementingASemanticCheck.md b/flang/docs/ImplementingASemanticCheck.md
index 5b583d4f8031b8..598ef696ad14bf 100644
--- a/flang/docs/ImplementingASemanticCheck.md
+++ b/flang/docs/ImplementingASemanticCheck.md
@@ -68,7 +68,7 @@ of the call to `intentOutFunc()`:
 
 I also used this program to produce a parse tree for the program using the command:
 ```bash
-  flang-new -fc1 -fdebug-dump-parse-tree testfun.f90
+  flang -fc1 -fdebug-dump-parse-tree testfun.f90
 ```
 
 Here's the relevant fragment of the parse tree produced by the compiler:
@@ -296,7 +296,7 @@ In `lib/Semantics/check-do.cpp`, I added an (almost empty) implementation:
 I then built the compiler with these changes and ran it on my test program.
 This time, I made sure to invoke semantic checking.  Here's the command I used:
 ```bash
-  flang-new -fc1 -fdebug-unparse-with-symbols testfun.f90
+  flang -fc1 -fdebug-unparse-with-symbols testfun.f90
 ```
 
 This produced the output:
diff --git a/flang/docs/Overview.md b/flang/docs/Overview.md
index 6eba19ea3a3c0d..dfb4d89264a755 100644
--- a/flang/docs/Overview.md
+++ b/flang/docs/Overview.md
@@ -65,8 +65,8 @@ See [Preprocessing.md](Preprocessing.md).
 **Entry point:** `parser::Parsing::Prescan`
 
 **Commands:** 
- - `flang-new -fc1 -E src.f90` dumps the cooked character stream
- - `flang-new -fc1 -fdebug-dump-provenance src.f90` dumps provenance
+ - `flang -fc1 -E src.f90` dumps the cooked character stream
+ - `flang -fc1 -fdebug-dump-provenance src.f90` dumps provenance
    information
 
 ### Parsing
@@ -80,10 +80,10 @@ representing a syntactically correct program, ro...
[truncated]

Copy link

github-actions bot commented Sep 25, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@kawashima-fj
Copy link
Member

Thanks for the PR.
Is there a symbolic link flang-new -> flang? We would like to have a transitional period.

@mjklemm
Copy link
Contributor

mjklemm commented Sep 26, 2024

I have seen some more matches for flang-new in the tree:

1:.github/workflows/release-binaries.yml:331:          ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build/tools/clang/stage2-bins/ -j2 flang-new bbc
2:openmp/CMakeLists.txt:72:    set(OPENMP_TEST_Fortran_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/flang-new)
3:openmp/CMakeLists.txt:74:    set(OPENMP_TEST_Fortran_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/flang-new.exe)

Since I'm travelling, I haven't dug any further at this point.

@DavidSpickett
Copy link
Collaborator

Is there a symbolic link flang-new -> flang? We would like to have a transitional period.

Compiler Explorer would also appreciate this. Though I should be able to get it switched to the new name within a week or two.

@DavidSpickett
Copy link
Collaborator

Also buildbots reference flang-new. We can change the config files very quickly, but getting it into production will be a week or two. A symlink would help here.

@h-vetinari
Copy link
Contributor

If you want to compare notes, I recently rebased #74377, and tried to pick up all additional occurrences I could find. Here's the branch.

@everythingfunctional
Copy link
Contributor Author

I have seen some more matches for flang-new in the tree:

Good catch. I'm pretty sure I got them all now

Is there a symbolic link flang-new -> flang? We would like to have a transitional period.

I wasn't quite sure it was warranted, but seems like it is so I've added it back.

If you want to compare notes, I recently rebased #74377,

This was helpful for putting the symlink in, so I gave you co-authorship on that commit. Let me know if you don't actually want it.

@h-vetinari
Copy link
Contributor

This was helpful for putting the symlink in, so I gave you co-authorship on that commit. Let me know if you don't actually want it.

That was all @banach-space's work, I only rebased his commit. Don't think that's worth co-authorship; though ultimately you can decide, I don't mind either way.

@everythingfunctional
Copy link
Contributor Author

That was all @banach-space's work, I only rebased his commit. Don't think that's worth co-authorship; though ultimately you can decide,

You did some of the leg work and pointed me at it. I think that deserves at least some credit, and it's already there, so I don't think it's worth removing now.

@everythingfunctional
Copy link
Contributor Author

@kiranchandramohan , I don't have commit access, so could you merge for me?

@kiranchandramohan kiranchandramohan merged commit 06eb10d into llvm:main Oct 10, 2024
36 of 40 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 10, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-fuzzer running on sanitizer-buildbot11 while building .github,clang,flang,llvm,offload,openmp at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/159/builds/7879

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure) (timed out)
...
    #6 0xacedca160438 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile>>&) /home/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:910:5
    #7 0xacedca14f828 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /home/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:915:6
    #8 0xacedca178ec4 in main /home/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #9 0xe71967a684c0  (/lib/aarch64-linux-gnu/libc.so.6+0x284c0) (BuildId: 32fa4d6f3a8d5f430bdb7af2eb779470cd5ec7c2)
    #10 0xe71967a68594 in __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x28594) (BuildId: 32fa4d6f3a8d5f430bdb7af2eb779470cd5ec7c2)
    #11 0xacedca143cac in _start (/home/b/sanitizer-aarch64-linux-fuzzer/build/RUNDIR-c-ares-CVE-2016-5180/c-ares-CVE-2016-5180-fsanitize_fuzzer+0xb3cac)

SUMMARY: AddressSanitizer: heap-buffer-overflow ares_create_query.c in ares_create_query�
@@@BUILD_STEP test openssl-1.0.1f fuzzer@@@
Cloning into 'SRC'...
command timed out: 1200 seconds without output running [b'python', b'../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=2985.777262
Step 13 (test openssl-1.0.1f fuzzer) failure: test openssl-1.0.1f fuzzer (failure)
@@@BUILD_STEP test openssl-1.0.1f fuzzer@@@
Cloning into 'SRC'...

command timed out: 1200 seconds without output running [b'python', b'../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=2985.777262

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 10, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux running on sanitizer-buildbot2 while building .github,clang,flang,llvm,offload,openmp at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/4738

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[385/391] Generating FuzzerUtils-x86_64-Test
[386/391] Generating MSAN_INST_GTEST.gtest-all.cc.x86_64.o
[387/391] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.x86_64-with-call.o
[388/391] Generating Msan-x86_64-with-call-Test
[389/391] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.x86_64.o
[390/391] Generating Msan-x86_64-Test
[390/391] Running compiler_rt regression tests
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 4686 of 10415 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.
FAIL: libFuzzer-x86_64-static-libcxx-Linux :: reduce_inputs.test (4580 of 4686)
******************** TEST 'libFuzzer-x86_64-static-libcxx-Linux :: reduce_inputs.test' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: rm -rf /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C
+ rm -rf /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C
RUN: at line 4: mkdir -p /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C
+ mkdir -p /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C
RUN: at line 5: /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang    -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta   --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/fuzzer -m64 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/ShrinkControlFlowSimpleTest.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowSimpleTest
+ /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/fuzzer -m64 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/ShrinkControlFlowSimpleTest.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowSimpleTest
RUN: at line 6: /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang    -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta   --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/fuzzer -m64 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/ShrinkControlFlowTest.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowTest
+ /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/fuzzer -m64 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/ShrinkControlFlowTest.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowTest
RUN: at line 7: /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowSimpleTest  -exit_on_item=0eb8e4ed029b774d80f2b66408203801cb982a60   -runs=1000000 /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C 2>&1 | FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/reduce_inputs.test
+ /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowSimpleTest -exit_on_item=0eb8e4ed029b774d80f2b66408203801cb982a60 -runs=1000000 /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C
+ FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/reduce_inputs.test
RUN: at line 11: /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowSimpleTest -runs=0 /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C 2>&1 | FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/reduce_inputs.test --check-prefix=COUNT
+ /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowSimpleTest -runs=0 /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C
+ FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/reduce_inputs.test --check-prefix=COUNT
/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/reduce_inputs.test:12:8: error: COUNT: expected string not found in input
COUNT: seed corpus: files: 4
       ^
<stdin>:1:1: note: scanning from here
INFO: Running with entropic power schedule (0xFF, 100).
^
<stdin>:7:7: note: possible intended match here
INFO: seed corpus: files: 3 min: 2b max: 3b total: 7b rss: 31Mb
      ^

Input file: <stdin>
Check file: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/reduce_inputs.test

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: INFO: Running with entropic power schedule (0xFF, 100). 
check:12'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
Step 11 (test compiler-rt debug) failure: test compiler-rt debug (failure)
...
[385/391] Generating FuzzerUtils-x86_64-Test
[386/391] Generating MSAN_INST_GTEST.gtest-all.cc.x86_64.o
[387/391] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.x86_64-with-call.o
[388/391] Generating Msan-x86_64-with-call-Test
[389/391] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.x86_64.o
[390/391] Generating Msan-x86_64-Test
[390/391] Running compiler_rt regression tests
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 4686 of 10415 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.
FAIL: libFuzzer-x86_64-static-libcxx-Linux :: reduce_inputs.test (4580 of 4686)
******************** TEST 'libFuzzer-x86_64-static-libcxx-Linux :: reduce_inputs.test' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: rm -rf /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C
+ rm -rf /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C
RUN: at line 4: mkdir -p /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C
+ mkdir -p /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C
RUN: at line 5: /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang    -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta   --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/fuzzer -m64 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/ShrinkControlFlowSimpleTest.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowSimpleTest
+ /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/fuzzer -m64 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/ShrinkControlFlowSimpleTest.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowSimpleTest
RUN: at line 6: /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang    -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta   --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/fuzzer -m64 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/ShrinkControlFlowTest.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowTest
+ /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/fuzzer -m64 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/ShrinkControlFlowTest.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowTest
RUN: at line 7: /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowSimpleTest  -exit_on_item=0eb8e4ed029b774d80f2b66408203801cb982a60   -runs=1000000 /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C 2>&1 | FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/reduce_inputs.test
+ /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowSimpleTest -exit_on_item=0eb8e4ed029b774d80f2b66408203801cb982a60 -runs=1000000 /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C
+ FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/reduce_inputs.test
RUN: at line 11: /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowSimpleTest -runs=0 /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C 2>&1 | FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/reduce_inputs.test --check-prefix=COUNT
+ /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp-ShrinkControlFlowSimpleTest -runs=0 /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/fuzzer/X86_64StaticLibcxxLinuxConfig/Output/reduce_inputs.test.tmp/C
+ FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/reduce_inputs.test --check-prefix=COUNT
/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/reduce_inputs.test:12:8: error: COUNT: expected string not found in input
COUNT: seed corpus: files: 4
       ^
<stdin>:1:1: note: scanning from here
INFO: Running with entropic power schedule (0xFF, 100).
^
<stdin>:7:7: note: possible intended match here
INFO: seed corpus: files: 3 min: 2b max: 3b total: 7b rss: 31Mb
      ^

Input file: <stdin>
Check file: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/reduce_inputs.test

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: INFO: Running with entropic power schedule (0xFF, 100). 
check:12'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found

@h-vetinari
Copy link
Contributor

Congratulations on this huge milestone to all involved in flang! 🍾 🥳 🚀

@everythingfunctional everythingfunctional deleted the rename-flang-new branch October 10, 2024 12:41
@RichBarton-Arm
Copy link
Collaborator

+1000
Great to see this finally happen. Great job everyone!

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 10, 2024

LLVM Buildbot has detected a new failure on builder lld-x86_64-win running on as-worker-93 while building .github,clang,flang,llvm,offload,openmp at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/1351

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM-Unit :: Support/./SupportTests.exe/35/87' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:C:\a\lld-x86_64-win\build\unittests\Support\.\SupportTests.exe-LLVM-Unit-9996-35-87.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=87 GTEST_SHARD_INDEX=35 C:\a\lld-x86_64-win\build\unittests\Support\.\SupportTests.exe
--

Script:
--
C:\a\lld-x86_64-win\build\unittests\Support\.\SupportTests.exe --gtest_filter=ProgramEnvTest.CreateProcessLongPath
--
C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp(160): error: Expected equality of these values:
  0
  RC
    Which is: -2

C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp(163): error: fs::remove(Twine(LongPath)): did not return errc::success.
error number: 13
error message: permission denied



C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp:160
Expected equality of these values:
  0
  RC
    Which is: -2

C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp:163
fs::remove(Twine(LongPath)): did not return errc::success.
error number: 13
error message: permission denied




********************


@everythingfunctional
Copy link
Contributor Author

@klausler , can you point me specifically at the failure messages? The failures I've seen so far from the merge did not look related to my (admittedly untrained) eye. I ran the tests in the repo and they passed locally. Are there other tests somewhere that need to be updated as well?

@klausler
Copy link
Contributor

@klausler , can you point me specifically at the failure messages? The failures I've seen so far from the merge did not look related to my (admittedly untrained) eye. I ran the tests in the repo and they passed locally. Are there other tests somewhere that need to be updated as well?

They haven't shown up in the build bots, so it must be something in my local environment that I've missed. If you ran llvm-test-suite's Fortran tests cleanly, then don't worry.

@kiranchandramohan
Copy link
Contributor

The 2 stage buildbot (https://lab.llvm.org/buildbot/#/builders/41) with the Fortran tests passed after this merge. Its latest run is also a pass.

@kiranchandramohan
Copy link
Contributor

@everythingfunctional Following are the steps to run the testsuite. Please check and confirm if you did not run it before.

git clone https://github.com/llvm/llvm-test-suite.git
cd llvm-test-suite
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$HOME/llvm-project/build_release/bin/clang  -DCMAKE_CXX_COMPILER=$HOME/llvm-project/build_release/bin/clang++ -DCMAKE_Fortran_COMPILER=$HOME/llvm-project/build_release/bin/flang-new -DTEST_SUITE_FORTRAN=On -DTEST_SUITE_SUBDIRS=Fortran -DTEST_SUITE_FORTRAN_ISO_C_HEADER_DIR=$HOME/llvm-project/flang/include/flang ../
make -j48
NO_STOP_MESSAGE=1 $HOME/llvm-project/build_release/bin/llvm-lit -v  .

@everythingfunctional
Copy link
Contributor Author

@everythingfunctional Following are the steps to run the testsuite. Please check and confirm if you did not run it before.

git clone https://github.com/llvm/llvm-test-suite.git
cd llvm-test-suite
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$HOME/llvm-project/build_release/bin/clang  -DCMAKE_CXX_COMPILER=$HOME/llvm-project/build_release/bin/clang++ -DCMAKE_Fortran_COMPILER=$HOME/llvm-project/build_release/bin/flang-new -DTEST_SUITE_FORTRAN=On -DTEST_SUITE_SUBDIRS=Fortran -DTEST_SUITE_FORTRAN_ISO_C_HEADER_DIR=$HOME/llvm-project/flang/include/flang ../
make -j48
NO_STOP_MESSAGE=1 $HOME/llvm-project/build_release/bin/llvm-lit -v  .

Only failure I got was:

Failed Tests (1):
  test-suite :: Fortran/gfortran/regression/gomp/gfortran-regression-compile-regression__gomp__proc_ptr_1_f90.test

Which I don't think the rename is at fault for.

@klausler
Copy link
Contributor

Which I don't think the rename is at fault for.

If you rebase to current llvm-project/main, that test will (or should) work; it got broken yesterday and was fixed later.

searlmc1 pushed a commit to ROCm/llvm-project that referenced this pull request Oct 10, 2024
lands and reverts
06eb10d [flang][driver] rename flang-new to flang (llvm#110023)

Change-Id: I4c5a907e71556ae9a1aa7ba1f2c3a3b9d9e9270a
skatrak added a commit to ROCm/llvm-project that referenced this pull request Oct 11, 2024
DanielCChen pushed a commit to DanielCChen/llvm-project that referenced this pull request Oct 16, 2024
This does a global rename from `flang-new` to `flang`. I also
removed/changed any TODOs that I found related to making this change.

---------

Co-authored-by: H. Vetinari <[email protected]>
Co-authored-by: Andrzej Warzynski <[email protected]>
@sylvestre
Copy link
Collaborator

@everythingfunctional with this change and install, we are installing flang with the -20 in the install dir:
-- Installing: /build/source/debian/tmp/usr/lib/llvm-20/bin/flang-20

it should not be the case, it should be named /usr/lib/llvm-20/bin/flang to match what is done elsewhere

@everythingfunctional
Copy link
Contributor Author

@everythingfunctional with this change and install, we are installing flang with the -20 in the install dir: -- Installing: /build/source/debian/tmp/usr/lib/llvm-20/bin/flang-20

it should not be the case, it should be named /usr/lib/llvm-20/bin/flang to match what is done elsewhere

Forgive me if I misunderstood or implemented this incorrectly, but I was under the impression (based on an earlier comment) that this was the intended behavior.

@hakostra
Copy link

hakostra commented Nov 1, 2024

I have freshly compiled and installed LLVM flang after the rename. I have:

$ ll flang*
lrwxrwxrwx 1 hakostra hakostra         8 okt.  15 17:03 flang -> flang-20*
-rwxr-xr-x 1 hakostra hakostra 176517648 okt.  23 12:03 flang-20*
lrwxrwxrwx 1 hakostra hakostra         5 okt.  23 12:13 flang-new -> flang*
$ ll clang*
lrwxrwxrwx 1 hakostra hakostra         8 okt.  15 17:03 clang -> clang-20*
lrwxrwxrwx 1 hakostra hakostra         5 okt.  23 12:13 clang++ -> clang*
-rwxr-xr-x 1 hakostra hakostra 156923176 okt.  23 11:49 clang-20*

so flang-20 and clang-20 are the actual binaries, flang and clang are symlinks to these. Also, on my system, /usr/bin/gcc is just a symlink to whatever gcc version I have, for in my case /usr/bin/gcc-13. Same for gfortran. So it's the same naming scheme.

This is intended behavior. If flang was the name of the binary and flang-20 the symlink, it would not be possible to have several versions installed in besides each other.

@sylvestre
Copy link
Collaborator

Did you try with a prefix and then ninja install?

It has a different behavior between Clang and flang

@hakostra
Copy link

hakostra commented Nov 1, 2024

I use -DCMAKE_INSTALL_PREFIX= as an argument to cmake and ninja install - that gives the layout above.

@sylvestre
Copy link
Collaborator

OK, bizarre.
With apt.llvm.org, flang is the only one with the prefix (-20) in /usr/lib/llvm-20/bin/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category flang:driver flang:fir-hlfir flang:openmp flang:runtime flang Flang issues not falling into any other category github:workflow offload openmp:libomp OpenMP host runtime openmp:libomptarget OpenMP offload runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.