LLVM: include/llvm/SandboxIR/Pass.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_SANDBOXIR_PASS_H

10#define LLVM_SANDBOXIR_PASS_H

11

14

15namespace llvm {

16

20

22

25

26class Analyses {

30

31 Analyses() = default;

32

33public:

35 : AA(&AA), SE(&SE), TTI(&TTI) {}

36

37public:

41

43};

44

45

47protected:

48

49

50 const std::string Name;

51

52public:

53

56 "A pass name should not contain whitespaces!");

57 assert(Name.starts_with('-') && "A pass name should not start with '-'!");

58 }

59 virtual ~Pass() = default;

60

62#ifndef NDEBUG

64 Pass.print(OS);

65 return OS;

66 }

69#endif

70

72};

73

74

82

83

91

92}

93}

94

95#endif

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")

#define LLVM_DUMP_METHOD

Mark debug helper function definitions like dump() that should not be stripped from debug builds.

#define LLVM_ABI_FOR_TEST

The main scalar evolution driver.

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

This pass provides access to the codegen interfaces that are needed for IR-level transformations.

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

ScalarEvolution & getScalarEvolution() const

Definition Pass.h:39

Analyses(AAResults &AA, ScalarEvolution &SE, TargetTransformInfo &TTI)

Definition Pass.h:34

AAResults & getAA() const

Definition Pass.h:38

TargetTransformInfo & getTTI() const

Definition Pass.h:40

static Analyses emptyForTesting()

For use by unit tests.

Definition Pass.h:42

FunctionPass(StringRef Name)

Name can't contain any spaces or start with '-'.

Definition Pass.h:78

virtual bool runOnFunction(Function &F, const Analyses &A)=0

\Returns true if it modifies F.

virtual void printPipeline(raw_ostream &OS) const

Similar to print() but adds a newline. Used for testing.

Definition Pass.h:71

const std::string Name

The pass name.

Definition Pass.h:50

friend raw_ostream & operator<<(raw_ostream &OS, const Pass &Pass)

Definition Pass.h:63

Pass(StringRef Name)

Name can't contain any spaces or start with '-'.

Definition Pass.h:54

LLVM_ABI_FOR_TEST virtual LLVM_DUMP_METHOD void dump() const

virtual void print(raw_ostream &OS) const

Definition Pass.h:67

StringRef getName() const

\Returns the name of the pass.

Definition Pass.h:61

virtual bool runOnRegion(Region &R, const Analyses &A)=0

\Returns true if it modifies R.

RegionPass(StringRef Name)

Name can't contain any spaces or start with '-'.

Definition Pass.h:87

The main job of the Region is to point to new instructions generated by vectorization passes.

This is an optimization pass for GlobalISel generic memory operations.