r329965 - Remove -cc1 option "-backend-option".
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 12 15:21:36 PDT 2018
Author: efriedma
Date: Thu Apr 12 15:21:36 2018
New Revision: 329965
URL: http://llvm.org/viewvc/llvm-project?rev=329965&view=rev
Log:
Remove -cc1 option "-backend-option".
It means the same thing as -mllvm; there isn't any reason to have two
options which do the same thing.
Differential Revision: https://reviews.llvm.org/D45109
Removed:
cfe/trunk/test/Frontend/backend-option.c
Modified:
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/include/clang/Frontend/CodeGenOptions.h
cfe/trunk/lib/CodeGen/BackendUtil.cpp
cfe/trunk/lib/Driver/ToolChains/Clang.cpp
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/test/CodeGen/thinlto-backend-option.ll
cfe/trunk/test/CodeGenCUDA/link-device-bitcode.cu
cfe/trunk/test/Driver/aarch64-fix-cortex-a53-835769.c
cfe/trunk/test/Driver/apple-kext-mkernel.c
cfe/trunk/test/Driver/arm-restrict-it.c
cfe/trunk/test/Driver/debug-options.c
cfe/trunk/test/Driver/mglobal-merge.c
cfe/trunk/test/Driver/woa-restrict-it.c
Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=329965&r1=329964&r2=329965&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Thu Apr 12 15:21:36 2018
@@ -275,8 +275,6 @@ def split_stacks : Flag<["-"], "split-st
HelpText<"Try to use a split stack if possible.">;
def mno_zero_initialized_in_bss : Flag<["-"], "mno-zero-initialized-in-bss">,
HelpText<"Do not put zero initialized data in the BSS">;
-def backend_option : Separate<["-"], "backend-option">,
- HelpText<"Additional arguments to forward to LLVM backend (during code gen)">;
def mregparm : Separate<["-"], "mregparm">,
HelpText<"Limit the number of registers available for integer arguments">;
def munwind_tables : Flag<["-"], "munwind-tables">,
Modified: cfe/trunk/include/clang/Frontend/CodeGenOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CodeGenOptions.h?rev=329965&r1=329964&r2=329965&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/CodeGenOptions.h (original)
+++ cfe/trunk/include/clang/Frontend/CodeGenOptions.h Thu Apr 12 15:21:36 2018
@@ -177,9 +177,6 @@ public:
/// function instead of to trap instructions.
std::string TrapFuncName;
- /// A list of command-line options to forward to the LLVM backend.
- std::vector<std::string> BackendOptions;
-
/// A list of dependent libraries.
std::vector<std::string> DependentLibraries;
Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=329965&r1=329964&r2=329965&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Thu Apr 12 15:21:36 2018
@@ -658,8 +658,6 @@ static void setCommandLineOpts(const Cod
BackendArgs.push_back("-limit-float-precision");
BackendArgs.push_back(CodeGenOpts.LimitFloatPrecision.c_str());
}
- for (const std::string &BackendOption : CodeGenOpts.BackendOptions)
- BackendArgs.push_back(BackendOption.c_str());
BackendArgs.push_back(nullptr);
llvm::cl::ParseCommandLineOptions(BackendArgs.size() - 1,
BackendArgs.data());
Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=329965&r1=329964&r2=329965&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Thu Apr 12 15:21:36 2018
@@ -1350,7 +1350,7 @@ void Clang::AddARMTargetArgs(const llvm:
// Forward the -mglobal-merge option for explicit control over the pass.
if (Arg *A = Args.getLastArg(options::OPT_mglobal_merge,
options::OPT_mno_global_merge)) {
- CmdArgs.push_back("-backend-option");
+ CmdArgs.push_back("-mllvm");
if (A->getOption().matches(options::OPT_mno_global_merge))
CmdArgs.push_back("-arm-global-merge=false");
else
@@ -1464,21 +1464,21 @@ void Clang::AddAArch64TargetArgs(const A
if (Arg *A = Args.getLastArg(options::OPT_mfix_cortex_a53_835769,
options::OPT_mno_fix_cortex_a53_835769)) {
- CmdArgs.push_back("-backend-option");
+ CmdArgs.push_back("-mllvm");
if (A->getOption().matches(options::OPT_mfix_cortex_a53_835769))
CmdArgs.push_back("-aarch64-fix-cortex-a53-835769=1");
else
CmdArgs.push_back("-aarch64-fix-cortex-a53-835769=0");
} else if (Triple.isAndroid()) {
// Enabled A53 errata (835769) workaround by default on android
- CmdArgs.push_back("-backend-option");
+ CmdArgs.push_back("-mllvm");
CmdArgs.push_back("-aarch64-fix-cortex-a53-835769=1");
}
// Forward the -mglobal-merge option for explicit control over the pass.
if (Arg *A = Args.getLastArg(options::OPT_mglobal_merge,
options::OPT_mno_global_merge)) {
- CmdArgs.push_back("-backend-option");
+ CmdArgs.push_back("-mllvm");
if (A->getOption().matches(options::OPT_mno_global_merge))
CmdArgs.push_back("-aarch64-enable-global-merge=false");
else
@@ -3048,13 +3048,13 @@ static void RenderDebugOptions(const Too
// Always enabled for SCE tuning.
if (Args.hasArg(options::OPT_gdwarf_aranges) ||
DebuggerTuning == llvm::DebuggerKind::SCE) {
- CmdArgs.push_back("-backend-option");
+ CmdArgs.push_back("-mllvm");
CmdArgs.push_back("-generate-arange-section");
}
if (Args.hasFlag(options::OPT_fdebug_types_section,
options::OPT_fno_debug_types_section, false)) {
- CmdArgs.push_back("-backend-option");
+ CmdArgs.push_back("-mllvm");
CmdArgs.push_back("-generate-type-units");
}
@@ -4073,17 +4073,17 @@ void Clang::ConstructJob(Compilation &C,
if (Arg *A = Args.getLastArg(options::OPT_mrestrict_it,
options::OPT_mno_restrict_it)) {
if (A->getOption().matches(options::OPT_mrestrict_it)) {
- CmdArgs.push_back("-backend-option");
+ CmdArgs.push_back("-mllvm");
CmdArgs.push_back("-arm-restrict-it");
} else {
- CmdArgs.push_back("-backend-option");
+ CmdArgs.push_back("-mllvm");
CmdArgs.push_back("-arm-no-restrict-it");
}
} else if (Triple.isOSWindows() &&
(Triple.getArch() == llvm::Triple::arm ||
Triple.getArch() == llvm::Triple::thumb)) {
// Windows on ARM expects restricted IT blocks
- CmdArgs.push_back("-backend-option");
+ CmdArgs.push_back("-mllvm");
CmdArgs.push_back("-arm-restrict-it");
}
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=329965&r1=329964&r2=329965&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Thu Apr 12 15:21:36 2018
@@ -677,7 +677,6 @@ static bool ParseCodeGenArgs(CodeGenOpti
Opts.ReciprocalMath = Args.hasArg(OPT_freciprocal_math);
Opts.NoTrappingMath = Args.hasArg(OPT_fno_trapping_math);
Opts.NoZeroInitializedInBSS = Args.hasArg(OPT_mno_zero_initialized_in_bss);
- Opts.BackendOptions = Args.getAllArgValues(OPT_backend_option);
Opts.NumRegisterParameters = getLastArgIntValue(Args, OPT_mregparm, 0, Diags);
Opts.NoExecStack = Args.hasArg(OPT_mno_exec_stack);
Opts.FatalWarnings = Args.hasArg(OPT_massembler_fatal_warnings);
Modified: cfe/trunk/test/CodeGen/thinlto-backend-option.ll
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/thinlto-backend-option.ll?rev=329965&r1=329964&r2=329965&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/thinlto-backend-option.ll (original)
+++ cfe/trunk/test/CodeGen/thinlto-backend-option.ll Thu Apr 12 15:21:36 2018
@@ -1,4 +1,4 @@
-; Test to ensure -backend-options work when invoking the ThinLTO backend path.
+; Test to ensure -mllvm work when invoking the ThinLTO backend path.
; This test uses a non-existent backend option to test that backend options are
; being parsed. While it's more important that the existing options are parsed
@@ -8,8 +8,8 @@
; RUN: %clang -flto=thin -c -o %t.o %s
; RUN: llvm-lto -thinlto -o %t %t.o
-; RUN: not %clang_cc1 -x ir %t.o -fthinlto-index=%t.thinlto.bc -backend-option -nonexistent -emit-obj -o /dev/null 2>&1 | FileCheck %s -check-prefix=UNKNOWN
-; UNKNOWN: clang: Unknown command line argument '-nonexistent'
+; RUN: not %clang_cc1 -x ir %t.o -fthinlto-index=%t.thinlto.bc -mllvm -nonexistent -emit-obj -o /dev/null 2>&1 | FileCheck %s -check-prefix=UNKNOWN
+; UNKNOWN: clang (LLVM option parsing): Unknown command line argument '-nonexistent'
; RUN: not %clang_cc1 -flto=thinfoo 2>&1 | FileCheck %s -check-prefix=INVALID
; INVALID: error: invalid value 'thinfoo' in '-flto=thinfoo'
Modified: cfe/trunk/test/CodeGenCUDA/link-device-bitcode.cu
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCUDA/link-device-bitcode.cu?rev=329965&r1=329964&r2=329965&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCUDA/link-device-bitcode.cu (original)
+++ cfe/trunk/test/CodeGenCUDA/link-device-bitcode.cu Thu Apr 12 15:21:36 2018
@@ -31,7 +31,7 @@
// Make sure NVVMReflect pass is enabled in NVPTX back-end.
// RUN: %clang_cc1 -triple nvptx-unknown-cuda -fcuda-is-device \
// RUN: -mlink-cuda-bitcode %t.bc -S -o /dev/null %s \
-// RUN: -backend-option -debug-pass=Structure 2>&1 \
+// RUN: -mllvm -debug-pass=Structure 2>&1 \
// RUN: | FileCheck %s -check-prefix CHECK-REFLECT
#include "Inputs/cuda.h"
Modified: cfe/trunk/test/Driver/aarch64-fix-cortex-a53-835769.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/aarch64-fix-cortex-a53-835769.c?rev=329965&r1=329964&r2=329965&view=diff
==============================================================================
--- cfe/trunk/test/Driver/aarch64-fix-cortex-a53-835769.c (original)
+++ cfe/trunk/test/Driver/aarch64-fix-cortex-a53-835769.c Thu Apr 12 15:21:36 2018
@@ -8,6 +8,6 @@
// RUN: %clang -target aarch64-android-eabi %s -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-YES %s
-// CHECK-DEF-NOT: "-backend-option" "-aarch64-fix-cortex-a53-835769"
-// CHECK-YES: "-backend-option" "-aarch64-fix-cortex-a53-835769=1"
-// CHECK-NO: "-backend-option" "-aarch64-fix-cortex-a53-835769=0"
+// CHECK-DEF-NOT: "-mllvm" "-aarch64-fix-cortex-a53-835769"
+// CHECK-YES: "-mllvm" "-aarch64-fix-cortex-a53-835769=1"
+// CHECK-NO: "-mllvm" "-aarch64-fix-cortex-a53-835769=0"
Modified: cfe/trunk/test/Driver/apple-kext-mkernel.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/apple-kext-mkernel.c?rev=329965&r1=329964&r2=329965&view=diff
==============================================================================
--- cfe/trunk/test/Driver/apple-kext-mkernel.c (original)
+++ cfe/trunk/test/Driver/apple-kext-mkernel.c Thu Apr 12 15:21:36 2018
@@ -26,7 +26,3 @@
// RUN: %clang -target x86_64-apple-darwin10 \
// RUN: -Werror -fno-builtin -fno-exceptions -fno-common -fno-rtti \
// RUN: -mkernel -fsyntax-only %s
-
-// RUN: %clang -c %s -target armv7k-apple-watchos -fapple-kext -mwatchos-version-min=1.0.0 -### 2>&1 \
-// RUN: | FileCheck %s --check-prefix=CHECK-WATCH
-// CHECK-WATCH-NOT: "-backend-option" "-arm-long-calls"
Modified: cfe/trunk/test/Driver/arm-restrict-it.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/arm-restrict-it.c?rev=329965&r1=329964&r2=329965&view=diff
==============================================================================
--- cfe/trunk/test/Driver/arm-restrict-it.c (original)
+++ cfe/trunk/test/Driver/arm-restrict-it.c Thu Apr 12 15:21:36 2018
@@ -4,7 +4,7 @@
// RUN: %clang -target armv8a-none-gnueabi -mrestrict-it -### %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-RESTRICTED < %t %s
-// CHECK-RESTRICTED: "-backend-option" "-arm-restrict-it"
+// CHECK-RESTRICTED: "-mllvm" "-arm-restrict-it"
// RUN: %clang -target arm-none-gnueabi -mno-restrict-it -### %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-NO-RESTRICTED < %t %s
@@ -12,4 +12,4 @@
// RUN: %clang -target armv8a-none-gnueabi -mno-restrict-it -### %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-NO-RESTRICTED < %t %s
-// CHECK-NO-RESTRICTED: "-backend-option" "-arm-no-restrict-it"
+// CHECK-NO-RESTRICTED: "-mllvm" "-arm-no-restrict-it"
Modified: cfe/trunk/test/Driver/debug-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/debug-options.c?rev=329965&r1=329964&r2=329965&view=diff
==============================================================================
--- cfe/trunk/test/Driver/debug-options.c (original)
+++ cfe/trunk/test/Driver/debug-options.c Thu Apr 12 15:21:36 2018
@@ -225,9 +225,9 @@
//
// GARANGE: -generate-arange-section
//
-// FDTS: "-backend-option" "-generate-type-units"
+// FDTS: "-mllvm" "-generate-type-units"
//
-// NOFDTS-NOT: "-backend-option" "-generate-type-units"
+// NOFDTS-NOT: "-mllvm" "-generate-type-units"
//
// CI: "-dwarf-column-info"
//
Modified: cfe/trunk/test/Driver/mglobal-merge.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/mglobal-merge.c?rev=329965&r1=329964&r2=329965&view=diff
==============================================================================
--- cfe/trunk/test/Driver/mglobal-merge.c (original)
+++ cfe/trunk/test/Driver/mglobal-merge.c Thu Apr 12 15:21:36 2018
@@ -10,8 +10,8 @@
// RUN: -mno-global-merge
// RUN: FileCheck --check-prefix=CHECK-NONE < %t %s
-// CHECK-NGM-ARM: "-backend-option" "-arm-global-merge=false"
-// CHECK-NGM-AARCH64: "-backend-option" "-aarch64-enable-global-merge=false"
+// CHECK-NGM-ARM: "-mllvm" "-arm-global-merge=false"
+// CHECK-NGM-AARCH64: "-mllvm" "-aarch64-enable-global-merge=false"
// RUN: %clang -target armv7-unknown-unknown -### -fsyntax-only %s 2> %t \
// RUN: -mglobal-merge
@@ -25,8 +25,8 @@
// RUN: -mglobal-merge
// RUN: FileCheck --check-prefix=CHECK-NONE < %t %s
-// CHECK-GM-ARM: "-backend-option" "-arm-global-merge=true"
-// CHECK-GM-AARCH64: "-backend-option" "-aarch64-enable-global-merge=true"
+// CHECK-GM-ARM: "-mllvm" "-arm-global-merge=true"
+// CHECK-GM-AARCH64: "-mllvm" "-aarch64-enable-global-merge=true"
// RUN: %clang -target armv7-unknown-unknown -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-NONE < %t %s
Modified: cfe/trunk/test/Driver/woa-restrict-it.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/woa-restrict-it.c?rev=329965&r1=329964&r2=329965&view=diff
==============================================================================
--- cfe/trunk/test/Driver/woa-restrict-it.c (original)
+++ cfe/trunk/test/Driver/woa-restrict-it.c Thu Apr 12 15:21:36 2018
@@ -1,4 +1,4 @@
// RUN: %clang -target armv7-windows -### %s 2>&1 | FileCheck %s
-// CHECK: "-backend-option" "-arm-restrict-it"
+// CHECK: "-mllvm" "-arm-restrict-it"
Removed: cfe/trunk/test/Frontend/backend-option.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/backend-option.c?rev=329964&view=auto
==============================================================================
--- cfe/trunk/test/Frontend/backend-option.c (original)
+++ cfe/trunk/test/Frontend/backend-option.c (removed)
@@ -1,4 +0,0 @@
-// RUN: %clang_cc1 %s -emit-llvm -backend-option -time-passes -o - 2>&1 | FileCheck %s
-// RUN: %clang_cc1 %s -emit-llvm -backend-option -time-passes -o - -triple spir-unknown-unknown 2>&1 | FileCheck %s
-// CHECK: Pass execution timing report
-
More information about the cfe-commits
mailing list