LLVM: lib/Analysis/CycleAnalysis.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

10#include "llvm/IR/CFG.h"

12

13using namespace llvm;

14

15namespace llvm {

17}

18

24

26

28

31 OS << "CycleInfo for function: " << F.getName() << "\n";

33

35}

36

43

44

45

46

47

48

49

50

51

52

54

56

58 true, true)

61

63 AU.setPreservesAll();

64}

65

67 CI.clear();

68

69 F = &Func;

70 CI.compute(Func);

71 return false;

72}

73

75 OS << "CycleInfo for function: " << F->getName() << "\n";

76 CI.print(OS);

77}

78

80 CI.clear();

81 F = nullptr;

82}

This file declares an analysis pass that computes CycleInfo for LLVM IR, specialized from GenericCycl...

This file provides various utilities for inspecting and working with the control flow graph in LLVM I...

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

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

PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)

Get the result of an analysis pass for a given IR unit.

Represent the analysis usage information of a pass.

Analysis pass which computes a CycleInfo.

CycleInfo run(Function &F, FunctionAnalysisManager &)

Run the analysis pass over a function and produce a dominator tree.

Definition CycleAnalysis.cpp:19

CycleInfoPrinterPass(raw_ostream &OS)

Definition CycleAnalysis.cpp:27

PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)

Definition CycleAnalysis.cpp:29

Legacy analysis pass which computes a CycleInfo.

void getAnalysisUsage(AnalysisUsage &AU) const override

getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...

Definition CycleAnalysis.cpp:62

CycleInfoWrapperPass()

Definition CycleAnalysis.cpp:55

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

print - Print out the internal state of the pass.

Definition CycleAnalysis.cpp:74

bool runOnFunction(Function &F) override

runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.

Definition CycleAnalysis.cpp:66

void releaseMemory() override

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

Definition CycleAnalysis.cpp:79

void verify() const

Verify that the entire cycle tree well-formed.

void compute(FunctionT &F)

Compute the cycle info for a function.

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

A set of analyses that are preserved following a run of a transformation pass.

static PreservedAnalyses all()

Construct a special preserved set that preserves all passes.

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.

Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)

AnalysisManager< Function > FunctionAnalysisManager

Convenience typedef for the Function analysis manager.

GenericCycleInfo< SSAContext > CycleInfo

A special type used by analysis passes to provide an address that identifies that particular analysis...

PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)

Definition CycleAnalysis.cpp:37