Go to the documentation of this file.
33 Streamer.
emitValue(Entry.Value, Entry.Size, Entry.Loc);
40 unsigned Size,
SMLoc Loc) {
46 auto CItr = CachedConstantEntries.find(
C->getValue());
47 if (CItr != CachedConstantEntries.end())
53 auto SItr = CachedSymbolEntries.find(&(
S->getSymbol()));
54 if (SItr != CachedSymbolEntries.end())
63 CachedConstantEntries[
C->getValue()] = SymRef;
65 CachedSymbolEntries[&(
S->getSymbol())] = SymRef;
72 CachedConstantEntries.clear();
73 CachedSymbolEntries.clear();
81 if (
CP == ConstantPools.
end())
88 AssemblerConstantPools::getOrCreateConstantPool(
MCSection *Section) {
89 return ConstantPools[Section];
96 CP.emitEntries(Streamer);
102 for (
auto &CPI : ConstantPools) {
124 unsigned Size,
SMLoc Loc) {
typename std::vector< std::pair< MCSection *, ConstantPool >> ::iterator iterator
virtual void emitDataRegion(MCDataRegionType Kind)
Note in the output the specified region Kind.
This is an optimization pass for GlobalISel generic memory operations.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Context object for machine code objects.
void clearCacheForCurrentSection(MCStreamer &Streamer)
static void emitConstantPool(MCStreamer &Streamer, MCSection *Section, ConstantPool &CP)
void emitValue(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
const MCExpr * addEntry(MCStreamer &Streamer, const MCExpr *Expr, unsigned Size, SMLoc Loc)
Streaming machine code generation interface.
@ MCDR_DataRegion
.data_region
Represents a location in source code.
(vector float) vec_cmpeq(*A, *B) C
virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
virtual void switchSection(MCSection *Section, const MCExpr *Subsection=nullptr)
Set the current section where code is being emitted to Section.
void emitEntries(MCStreamer &Streamer)
MCSection * getCurrentSectionOnly() const
void emitAll(MCStreamer &Streamer)
iterator find(const KeyT &Key)
Represent a reference to a symbol from inside an expression.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
void emitForCurrentSection(MCStreamer &Streamer)
virtual void emitValueToAlignment(Align Alignment, int64_t Value=0, unsigned ValueSize=1, unsigned MaxBytesToEmit=0)
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
const MCExpr * addEntry(const MCExpr *Value, MCContext &Context, unsigned Size, SMLoc Loc)
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
MCContext & getContext() const
@ MCDR_DataRegionEnd
.end_data_region
LLVM Value Representation.
Base class for the full range of assembler expressions which are needed for parsing.