LLVM: lib/CodeGen/AsmPrinter/AddressPool.h Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9#ifndef LLVM_LIB_CODEGEN_ASMPRINTER_ADDRESSPOOL_H
10#define LLVM_LIB_CODEGEN_ASMPRINTER_ADDRESSPOOL_H
11
13
14namespace llvm {
15
19
20
21
22
24 struct AddressPoolEntry {
26 bool TLS;
27
28 AddressPoolEntry(unsigned Number, bool TLS) : Number(Number), TLS(TLS) {}
29 };
31
32
33
34
35
36 bool HasBeenUsed = false;
37
38public:
40
41
42
44
46
47 bool isEmpty() { return Pool.empty(); }
48
50
51 void resetUsedFlag(bool HasBeenUsed = false) { this->HasBeenUsed = HasBeenUsed; }
52
55
56private:
58
59
60 MCSymbol *AddressTableBaseSym = nullptr;
61};
62
63}
64
65#endif
This file defines the DenseMap class.
unsigned getIndex(const MCSymbol *Sym, bool TLS=false)
Returns the index into the address pool with the given label/symbol.
bool isEmpty()
Definition AddressPool.h:47
MCSymbol * getLabel()
Definition AddressPool.h:53
void emit(AsmPrinter &Asm, MCSection *AddrSection)
void setLabel(MCSymbol *Sym)
Definition AddressPool.h:54
bool hasBeenUsed() const
Definition AddressPool.h:49
void resetUsedFlag(bool HasBeenUsed=false)
Definition AddressPool.h:51
This class is intended to be used as a driving class for all asm writers.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
This is an optimization pass for GlobalISel generic memory operations.