LLVM: lib/CodeGen/MachineRegionInfo.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

14#include "llvm/Config/llvm-config.h"

19

20#define DEBUG_TYPE "machine-region-info"

21

22using namespace llvm;

23

24STATISTIC(numMachineRegions, "The # of machine regions");

25STATISTIC(numMachineSimpleRegions, "The # of simple machine regions");

26

27namespace llvm {

28

32

33}

34

35

36

37

42

44

45

46

47

49

51

53 ++numMachineRegions;

54

55

56 if (R->isSimple())

57 ++numMachineSimpleRegions;

58}

59

64 DT = DT_;

65 PDT = PDT_;

66 DF = DF_;

67

69

70 TopLevelRegion = new MachineRegion(Entry, nullptr, this, DT, nullptr);

72 calculate(F);

73}

74

75

76

77

78

82

84

87

89 auto PDT =

92

93 RI.recalculate(F, DT, PDT, DF);

94

96

97 return false;

98}

99

101 RI.releaseMemory();

102}

103

105

106

107

109 RI.verifyAnalysis();

110}

111

119

123

124#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)

128#endif

129

132

134 "Detect single entry single exit regions", true, true)

139 "Detect single entry single exit regions", true, true)

140

141

142

143

144

145namespace llvm {

146

150

151}

#define LLVM_DUMP_METHOD

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

static RegisterPass< DebugifyFunctionPass > DF("debugify-function", "Attach debug info to a function")

#define INITIALIZE_PASS_DEPENDENCY(depName)

#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)

#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)

This file defines the 'Statistic' class, which is designed to be an easy way to expose various metric...

#define STATISTIC(VARNAME, DESC)

Represent the analysis usage information of a pass.

AnalysisUsage & addRequired()

void setPreservesAll()

Set by analyses that do not transform their input at all.

FunctionPass class - This class is used to implement most global optimizations.

Analysis pass which computes a MachineDominatorTree.

DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...

MachineFunctionPass(char &ID)

void getAnalysisUsage(AnalysisUsage &AU) const override

getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.

MachinePostDominatorTree - an analysis pass wrapper for DominatorTree used to compute the post-domina...

void getAnalysisUsage(AnalysisUsage &AU) const override

getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.

Definition MachineRegionInfo.cpp:112

bool runOnMachineFunction(MachineFunction &F) override

runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...

Definition MachineRegionInfo.cpp:85

~MachineRegionInfoPass() override

void verifyAnalysis() const override

verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis infor...

Definition MachineRegionInfo.cpp:104

void dump() const

Definition MachineRegionInfo.cpp:125

void releaseMemory() override

releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...

Definition MachineRegionInfo.cpp:100

void print(raw_ostream &OS, const Module *) const override

print - Print out the internal state of the pass.

Definition MachineRegionInfo.cpp:120

MachineRegionInfoPass()

Definition MachineRegionInfo.cpp:79

~MachineRegionInfo() override

void recalculate(MachineFunction &F, MachineDominatorTree *DT, MachinePostDominatorTree *PDT, MachineDominanceFrontier *DF)

Definition MachineRegionInfo.cpp:60

void updateStatistics(MachineRegion *R) final

Definition MachineRegionInfo.cpp:52

MachineRegion(MachineBasicBlock *Entry, MachineBasicBlock *Exit, MachineRegionInfo *RI, MachineDominatorTree *DT, MachineRegion *Parent=nullptr)

Definition MachineRegionInfo.cpp:38

A Module instance is used to store all the information related to an LLVM module.

static LLVM_ABI PassRegistry * getPassRegistry()

getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...

AnalysisType & getAnalysis() const

getAnalysis() - This function is used by subclasses to get to the analysis information ...

A single entry single exit Region.

RegionBase(BlockT *Entry, BlockT *Exit, RegionInfoT *RI, DomTreeT *DT, RegionT *Parent=nullptr)

Analysis that detects all canonical Regions.

static bool VerifyRegionInfo

A RegionNode represents a subregion or a BasicBlock that is part of a Region.

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.

LLVM_ABI void initializeMachineRegionInfoPassPass(PassRegistry &)

FunctionPass * createMachineRegionInfoPass()

Definition MachineRegionInfo.cpp:147

LLVM_ABI char & MachineRegionInfoPassID

MachineRegionInfo - This pass computes SESE regions for machine functions.

Definition MachineRegionInfo.cpp:131