1//===--- MathOptionsBase.def - Math options config ---------------- C++ -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8/// 9/// \file 10/// This file defines math options. Users of this file must define 11/// ENUM_MATHOPT macro to make use of this information. 12/// 13//===----------------------------------------------------------------------===// 14 15#ifndef ENUM_MATHOPT 16# error Define the ENUM_MATHOPT macro to handle lowering options 17#endif 18 19/// Allow fusing FP operations (e.g. create FMAs from mul/add). 20ENUM_MATHOPT(FPContractEnabled, unsigned, 1, 1) 21 22/// Permit floating point optimizations without regard to infinities. 23ENUM_MATHOPT(NoHonorInfs, unsigned, 1, 0) 24 25/// Permit floating point optimization without regard to NaN 26ENUM_MATHOPT(NoHonorNaNs, unsigned, 1, 0) 27 28/// Allow math functions to be replaced with an approximately equivalent 29/// calculation 30ENUM_MATHOPT(ApproxFunc, unsigned, 1, 0) 31 32/// Allow optimizations that ignore the sign of floating point zeros 33ENUM_MATHOPT(NoSignedZeros, unsigned, 1, 0) 34 35/// Allow reassociation transformations for floating-point instructions 36ENUM_MATHOPT(AssociativeMath, unsigned, 1, 0) 37 38/// Allow division operations to be reassociated 39ENUM_MATHOPT(ReciprocalMath, unsigned, 1, 0) 40 41#undef ENUM_MATHOPT 42