LLVM: include/llvm/ExecutionEngine/JITLink/TableManager.h Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_EXECUTIONENGINE_JITLINK_TABLEMANAGER_H

14#define LLVM_EXECUTIONENGINE_JITLINK_TABLEMANAGER_H

15

18

19namespace llvm {

21

22

23

24

25

26

27template class TableManager {

28public:

29

30

31

33 assert(Target.hasName() && "Edge cannot point to anonymous target");

34

36

37

38 if (EntryI == Entries.end()) {

39 auto &Entry = impl().createEntry(G, Target);

41 dbgs() << " Created " << impl().getSectionName() << " entry for "

43 });

44 EntryI = Entries.insert(std::make_pair(Target.getName(), &Entry)).first;

45 }

46

47 assert(EntryI != Entries.end() && "Could not get entry symbol");

49 dbgs() << " Using " << impl().getSectionName() << " entry "

50 << *EntryI->second << "\n";

51 });

52 return *EntryI->second;

53 }

54

55

56

57

58

59

60

62 assert(Target.hasName() && "Edge cannot point to anonymous target");

63 auto Res = Entries.insert({

65 &Entry,

66 });

67 return Res.second;

68 }

69

70private:

71 TableManagerImplT &impl() { return static_cast<TableManagerImplT &>(*this); }

73};

74

75}

76}

77

78#endif

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

#define DEBUG_WITH_TYPE(TYPE,...)

DEBUG_WITH_TYPE macro - This macro should be used by passes to emit debug information.

Target - Wrapper for Target specific information.

const char * getName() const

getName - Get the target name.

A CRTP base for tables that are built on demand, e.g.

Definition TableManager.h:27

Symbol & getEntryForTarget(LinkGraph &G, Symbol &Target)

Return the constructed entry.

Definition TableManager.h:32

bool registerPreExistingEntry(Symbol &Target, Symbol &Entry)

Register a pre-existing entry.

Definition TableManager.h:61

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ABI raw_ostream & dbgs()

dbgs() - This returns a reference to a raw_ostream for debugging messages.