LLVM: include/llvm/IR/FPEnv.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15#ifndef LLVM_IR_FPENV_H

16#define LLVM_IR_FPENV_H

17

20#include

21

22namespace llvm {

23class StringRef;

24

26typedef unsigned ID;

27}

28

29class Instruction;

30

31namespace fp {

32

33

34

35

36

37

39 ebIgnore,

40 ebMayTrap,

41 ebStrict

43

44}

45

46

47

48

50

51

52

54

55

56

58

59

60

62

63

64

67}

68

69

70

71

72

74

75

76

79}

80

81

82

85}

86}

87#endif

Utilities for dealing with flags related to floating point properties and mode controls.

Convenience struct for specifying and reasoning about fast-math flags.

ExceptionBehavior

Exception behavior used for floating point operations.

@ ebStrict

This corresponds to "fpexcept.strict".

@ ebMayTrap

This corresponds to "fpexcept.maytrap".

@ ebIgnore

This corresponds to "fpexcept.ignore".

This is an optimization pass for GlobalISel generic memory operations.

bool isDefaultFPEnvironment(fp::ExceptionBehavior EB, RoundingMode RM)

Returns true if the exception handling behavior and rounding mode match what is used in the default f...

std::optional< StringRef > convertRoundingModeToStr(RoundingMode)

For any RoundingMode enumerator, returns a string valid as input in constrained intrinsic rounding mo...

bool canRoundingModeBe(RoundingMode RM, RoundingMode QRM)

Returns true if the rounding mode RM may be QRM at compile time or at run time.

std::optional< StringRef > convertExceptionBehaviorToStr(fp::ExceptionBehavior)

For any ExceptionBehavior enumerator, returns a string valid as input in constrained intrinsic except...

Intrinsic::ID getConstrainedIntrinsicID(const Instruction &Instr)

Returns constrained intrinsic id to represent the given instruction in strictfp function.

std::optional< fp::ExceptionBehavior > convertStrToExceptionBehavior(StringRef)

Returns a valid ExceptionBehavior enumerator when given a string valid as input in constrained intrin...

RoundingMode

Rounding mode.

@ NearestTiesToEven

roundTiesToEven.

@ Dynamic

Denotes mode unknown at compile time.

std::optional< RoundingMode > convertStrToRoundingMode(StringRef)

Returns a valid RoundingMode enumerator when given a string that is valid as input in constrained int...

bool canIgnoreSNaN(fp::ExceptionBehavior EB, FastMathFlags FMF)

Returns true if the possibility of a signaling NaN can be safely ignored.