forked from OSchip/llvm-project
parent
0b69e1a628
commit
0ba5ac8544
|
@ -601,3 +601,5 @@ def cl_opt_disable : Flag<"-cl-opt-disable">,
|
|||
HelpText<"OpenCL only. This option disables all optimizations. The default is optimizations are enabled.">;
|
||||
def cl_single_precision_constant : Flag<"-cl-single-precision-constant">,
|
||||
HelpText<"OpenCL only. Treat double precision floating-point constant as single precision constant.">;
|
||||
def cl_finite_math_only : Flag<"-cl-finite-math-only">,
|
||||
HelpText<"OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.">;
|
||||
|
|
|
@ -59,6 +59,8 @@ public:
|
|||
unsigned MergeAllConstants : 1; /// Merge identical constants.
|
||||
unsigned NoCommon : 1; /// Set when -fno-common or C++ is enabled.
|
||||
unsigned NoImplicitFloat : 1; /// Set when -mno-implicit-float is enabled.
|
||||
unsigned NoInfsFPMath : 1; /// Assume FP arguments, results not +-Inf.
|
||||
unsigned NoNaNsFPMath : 1; /// Assume FP arguments, results not NaN.
|
||||
unsigned NoZeroInitializedInBSS : 1; /// -fno-zero-initialized-in-bss
|
||||
unsigned ObjCDispatchMethod : 2; /// Method of Objective-C dispatch to use.
|
||||
unsigned OmitLeafFramePointer : 1; /// Set when -momit-leaf-frame-pointer is
|
||||
|
@ -123,6 +125,8 @@ public:
|
|||
MergeAllConstants = 1;
|
||||
NoCommon = 0;
|
||||
NoImplicitFloat = 0;
|
||||
NoInfsFPMath = 0;
|
||||
NoNaNsFPMath = 0;
|
||||
NoZeroInitializedInBSS = 0;
|
||||
ObjCDispatchMethod = Legacy;
|
||||
OmitLeafFramePointer = 0;
|
||||
|
|
|
@ -183,6 +183,8 @@ bool EmitAssemblyHelper::AddEmitPasses(BackendAction Action,
|
|||
llvm::FloatABIType = llvm::FloatABI::Default;
|
||||
}
|
||||
|
||||
llvm::NoInfsFPMath = CodeGenOpts.NoInfsFPMath;
|
||||
llvm::NoNaNsFPMath = CodeGenOpts.NoNaNsFPMath;
|
||||
NoZerosInBSS = CodeGenOpts.NoZeroInitializedInBSS;
|
||||
llvm::UseSoftFloat = CodeGenOpts.SoftFloat;
|
||||
UnwindTablesMandatory = CodeGenOpts.UnwindTables;
|
||||
|
|
|
@ -898,6 +898,7 @@ static void ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
|
|||
Opts.FloatABI = Args.getLastArgValue(OPT_mfloat_abi);
|
||||
Opts.HiddenWeakVTables = Args.hasArg(OPT_fhidden_weak_vtables);
|
||||
Opts.LimitFloatPrecision = Args.getLastArgValue(OPT_mlimit_float_precision);
|
||||
Opts.NoInfsFPMath = Opts.NoNaNsFPMath = Args.hasArg(OPT_cl_finite_math_only);
|
||||
Opts.NoZeroInitializedInBSS = Args.hasArg(OPT_mno_zero_initialized_in_bss);
|
||||
Opts.RelaxAll = Args.hasArg(OPT_mrelax_all);
|
||||
Opts.OmitLeafFramePointer = Args.hasArg(OPT_momit_leaf_frame_pointer);
|
||||
|
|
Loading…
Reference in New Issue