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

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_IR_FMF_H

14#define LLVM_IR_FMF_H

15

17

18namespace llvm {

20

21

22class FastMathFlags {

23private:

25

26 unsigned Flags = 0;

27

29

30public:

31

32

33

34

35 enum {

44 };

45

47

49

51 FastMathFlags FMF;

53 return FMF;

54 }

55

56 bool any() const { return Flags != 0; }

57 bool none() const { return Flags == 0; }

59

60 void clear() { Flags = 0; }

62

63

71

73

74

97

98 void operator&=(const FastMathFlags &OtherFlags) {

99 Flags &= OtherFlags.Flags;

100 }

101 void operator|=(const FastMathFlags &OtherFlags) {

102 Flags |= OtherFlags.Flags;

103 }

104 bool operator!=(const FastMathFlags &OtherFlags) const {

105 return Flags != OtherFlags.Flags;

106 }

107

108

110

111

113 FastMathFlags RHS) {

114 const unsigned RewriteMask =

117 }

118

119

124};

125

130

135

140

141}

142

143#endif

static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")

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

Definition FMF.h:22

void setFast(bool B=true)

Definition FMF.h:96

LLVM_ABI void print(raw_ostream &O) const

Print fast-math flags to O.

static FastMathFlags intersectRewrite(FastMathFlags LHS, FastMathFlags RHS)

Intersect rewrite-based flags.

Definition FMF.h:112

bool any() const

Definition FMF.h:56

void setAllowContract(bool B=true)

Definition FMF.h:90

friend class FPMathOperator

Definition FMF.h:24

bool noSignedZeros() const

Definition FMF.h:67

void clear()

Definition FMF.h:60

bool noInfs() const

Definition FMF.h:66

bool none() const

Definition FMF.h:57

bool all() const

Definition FMF.h:58

void setAllowReciprocal(bool B=true)

Definition FMF.h:87

bool allowReciprocal() const

Definition FMF.h:68

void operator|=(const FastMathFlags &OtherFlags)

Definition FMF.h:101

void set()

Definition FMF.h:61

static FastMathFlags unionValue(FastMathFlags LHS, FastMathFlags RHS)

Union value flags.

Definition FMF.h:120

void setNoSignedZeros(bool B=true)

Definition FMF.h:84

bool allowReassoc() const

Flag queries.

Definition FMF.h:64

static constexpr unsigned AllFlagsMask

Definition FMF.h:46

bool approxFunc() const

Definition FMF.h:70

void setNoNaNs(bool B=true)

Definition FMF.h:78

void setAllowReassoc(bool B=true)

Flag setters.

Definition FMF.h:75

bool noNaNs() const

Definition FMF.h:65

void setApproxFunc(bool B=true)

Definition FMF.h:93

static FastMathFlags getFast()

Definition FMF.h:50

void setNoInfs(bool B=true)

Definition FMF.h:81

bool allowContract() const

Definition FMF.h:69

bool operator!=(const FastMathFlags &OtherFlags) const

Definition FMF.h:104

@ AllowReassoc

Definition FMF.h:36

@ FlagEnd

Definition FMF.h:43

@ ApproxFunc

Definition FMF.h:42

@ AllowContract

Definition FMF.h:41

@ NoSignedZeros

Definition FMF.h:39

@ NoNaNs

Definition FMF.h:37

@ NoInfs

Definition FMF.h:38

@ AllowReciprocal

Definition FMF.h:40

bool isFast() const

'Fast' means all bits are set.

Definition FMF.h:72

void operator&=(const FastMathFlags &OtherFlags)

Definition FMF.h:98

This class implements an extremely fast bulk output stream that can only output to a stream.

This is an optimization pass for GlobalISel generic memory operations.

APInt operator&(APInt a, const APInt &b)

raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)

APInt operator|(APInt a, const APInt &b)