LLVM: include/llvm/CAS/ActionCache.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15#ifndef LLVM_CAS_ACTIONCACHE_H

16#define LLVM_CAS_ACTIONCACHE_H

17

22

24

28

29

30

31

33public:

35

39

40private:

41 std::string Key;

42};

43

44

45

46

47

48

50 virtual void anchor();

51

52public:

53

54

55

56

57

59 bool CanBeDistributed = false) const {

61 }

62

63

64

65

66

67

68

70 bool CanBeDistributed = false) {

71 assert(Result.getContext().getHashSchemaIdentifier() ==

72 getContext().getHashSchemaIdentifier() &&

73 "Hash schema mismatch");

75 CanBeDistributed);

76 }

77

78

80

82

83protected:

84

87

88

90 bool CanBeDistributed) = 0;

91

93

95

96private:

98};

99

100

102

103

106

107}

108

109#endif

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

#define LLVM_ABI_FOR_TEST

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

Lightweight error class with error context and mandatory checking.

Tagged union holding either a T or a Error.

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

Error put(const CacheKey &ActionKey, const CASID &Result, bool CanBeDistributed=false)

Cache Result for the ActionKey computation.

Definition ActionCache.h:69

Expected< std::optional< CASID > > get(const CacheKey &ActionKey, bool CanBeDistributed=false) const

Get a previously computed result for ActionKey.

Definition ActionCache.h:58

ActionCache(const CASContext &Context)

Definition ActionCache.h:92

virtual Expected< std::optional< CASID > > getImpl(ArrayRef< uint8_t > ResolvedKey, bool CanBeDistributed) const =0

const CASContext & getContext() const

Definition ActionCache.h:94

virtual Error putImpl(ArrayRef< uint8_t > ResolvedKey, const CASID &Result, bool CanBeDistributed)=0

virtual Error validate() const =0

Validate the ActionCache contents.

virtual ~ActionCache()=default

Context for CAS identifiers.

Unique identifier for a CAS object.

A key for caching an operation.

Definition ActionCache.h:32

LLVM_ABI CacheKey(const CASID &ID)

StringRef getKey() const

Definition ActionCache.h:34

Reference to an abstract hierarchical node, with data and references.

Reference to an object in an ObjectStore instance.

Content-addressable storage for objects.

unsigned ID

LLVM IR allows to use arbitrary numbers as calling convention identifiers.

Definition ActionCache.h:23

LLVM_ABI Expected< std::unique_ptr< ActionCache > > createOnDiskActionCache(StringRef Path)

Create an action cache on disk.

LLVM_ABI std::unique_ptr< ActionCache > createInMemoryActionCache()

Create an action cache in memory.

ArrayRef< CharT > arrayRefFromStringRef(StringRef Input)

Construct a string ref from an array ref of unsigned chars.

LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key

@ Ref

The access may reference the value stored in memory.