Skip to content

Commit f11212c

Browse files
authored
[flang][driver] rename flang-new to flang (llvm#110023) (llvm#1434)
2 parents e2def2e + f31d0cf commit f11212c

File tree

80 files changed

+261
-265
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+261
-265
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6320,7 +6320,7 @@ def _sysroot_EQ : Joined<["--"], "sysroot=">, Visibility<[ClangOption, FlangOpti
63206320
def _sysroot : Separate<["--"], "sysroot">, Alias<_sysroot_EQ>;
63216321

63226322
//===----------------------------------------------------------------------===//
6323-
// pie/pic options (clang + flang-new)
6323+
// pie/pic options (clang + flang)
63246324
//===----------------------------------------------------------------------===//
63256325
let Visibility = [ClangOption, FlangOption] in {
63266326

@@ -6336,7 +6336,7 @@ def fno_pie : Flag<["-"], "fno-pie">, Group<f_Group>;
63366336
} // let Vis = [Default, FlangOption]
63376337

63386338
//===----------------------------------------------------------------------===//
6339-
// Target Options (clang + flang-new)
6339+
// Target Options (clang + flang)
63406340
//===----------------------------------------------------------------------===//
63416341
let Flags = [TargetSpecific] in {
63426342
let Visibility = [ClangOption, FlangOption] in {

clang/lib/Driver/Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2289,7 +2289,7 @@ void Driver::PrintHelp(bool ShowHidden) const {
22892289

22902290
void Driver::PrintVersion(const Compilation &C, raw_ostream &OS) const {
22912291
if (IsFlangMode()) {
2292-
OS << getClangToolFullVersion("flang-new") << '\n';
2292+
OS << getClangToolFullVersion("flang") << '\n';
22932293
} else {
22942294
// FIXME: The following handlers should use a callback mechanism, we don't
22952295
// know what the client would like to do.

clang/lib/Driver/README_amd_driver_trunk_diffs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ subsystems.
1717
These are the areas where amd-staging differs from the trunk:
1818

1919
- Support for legacy/classic flang driver. This will eventually go away
20-
when llvm flang (flang-new) is in production.
20+
when llvm flang (flang) is in production.
2121

2222
- Support for the generation of parallel jobs. Unless someone upstreams
2323
this support, this difference will remain.

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9103,7 +9103,7 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
91039103
assert(Input.isFilename() && "Invalid input.");
91049104
CmdArgs.push_back(Input.getFilename());
91059105

9106-
// TODO This is a workaround to enable using -save-temps with flang-new
9106+
// TODO This is a workaround to enable using -save-temps with flang
91079107
// const char *Exec = getToolChain().getDriver().getClangProgramPath();
91089108
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("clang"));
91099109
if (D.CC1Main && !D.CCGenDiagnostics) {

clang/lib/Driver/ToolChains/Flang.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,14 +1014,12 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA,
10141014
checkForAMDProprietaryOptOptions(TC, D, Args, CmdArgs, false /*isLLD*/,
10151015
false /*checkOnly*/);
10161016

1017-
// TODO: Replace flang-new with flang once the new driver replaces the
1018-
// throwaway driver
1019-
const char *Exec = Args.MakeArgString(D.GetProgramPath("flang-new", TC));
1017+
const char *Exec = Args.MakeArgString(D.GetProgramPath("flang", TC));
10201018
C.addCommand(std::make_unique<Command>(JA, *this,
10211019
ResponseFileSupport::AtFileUTF8(),
10221020
Exec, CmdArgs, Inputs, Output));
10231021
}
10241022

1025-
Flang::Flang(const ToolChain &TC) : Tool("flang-new", "flang frontend", TC) {}
1023+
Flang::Flang(const ToolChain &TC) : Tool("flang", "flang frontend", TC) {}
10261024

10271025
Flang::~Flang() {}

clang/test/Driver/flang/flang.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
! * (no type specified, resulting in an object file)
1717

1818
! All invocations should begin with flang -fc1, consume up to here.
19-
! ALL-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
19+
! ALL-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
2020

2121
! Check that f90 files are not treated as "previously preprocessed"
2222
! ... in --driver-mode=flang.

clang/test/Driver/flang/flang_ucase.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
! * (no type specified, resulting in an object file)
1717

1818
! All invocations should begin with flang -fc1, consume up to here.
19-
! ALL-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
19+
! ALL-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
2020

2121
! Check that f90 files are not treated as "previously preprocessed"
2222
! ... in --driver-mode=flang.

clang/test/Driver/flang/multiple-inputs-mixed.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
! UNSUPPORTED
55

66
! RUN: %clang --driver-mode=flang -### -fsyntax-only %S/Inputs/one.f90 %S/Inputs/other.c 2>&1 | FileCheck --check-prefixes=CHECK-SYNTAX-ONLY %s
7-
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
7+
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
88
! CHECK-SYNTAX-ONLY: "{{[^"]*}}/Inputs/one.f90"
99
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}clang{{[^"/]*}}" "-cc1"
1010
! CHECK-SYNTAX-ONLY: "{{[^"]*}}/Inputs/other.c"

clang/test/Driver/flang/multiple-inputs.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
! UNSUPPORTED
55

66
! RUN: %clang --driver-mode=flang -### -fsyntax-only %S/Inputs/one.f90 %S/Inputs/two.f90 2>&1 | FileCheck --check-prefixes=CHECK-SYNTAX-ONLY %s
7-
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
7+
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
88
! CHECK-SYNTAX-ONLY: "{{[^"]*}}/Inputs/one.f90"
9-
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
9+
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
1010
! CHECK-SYNTAX-ONLY: "{{[^"]*}}/Inputs/two.f90"

