@@ -272,7 +272,7 @@ class MigratorOpts<string base>
272
272
multiclass OptInFFlag<string name, string pos_prefix, string neg_prefix="",
273
273
string help="", list<OptionFlag> flags=[],
274
274
KeyPathAndMacro kpm = EmptyKPM,
275
- list<Option > enablers = []> {
275
+ list<string > enablers = []> {
276
276
def f#NAME : Flag<["-"], "f"#name>, Flags<!listconcat([CC1Option], flags)>,
277
277
Group<f_Group>, HelpText<!strconcat(pos_prefix, help)>,
278
278
MarshallingInfoFlag<kpm, "false">,
@@ -286,7 +286,7 @@ multiclass OptInFFlag<string name, string pos_prefix, string neg_prefix="",
286
286
multiclass OptOutFFlag<string name, string pos_prefix, string neg_prefix,
287
287
string help="", list<OptionFlag> flags=[],
288
288
KeyPathAndMacro kpm = EmptyKPM,
289
- list<Option > disablers = []> {
289
+ list<string > disablers = []> {
290
290
def f#NAME : Flag<["-"], "f"#name>, Flags<flags>,
291
291
Group<f_Group>, HelpText<!strconcat(pos_prefix, help)>;
292
292
def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<!listconcat([CC1Option], flags)>,
@@ -314,7 +314,7 @@ def SetFalse : Set<false> {}
314
314
// Definition of single command line flag. This is an implementation detail, use
315
315
// SetTrueBy or SetFalseBy instead.
316
316
class FlagDef<bit polarity, bit value, list<OptionFlag> option_flags,
317
- string help, list<Option> implied_by_options = []> {
317
+ string help, list<code> implied_by_expressions = []> {
318
318
// The polarity. Besides spelling, this also decides whether the TableGen
319
319
// record will be prefixed with "no_".
320
320
bit Polarity = polarity;
@@ -328,8 +328,8 @@ class FlagDef<bit polarity, bit value, list<OptionFlag> option_flags,
328
328
// The help text associated with the flag.
329
329
string Help = help;
330
330
331
- // Options that imply this flag when present on command line .
332
- list<Option > ImpliedBy = implied_by_options ;
331
+ // List of expressions that, when true, imply this flag .
332
+ list<code > ImpliedBy = implied_by_expressions ;
333
333
}
334
334
335
335
// Additional information to be appended to both positive and negative flag.
@@ -348,13 +348,13 @@ class ApplySuffix<FlagDef flag, BothFlags suffix> {
348
348
349
349
// Definition of the command line flag with positive spelling, e.g. "-ffoo".
350
350
class PosFlag<Set value, list<OptionFlag> flags = [], string help = "",
351
- list<Option> implied_by_options = []>
352
- : FlagDef<true, value.Value, flags, help, implied_by_options > {}
351
+ list<code> implied_by_expressions = []>
352
+ : FlagDef<true, value.Value, flags, help, implied_by_expressions > {}
353
353
354
354
// Definition of the command line flag with negative spelling, e.g. "-fno-foo".
355
355
class NegFlag<Set value, list<OptionFlag> flags = [], string help = "",
356
- list<Option> implied_by_options = []>
357
- : FlagDef<false, value.Value, flags, help, implied_by_options > {}
356
+ list<code> implied_by_expressions = []>
357
+ : FlagDef<false, value.Value, flags, help, implied_by_expressions > {}
358
358
359
359
// Expanded FlagDef that's convenient for creation of TableGen records.
360
360
class FlagDefExpanded<FlagDef flag, string prefix, string name, string spelling>
@@ -790,7 +790,7 @@ def cl_fast_relaxed_math : Flag<["-"], "cl-fast-relaxed-math">, Group<opencl_Gro
790
790
def cl_mad_enable : Flag<["-"], "cl-mad-enable">, Group<opencl_Group>, Flags<[CC1Option]>,
791
791
HelpText<"OpenCL only. Allow use of less precise MAD computations in the generated binary.">,
792
792
MarshallingInfoFlag<CodeGenOpts<"LessPreciseFPMAD">>,
793
- ImpliedByAnyOf<[cl_unsafe_math_optimizations, cl_fast_relaxed_math]>;
793
+ ImpliedByAnyOf<[cl_unsafe_math_optimizations.KeyPath , cl_fast_relaxed_math.KeyPath ]>;
794
794
def cl_no_signed_zeros : Flag<["-"], "cl-no-signed-zeros">, Group<opencl_Group>, Flags<[CC1Option]>,
795
795
HelpText<"OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.">,
796
796
MarshallingInfoFlag<LangOpts<"CLNoSignedZero">>;
@@ -1331,11 +1331,11 @@ def ffp_model_EQ : Joined<["-"], "ffp-model=">, Group<f_Group>, Flags<[NoXarchOp
1331
1331
def ffp_exception_behavior_EQ : Joined<["-"], "ffp-exception-behavior=">, Group<f_Group>, Flags<[CC1Option]>,
1332
1332
HelpText<"Specifies the exception behavior of floating-point operations.">;
1333
1333
defm fast_math : OptInFFlag<"fast-math", "Allow aggressive, lossy floating-point optimizations", "", "", [],
1334
- LangOpts<"FastMath">, [cl_fast_relaxed_math]>;
1334
+ LangOpts<"FastMath">, [cl_fast_relaxed_math.KeyPath ]>;
1335
1335
def menable_unsafe_fp_math : Flag<["-"], "menable-unsafe-fp-math">, Flags<[CC1Option]>,
1336
1336
HelpText<"Allow unsafe floating-point math optimizations which may decrease precision">,
1337
1337
MarshallingInfoFlag<LangOpts<"UnsafeFPMath">>,
1338
- ImpliedByAnyOf<[cl_unsafe_math_optimizations, ffast_math]>;
1338
+ ImpliedByAnyOf<[cl_unsafe_math_optimizations.KeyPath , ffast_math.KeyPath ]>;
1339
1339
defm math_errno : OptInFFlag<"math-errno", "Require math functions to indicate errors by setting errno">;
1340
1340
def fbracket_depth_EQ : Joined<["-"], "fbracket-depth=">, Group<f_Group>, Flags<[CoreOption]>;
1341
1341
def fsignaling_math : Flag<["-"], "fsignaling-math">, Group<f_Group>;
@@ -1550,15 +1550,15 @@ def fno_unsafe_math_optimizations : Flag<["-"], "fno-unsafe-math-optimizations">
1550
1550
def fassociative_math : Flag<["-"], "fassociative-math">, Group<f_Group>;
1551
1551
def fno_associative_math : Flag<["-"], "fno-associative-math">, Group<f_Group>;
1552
1552
defm reciprocal_math : OptInFFlag<"reciprocal-math", "Allow division operations to be reassociated", "", "", [],
1553
- LangOpts<"AllowRecip">, [menable_unsafe_fp_math]>;
1553
+ LangOpts<"AllowRecip">, [menable_unsafe_fp_math.KeyPath ]>;
1554
1554
def fapprox_func : Flag<["-"], "fapprox-func">, Group<f_Group>, Flags<[CC1Option, NoDriverOption]>,
1555
- MarshallingInfoFlag<LangOpts<"ApproxFunc">>, ImpliedByAnyOf<[menable_unsafe_fp_math]>;
1555
+ MarshallingInfoFlag<LangOpts<"ApproxFunc">>, ImpliedByAnyOf<[menable_unsafe_fp_math.KeyPath ]>;
1556
1556
defm finite_math_only : OptInFFlag<"finite-math-only", "", "", "", [],
1557
- LangOpts<"FiniteMathOnly">, [cl_finite_math_only, ffast_math]>;
1557
+ LangOpts<"FiniteMathOnly">, [cl_finite_math_only.KeyPath , ffast_math.KeyPath ]>;
1558
1558
defm signed_zeros : BoolFOption<"signed-zeros",
1559
1559
LangOpts<"NoSignedZero">, DefaultFalse,
1560
1560
NegFlag<SetTrue, [CC1Option], "Allow optimizations that ignore the sign of floating point zeros",
1561
- [cl_no_signed_zeros, menable_unsafe_fp_math]>,
1561
+ [cl_no_signed_zeros.KeyPath , menable_unsafe_fp_math.KeyPath ]>,
1562
1562
PosFlag<SetFalse>>;
1563
1563
def fhonor_nans : Flag<["-"], "fhonor-nans">, Group<f_Group>;
1564
1564
def fno_honor_nans : Flag<["-"], "fno-honor-nans">, Group<f_Group>;
@@ -4503,13 +4503,13 @@ def mdisable_tail_calls : Flag<["-"], "mdisable-tail-calls">,
4503
4503
MarshallingInfoFlag<CodeGenOpts<"DisableTailCalls">>;
4504
4504
def menable_no_infinities : Flag<["-"], "menable-no-infs">,
4505
4505
HelpText<"Allow optimization to assume there are no infinities.">,
4506
- MarshallingInfoFlag<LangOpts<"NoHonorInfs">>, ImpliedByAnyOf<[ffinite_math_only]>;
4506
+ MarshallingInfoFlag<LangOpts<"NoHonorInfs">>, ImpliedByAnyOf<[ffinite_math_only.KeyPath ]>;
4507
4507
def menable_no_nans : Flag<["-"], "menable-no-nans">,
4508
4508
HelpText<"Allow optimization to assume there are no NaNs.">,
4509
- MarshallingInfoFlag<LangOpts<"NoHonorNaNs">>, ImpliedByAnyOf<[ffinite_math_only]>;
4509
+ MarshallingInfoFlag<LangOpts<"NoHonorNaNs">>, ImpliedByAnyOf<[ffinite_math_only.KeyPath ]>;
4510
4510
def mreassociate : Flag<["-"], "mreassociate">,
4511
4511
HelpText<"Allow reassociation transformations for floating-point instructions">,
4512
- MarshallingInfoFlag<LangOpts<"AllowFPReassoc">>, ImpliedByAnyOf<[menable_unsafe_fp_math]>;
4512
+ MarshallingInfoFlag<LangOpts<"AllowFPReassoc">>, ImpliedByAnyOf<[menable_unsafe_fp_math.KeyPath ]>;
4513
4513
def mabi_EQ_ieeelongdouble : Flag<["-"], "mabi=ieeelongdouble">,
4514
4514
HelpText<"Use IEEE 754 quadruple-precision for long double">,
4515
4515
MarshallingInfoFlag<LangOpts<"PPCIEEELongDouble">>;
@@ -5080,7 +5080,7 @@ def fallow_pcm_with_errors : Flag<["-"], "fallow-pcm-with-compiler-errors">,
5080
5080
def fallow_pch_with_errors : Flag<["-"], "fallow-pch-with-compiler-errors">,
5081
5081
HelpText<"Accept a PCH file that was created with compiler errors">,
5082
5082
MarshallingInfoFlag<PreprocessorOpts<"AllowPCHWithCompilerErrors">>,
5083
- ImpliedByAnyOf<[fallow_pcm_with_errors]>;
5083
+ ImpliedByAnyOf<[fallow_pcm_with_errors.KeyPath ]>;
5084
5084
def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">,
5085
5085
HelpText<"Dump declarations that are deserialized from PCH, for testing">,
5086
5086
MarshallingInfoFlag<PreprocessorOpts<"DumpDeserializedPCHDecls">>;
0 commit comments