Author: Fangrui Song Date: 2022-03-30T23:20:49-07:00 New Revision: 85bd90cb71843d022f2c8413ee23683fe8e71241
URL: https://github.com/llvm/llvm-project/commit/85bd90cb71843d022f2c8413ee23683fe8e71241 DIFF: https://github.com/llvm/llvm-project/commit/85bd90cb71843d022f2c8413ee23683fe8e71241.diff LOG: [Driver] Move legacy -f[no-]unit-at-a-time to clang_ignored_gcc_optimization_f_Group Move to clang_ignored_gcc_optimization_f_Group like other ignored options. This decreases code size a bit: ~400 bytes on x86-64. Added: Modified: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Clang.cpp Removed: ################################################################################ diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 153badd971349..64e4f568ed67b 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -2363,7 +2363,6 @@ defm use_cxa_atexit : BoolFOption<"use-cxa-atexit", CodeGenOpts<"CXAAtExit">, DefaultTrue, NegFlag<SetFalse, [CC1Option], "Don't use __cxa_atexit for calling destructors">, PosFlag<SetTrue>>; -def fno_unit_at_a_time : Flag<["-"], "fno-unit-at-a-time">, Group<f_Group>; def fno_unwind_tables : Flag<["-"], "fno-unwind-tables">, Group<f_Group>; def fno_verbose_asm : Flag<["-"], "fno-verbose-asm">, Group<f_Group>, Flags<[CC1Option]>, MarshallingInfoNegativeFlag<CodeGenOpts<"AsmVerbose">>; @@ -2787,7 +2786,6 @@ def ftrapv_handler : Separate<["-"], "ftrapv-handler">, Group<f_Group>, Flags<[C def ftrap_function_EQ : Joined<["-"], "ftrap-function=">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Issue call to specified function rather than a trap instruction">, MarshallingInfoString<CodeGenOpts<"TrapFuncName">>; -def funit_at_a_time : Flag<["-"], "funit-at-a-time">, Group<f_Group>; def funroll_loops : Flag<["-"], "funroll-loops">, Group<f_Group>, HelpText<"Turn on loop unroller">, Flags<[CC1Option]>; def fno_unroll_loops : Flag<["-"], "fno-unroll-loops">, Group<f_Group>, @@ -4609,6 +4607,7 @@ defm tree_salias : BooleanFFlag<"tree-salias">, Group<clang_ignored_f_Group>; defm tree_ter : BooleanFFlag<"tree-ter">, Group<clang_ignored_gcc_optimization_f_Group>; defm tree_vectorizer_verbose : BooleanFFlag<"tree-vectorizer-verbose">, Group<clang_ignored_f_Group>; defm tree_vrp : BooleanFFlag<"tree-vrp">, Group<clang_ignored_gcc_optimization_f_Group>; +defm : BooleanFFlag<"unit-at-a-time">, Group<clang_ignored_gcc_optimization_f_Group>; defm unroll_all_loops : BooleanFFlag<"unroll-all-loops">, Group<clang_ignored_gcc_optimization_f_Group>; defm unsafe_loop_optimizations : BooleanFFlag<"unsafe-loop-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>; diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index 6c4bc86787290..8c106145fa62b 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -6731,14 +6731,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-fno-dollars-in-identifiers"); } - // -funit-at-a-time is default, and we don't support -fno-unit-at-a-time for - // practical purposes. - if (Arg *A = Args.getLastArg(options::OPT_funit_at_a_time, - options::OPT_fno_unit_at_a_time)) { - if (A->getOption().matches(options::OPT_fno_unit_at_a_time)) - D.Diag(diag::warn_drv_clang_unsupported) << A->getAsString(Args); - } - if (Args.hasFlag(options::OPT_fapple_pragma_pack, options::OPT_fno_apple_pragma_pack, false)) CmdArgs.push_back("-fapple-pragma-pack"); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits