[flang-commits] [clang] [flang] [llvm] [flang][driver] rename flang-new to flang (PR #110023)
via flang-commits
flang-commits at lists.llvm.org
Wed Sep 25 11:28:03 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-driver
Author: Brad Richardson (everythingfunctional)
<details>
<summary>Changes</summary>
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
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]
``````````
</details>
https://github.com/llvm/llvm-project/pull/110023
More information about the flang-commits
mailing list