LLVM: lib/XRay/BlockIndexer.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

14

15using namespace llvm;

17

19

21 CurrentBlock.Records.push_back(&R);

22 CurrentBlock.WallclockTime = &R;

24}

25

27 CurrentBlock.Records.push_back(&R);

29}

30

32 CurrentBlock.Records.push_back(&R);

34}

35

37 CurrentBlock.Records.push_back(&R);

39}

40

42 CurrentBlock.Records.push_back(&R);

44}

45

47 CurrentBlock.Records.push_back(&R);

49}

50

52 CurrentBlock.Records.push_back(&R);

54}

55

57 CurrentBlock.ProcessID = R.pid();

58 CurrentBlock.Records.push_back(&R);

60}

61

63 if (!CurrentBlock.Records.empty())

64 if (auto E = flush())

65 return E;

66

67 CurrentBlock.ThreadID = R.tid();

68 CurrentBlock.Records.push_back(&R);

70}

71

73 CurrentBlock.Records.push_back(&R);

75}

76

78 CurrentBlock.Records.push_back(&R);

80}

81

83 Indices[{CurrentBlock.ProcessID, CurrentBlock.ThreadID}].push_back(

84 {CurrentBlock.ProcessID, CurrentBlock.ThreadID,

85 CurrentBlock.WallclockTime, std::move(CurrentBlock.Records)});

86 CurrentBlock.ProcessID = 0;

87 CurrentBlock.ThreadID = 0;

88 CurrentBlock.Records = {};

89 CurrentBlock.WallclockTime = nullptr;

91}

Lightweight error class with error context and mandatory checking.

static ErrorSuccess success()

Create a success value.

Error visit(BufferExtents &) override

Definition BlockIndexer.cpp:18

Error flush()

The flush() function will clear out the current state of the visitor, to allow for explicitly flushin...

Definition BlockIndexer.cpp:82

This is an optimization pass for GlobalISel generic memory operations.