clang/tools/amdllvm/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,8 @@ add_clang_tool(amdllvm
66
amdllvm.cpp
77
)
88

9-
option(CLANG_LINK_FLANG "Create flang install link to clang" ON)
10-
119
list(APPEND CLANG_LINKS_TO_CREATE clang clang++ clang-cl clang-cpp clang-${CLANG_VERSION_MAJOR} lld)
1210

13-
if(CLANG_LINK_FLANG)
14-
list(APPEND CLANG_LINKS_TO_CREATE flang flang-new)
15-
endif()
16-
1711
foreach(link ${CLANG_LINKS_TO_CREATE})
1812
add_clang_symlink("amd${link}" amdllvm)
1913
endforeach()

clang/tools/driver/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ foreach(link ${CLANG_LINKS_TO_CREATE} ${HLSL_LINK})
108108
endif()
109109
endforeach()
110110
install(SCRIPT ${INSTALL_SYMLINK}
111-
CODE "install_symlink(flang flang-new bin create_symlink)"
111+
CODE "install_symlink(flang flang bin create_symlink)"
112112
COMPONENT ${component})
113113
else()
114114
add_clang_symlink(${link} clang)

flang-rt/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ set(FLANG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../flang")
2727
# LLVM's requirement is only CMake 3.20, teach CMake 3.20-3.23 how to use Flang.
2828
if (CMAKE_VERSION VERSION_LESS "3.24")
2929
cmake_path(GET CMAKE_Fortran_COMPILER STEM _Fortran_COMPILER_STEM)
30-
if (_Fortran_COMPILER_STEM STREQUAL "flang-new" OR _Fortran_COMPILER_STEM STREQUAL "flang")
30+
if (_Fortran_COMPILER_STEM STREQUAL "flang")
3131
include(CMakeForceCompiler)
3232
CMAKE_FORCE_Fortran_COMPILER("${CMAKE_Fortran_COMPILER}" "LLVMFlang")
3333

flang/docs/DoConcurrentConversionToOpenMP-atd.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ local:
1717
This document seeks to describe the effort to parallelize `do concurrent` loops
1818
by mapping them to OpenMP worksharing constructs. The goals of this document
1919
are:
20-
* Describing how to instruct `flang-new` to map `DO CONCURENT` loops to OpenMP
20+
* Describing how to instruct `flang` to map `DO CONCURENT` loops to OpenMP
2121
constructs.
2222
* Tracking the current status of such mapping.
2323
* Describing the limitations of the current implmenentation.
2424
* Describing next steps.
2525

2626
## Usage
2727

28-
In order to enable `do concurrent` to OpenMP mapping, `flang-new` adds a new
28+
In order to enable `do concurrent` to OpenMP mapping, `flang` adds a new
2929
compiler flag: `-fdo-concurrent-parallel`. This flags has 3 possible values:
3030
1. `host`: this maps `do concurent` loops to run in parallel on the host CPU.
3131
This maps such loops to the equivalent of `omp parallel do`.
@@ -39,7 +39,7 @@ The above compiler switch is currently avaialble only when OpenMP is also
3939
enabled. So you need to provide the following options to flang in order to
4040
enable it:
4141
```
42-
flang-new ... -fopenmp -fdo-concurrent-parallel=[host|device|none] ...
42+
flang ... -fopenmp -fdo-concurrent-parallel=[host|device|none] ...
4343
```
4444

4545
## Current status

0 commit comments

Comments
 (0)