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

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef LLVM_IR_OPTBISECT_H

15#define LLVM_IR_OPTBISECT_H

16

20#include

21

22namespace llvm {

23

24

25

27public:

29

30

31

36

37

38 virtual bool isEnabled() const { return false; }

39};

40

41

42

43

44

46public:

47

48

49

50

51

53

55

56

57

58

59

60

61

62

63

64

65

67 StringRef IRDescription) const override;

68

69

71

72

73

75 BisectLimit = Limit;

76 LastBisectNum = 0;

77 }

78

79 static constexpr int Disabled = std::numeric_limits::max();

80

81private:

83 mutable int LastBisectNum = 0;

84};

85

86

87

88

89

91public:

92

93

94

95

96

97

98

99

100

101

103 StringRef IRDescription) const override;

104

105

106

108

109

110 bool isEnabled() const override { return !DisabledPasses.empty(); }

111

112private:

114};

115

116

117

119

120}

121

122#endif

StringSet - A set-like wrapper for the StringMap.

static const char PassName[]

static constexpr int Disabled

Definition OptBisect.h:79

void setLimit(int Limit)

Set the new optimization limit and reset the counter.

Definition OptBisect.h:74

~OptBisect() override=default

bool shouldRunPass(StringRef PassName, StringRef IRDescription) const override

Checks the bisect limit to determine if the specified pass should run.

bool isEnabled() const override

isEnabled() should return true before calling shouldRunPass().

Definition OptBisect.h:70

OptBisect()=default

Default constructor.

This class implements a mechanism to disable passes and individual optimizations at compile time base...

Definition OptBisect.h:90

bool shouldRunPass(StringRef PassName, StringRef IRDescription) const override

Checks the pass name to determine if the specified pass should run.

bool isEnabled() const override

isEnabled() should return true before calling shouldRunPass().

Definition OptBisect.h:110

void setDisabled(StringRef Pass)

Parses the command line argument to extract the names of the passes to be disabled.

Extensions to this class implement mechanisms to disable passes and individual optimizations at compi...

Definition OptBisect.h:26

virtual bool isEnabled() const

isEnabled() should return true before calling shouldRunPass().

Definition OptBisect.h:38

virtual bool shouldRunPass(StringRef PassName, StringRef IRDescription) const

IRDescription is a textual description of the IR unit the pass is running over.

Definition OptBisect.h:32

virtual ~OptPassGate()=default

Pass interface - Implemented by all 'passes'.

StringRef - Represent a constant reference to a string, i.e.

StringSet - A wrapper for StringMap that provides set-like functionality.

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ABI OptPassGate & getGlobalPassGate()

Singleton instance of the OptPassGate class, so multiple pass managers don't need to coordinate their...