Index: include/clang/Driver/Options.td =================================================================== --- include/clang/Driver/Options.td +++ include/clang/Driver/Options.td @@ -475,6 +475,8 @@ def ferror_limit_EQ : Joined<["-"], "ferror-limit=">, Group, Flags<[CoreOption]>; def fexceptions : Flag<["-"], "fexceptions">, Group, Flags<[CC1Option]>, HelpText<"Enable support for exception handling">; +def fexcess_precision_EQ : Joined<["-"], "fexcess-precision=">, + Group; def : Flag<["-"], "fexpensive-optimizations">, Group; def : Flag<["-"], "fno-expensive-optimizations">, Group; def fextdirs_EQ : Joined<["-"], "fextdirs=">, Group; @@ -576,6 +578,7 @@ def flat__namespace : Flag<["-"], "flat_namespace">; def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group; def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group; +def flto_EQ : Joined<["-"], "flto=">, Group; def flto : Flag<["-"], "flto">, Group; def fno_lto : Flag<["-"], "fno-lto">, Group; def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">, @@ -812,7 +815,6 @@ def : Flag<["-"], "fsched-interblock">, Group; def fshort_enums : Flag<["-"], "fshort-enums">, Group, Flags<[CC1Option]>, HelpText<"Allocate to an enum type only as many bytes as it needs for the declared range of possible values">; -def : Flag<["-"], "freorder-blocks">, Group; def fshort_wchar : Flag<["-"], "fshort-wchar">, Group, Flags<[CC1Option]>, HelpText<"Force wchar_t to be a short unsigned int">; def fno_short_wchar : Flag<["-"], "fno-short-wchar">, Group, Flags<[CC1Option]>, @@ -907,8 +909,7 @@ def fuse_cxa_atexit : Flag<["-"], "fuse-cxa-atexit">, Group; def fuse_init_array : Flag<["-"], "fuse-init-array">, Group, Flags<[CC1Option]>, HelpText<"Use .init_array instead of .ctors">; -def fno_var_tracking : Flag<["-"], "fno-var-tracking">, - Group; +def fno_var_tracking : Flag<["-"], "fno-var-tracking">, Group; def fverbose_asm : Flag<["-"], "fverbose-asm">, Group; def fvisibility_EQ : Joined<["-"], "fvisibility=">, Group, HelpText<"Set the default symbol visibility for all global declarations">; @@ -1596,22 +1597,49 @@ defm align_functions : BooleanFFlag<"align-functions">, Group; def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group; +defm align_labels : BooleanFFlag<"align-labels">, Group; +def falign_labels_EQ : Joined<["-"], "falign-labels=">, Group; +defm align_loops : BooleanFFlag<"align-loops">, Group; +def falign_loops_EQ : Joined<["-"], "falign-loops=">, Group; +defm align_jumps : BooleanFFlag<"align-jumps">, Group; +def falign_jumps_EQ : Joined<["-"], "falign-jumps=">, Group; // FIXME: This option should be supported and wired up to our diognostics, but // ignore it for now to avoid breaking builds that use it. def fdiagnostics_show_location_EQ : Joined<["-"], "fdiagnostics-show-location=">, Group; +defm caller_saves : BooleanFFlag<"caller-saves">, Group; +defm reorder_blocks : BooleanFFlag<"reorder-blocks">, Group; defm eliminate_unused_debug_types : BooleanFFlag<"eliminate-unused-debug-types">, Group; +defm branch_count_reg : BooleanFFlag<"branch-count-reg">, Group; +defm default_inline : BooleanFFlag<"default-inline">, Group; +defm delete_null_pointer_checks : BooleanFFlag<"delete-null-pointer-checks">, + Group; +defm fat_lto_objects : BooleanFFlag<"fat-lto-objects">, Group; defm float_store : BooleanFFlag<"float-store">, Group; defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group; defm gcse : BooleanFFlag<"gcse">, Group; +defm gcse_after_reload: BooleanFFlag<"gcse-after-reload">, Group; +defm gcse_las: BooleanFFlag<"gcse-las">, Group; +defm gcse_sm: BooleanFFlag<"gcse-sm">, Group; defm gnu : BooleanFFlag<"gnu">, Group; defm ident : BooleanFFlag<"ident">, Group; defm implicit_templates : BooleanFFlag<"implicit-templates">, Group; +defm merge_constants : BooleanFFlag<"merge-constants">, Group; +defm modulo_sched : BooleanFFlag<"modulo-sched">, Group; +defm modulo_sched_allow_regmoves : BooleanFFlag<"modulo-sched-allow-regmoves">, + Group; +defm inline_functions_called_once : BooleanFFlag<"inline-functions-called-once">, + Group; def finline_limit_EQ : Joined<["-"], "finline-limit=">, Group; defm finline_limit : BooleanFFlag<"inline-limit">, Group; +defm inline_small_functions : BooleanFFlag<"inline-small-functions">, + Group; +defm ipa_cp : BooleanFFlag<"ipa-cp">, + Group; defm ivopts : BooleanFFlag<"ivopts">, Group; defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group; +defm peel_loops : BooleanFFlag<"peel-loops">, Group; defm permissive : BooleanFFlag<"permissive">, Group; defm prefetch_loop_arrays : BooleanFFlag<"prefetch-loop-arrays">, Group; defm printf : BooleanFFlag<"printf">, Group; @@ -1621,21 +1649,38 @@ defm profile_reusedist : BooleanFFlag<"profile-reusedist">, Group; defm profile_values : BooleanFFlag<"profile-values">, Group; defm regs_graph : BooleanFFlag<"regs-graph">, Group; +defm rename_registers : BooleanFFlag<"rename-registers">, Group; defm ripa : BooleanFFlag<"ripa">, Group; defm rounding_math : BooleanFFlag<"rounding-math">, Group; defm schedule_insns : BooleanFFlag<"schedule-insns">, Group; +defm schedule_insns2 : BooleanFFlag<"schedule-insns2">, Group; defm see : BooleanFFlag<"see">, Group; defm signaling_nans : BooleanFFlag<"signaling-nans">, Group; +defm single_precision_constant : BooleanFFlag<"single-precision-constant">, + Group; defm spec_constr_count : BooleanFFlag<"spec-constr-count">, Group; defm strength_reduce : BooleanFFlag<"strength-reduce">, Group; defm tls_model : BooleanFFlag<"tls-model">, Group; defm tracer : BooleanFFlag<"tracer">, Group; +defm tree_dce : BooleanFFlag<"tree-dce">, Group; +defm tree_loop_im : BooleanFFlag<"tree_loop_im">, Group; +defm tree_loop_ivcanon : BooleanFFlag<"tree_loop_ivcanon">, Group; +defm tree_loop_linear : BooleanFFlag<"tree_loop_linear">, Group; defm tree_salias : BooleanFFlag<"tree-salias">, Group; +defm tree_ter : BooleanFFlag<"tree-ter">, Group; defm tree_vectorizer_verbose : BooleanFFlag<"tree-vectorizer-verbose">, Group; +defm tree_vrp : BooleanFFlag<"tree-vrp">, Group; defm unroll_all_loops : BooleanFFlag<"unroll-all-loops">, Group; +defm unsafe_loop_optimizations : BooleanFFlag<"unsafe-loop-optimizations">, + Group; defm unswitch_loops : BooleanFFlag<"unswitch-loops">, Group; - +defm use_linker_plugin : BooleanFFlag<"use-linker-plugin">, Group; +defm vect_cost_model : BooleanFFlag<"vect-cost-model">, Group; +defm variable_expansion_in_unroller : BooleanFFlag<"variable-expansion-in-unroller">, + Group; +defm web : BooleanFFlag<"web">, Group; +defm whole_program : BooleanFFlag<"whole-program">, Group; // gfortran options that we recognize in the driver and pass along when // invoking GCC to compile Fortran code. Index: test/Driver/clang_f_opts.c =================================================================== --- test/Driver/clang_f_opts.c +++ test/Driver/clang_f_opts.c @@ -166,6 +166,47 @@ // RUN: -fstrength-reduce -fno-strength-reduce \ // RUN: -finline-limit=1000 \ // RUN: -finline-limit \ +// RUN: -flto=1 \ +// RUN: -falign-labels \ +// RUN: -falign-labels=100 \ +// RUN: -falign-loops \ +// RUN: -falign-loops=100 \ +// RUN: -falign-jumps \ +// RUN: -falign-jumps=100 \ +// RUN: -fexcess-precision=100 \ +// RUN: -fbranch-count-reg \ +// RUN: -fcaller-saves \ +// RUN: -fno-default-inline -fdefault-inline \ +// RUN: -fgcse-after-reload \ +// RUN: -fgcse-las \ +// RUN: -fgcse-sm \ +// RUN: -fipa-cp \ +// RUN: -finline-functions-called-once \ +// RUN: -fmodulo-sched \ +// RUN: -fmodulo-sched-allow-regmoves \ +// RUN: -fpeel-loops \ +// RUN: -frename-registers \ +// RUN: -fschedule-insns2 \ +// RUN: -fsingle-precision-constant \ +// RUN: -ftree_loop_im \ +// RUN: -ftree_loop_ivcanon \ +// RUN: -ftree_loop_linear \ +// RUN: -funsafe-loop-optimizations \ +// RUN: -fuse-linker-plugin \ +// RUN: -fvect-cost-model \ +// RUN: -fvariable-expansion-in-unroller \ +// RUN: -fweb \ +// RUN: -fwhole-program \ +// RUN: -fno-tree-dce -ftree-dce \ +// RUN: -fno-tree-ter -ftree-ter \ +// RUN: -fno-tree-vrp -ftree-vrp \ +// RUN: -fno-delete-null-pointer-checks -fdelete-null-pointer-checks \ +// RUN: -fno-inline-small-functions -finline-small-functions \ +// RUN: -fno-fat-lto-objects -ffat-lto-objects \ +// RUN: -fno-merge-constants -fmerge-constants \ +// RUN: -fno-caller-saves -fcaller-saves \ +// RUN: -fno-reorder-blocks -freorder-blocks \ +// RUN: -fno-schedule-insns2 -fschedule-insns2 \ // RUN: %s 2>&1 | FileCheck --check-prefix=IGNORE %s // IGNORE-NOT: error: unknown argument @@ -197,6 +238,46 @@ // RUN: -ftracer \ // RUN: -funroll-all-loops \ // RUN: -funswitch-loops \ +// RUN: -flto=1 \ +// RUN: -falign-labels \ +// RUN: -falign-labels=100 \ +// RUN: -falign-loops \ +// RUN: -falign-loops=100 \ +// RUN: -falign-jumps \ +// RUN: -falign-jumps=100 \ +// RUN: -fexcess-precision=100 \ +// RUN: -fbranch-count-reg \ +// RUN: -fcaller-saves \ +// RUN: -fno-default-inline \ +// RUN: -fgcse-after-reload \ +// RUN: -fgcse-las \ +// RUN: -fgcse-sm \ +// RUN: -fipa-cp \ +// RUN: -finline-functions-called-once \ +// RUN: -fmodulo-sched \ +// RUN: -fmodulo-sched-allow-regmoves \ +// RUN: -fpeel-loops \ +// RUN: -frename-registers \ +// RUN: -fschedule-insns2 \ +// RUN: -fsingle-precision-constant \ +// RUN: -ftree_loop_im \ +// RUN: -ftree_loop_ivcanon \ +// RUN: -ftree_loop_linear \ +// RUN: -funsafe-loop-optimizations \ +// RUN: -fuse-linker-plugin \ +// RUN: -fvect-cost-model \ +// RUN: -fvariable-expansion-in-unroller \ +// RUN: -fweb \ +// RUN: -fwhole-program \ +// RUN: -fcaller-saves \ +// RUN: -freorder-blocks \ +// RUN: -fdelete-null-pointer-checks \ +// RUN: -ffat-lto-objects \ +// RUN: -fmerge-constants \ +// RUN: -finline-small-functions \ +// RUN: -ftree-dce \ +// RUN: -ftree-ter \ +// RUN: -ftree-vrp \ // RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING %s // CHECK-WARNING-DAG: optimization flag '-finline-limit=1000' is not supported // CHECK-WARNING-DAG: optimization flag '-finline-limit' is not supported @@ -224,6 +305,46 @@ // CHECK-WARNING-DAG: optimization flag '-ftracer' is not supported // CHECK-WARNING-DAG: optimization flag '-funroll-all-loops' is not supported // CHECK-WARNING-DAG: optimization flag '-funswitch-loops' is not supported +// CHECK-WARNING-DAG: optimization flag '-flto=1' is not supported +// CHECK-WARNING-DAG: optimization flag '-falign-labels' is not supported +// CHECK-WARNING-DAG: optimization flag '-falign-labels=100' is not supported +// CHECK-WARNING-DAG: optimization flag '-falign-loops' is not supported +// CHECK-WARNING-DAG: optimization flag '-falign-loops=100' is not supported +// CHECK-WARNING-DAG: optimization flag '-falign-jumps' is not supported +// CHECK-WARNING-DAG: optimization flag '-falign-jumps=100' is not supported +// CHECK-WARNING-DAG: optimization flag '-fexcess-precision=100' is not supported +// CHECK-WARNING-DAG: optimization flag '-fbranch-count-reg' is not supported +// CHECK-WARNING-DAG: optimization flag '-fcaller-saves' is not supported +// CHECK-WARNING-DAG: optimization flag '-fno-default-inline' is not supported +// CHECK-WARNING-DAG: optimization flag '-fgcse-after-reload' is not supported +// CHECK-WARNING-DAG: optimization flag '-fgcse-las' is not supported +// CHECK-WARNING-DAG: optimization flag '-fgcse-sm' is not supported +// CHECK-WARNING-DAG: optimization flag '-fipa-cp' is not supported +// CHECK-WARNING-DAG: optimization flag '-finline-functions-called-once' is not supported +// CHECK-WARNING-DAG: optimization flag '-fmodulo-sched' is not supported +// CHECK-WARNING-DAG: optimization flag '-fmodulo-sched-allow-regmoves' is not supported +// CHECK-WARNING-DAG: optimization flag '-fpeel-loops' is not supported +// CHECK-WARNING-DAG: optimization flag '-frename-registers' is not supported +// CHECK-WARNING-DAG: optimization flag '-fschedule-insns2' is not supported +// CHECK-WARNING-DAG: optimization flag '-fsingle-precision-constant' is not supported +// CHECK-WARNING-DAG: optimization flag '-ftree_loop_im' is not supported +// CHECK-WARNING-DAG: optimization flag '-ftree_loop_ivcanon' is not supported +// CHECK-WARNING-DAG: optimization flag '-ftree_loop_linear' is not supported +// CHECK-WARNING-DAG: optimization flag '-funsafe-loop-optimizations' is not supported +// CHECK-WARNING-DAG: optimization flag '-fuse-linker-plugin' is not supported +// CHECK-WARNING-DAG: optimization flag '-fvect-cost-model' is not supported +// CHECK-WARNING-DAG: optimization flag '-fvariable-expansion-in-unroller' is not supported +// CHECK-WARNING-DAG: optimization flag '-fweb' is not supported +// CHECK-WARNING-DAG: optimization flag '-fwhole-program' is not supported +// CHECK-WARNING-DAG: optimization flag '-fcaller-saves' is not supported +// CHECK-WARNING-DAG: optimization flag '-freorder-blocks' is not supported +// CHECK-WARNING-DAG: optimization flag '-fdelete-null-pointer-checks' is not supported +// CHECK-WARNING-DAG: optimization flag '-ffat-lto-objects' is not supported +// CHECK-WARNING-DAG: optimization flag '-fmerge-constants' is not supported +// CHECK-WARNING-DAG: optimization flag '-finline-small-functions' is not supported +// CHECK-WARNING-DAG: optimization flag '-ftree-dce' is not supported +// CHECK-WARNING-DAG: optimization flag '-ftree-ter' is not supported +// CHECK-WARNING-DAG: optimization flag '-ftree-vrp' is not supported // Test that we mute the warning on these // RUN: %clang -### -finline-limit=1000 -Wno-invalid-command-line-argument \