Go to the documentation of this file.
73 void RecordStreamer::visitUsedSymbol(
const MCSymbol &Sym) { markUsed(Sym); }
79 return Symbols.
begin();
121 if (
SI == Symbols.
end())
128 bool KeepOriginalSym) {
129 SymverAliasMap[OriginalSym].push_back(
Name);
134 return {SymverAliasMap.begin(), SymverAliasMap.end()};
148 MangledName.
reserve(GV.getName().size() + 1);
150 MangledNameMap[MangledName] = &GV;
155 for (
auto &Symver : SymverAliasMap) {
156 const MCSymbol *Aliasee = Symver.first;
158 bool IsDefined =
false;
192 if (
MI != MangledNameMap.
end())
211 for (
auto AliasName : Symver.second) {
212 std::pair<StringRef, StringRef> Split = AliasName.split(
"@@@");
214 if (!Split.second.empty() && !Split.second.startswith(
"@")) {
217 const char *Separator = IsDefined ?
"@@" :
"@";
219 (Split.first + Separator + Split.second).
toStringRef(NewName);
iterator_range< global_value_iterator > global_values()
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 ...
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc()) override
Emit a label for Symbol into the current section.
bool hasExternalLinkage() const
Context object for machine code objects.
@ MCSA_Invalid
Not a valid directive.
Instances of this class represent a single low-level machine instruction.
iterator find(StringRef Key)
Streaming machine code generation interface.
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
Represents a location in source code.
virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
@ MCSA_LazyReference
.lazy_reference (MachO)
void emitZerofill(MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment, SMLoc Loc=SMLoc()) override
Emit the zerofill section and an optional symbol.
void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV, bool CannotUsePrivateLabel) const
Print the appropriate prefix and the specified global variable's name.
StringRef toStringRef(const Optional< DWARFFormValue > &V, StringRef Default={})
Take an optional DWARFFormValue and try to extract a string value from it.
virtual void emitAssignment(MCSymbol *Symbol, const MCExpr *Value)
Emit an assignment of Value to Symbol.
void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override
Emit a common symbol.
StringRef getName() const
getName - Get the symbol name.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
iterator_range< const_symver_iterator > symverAliases()
RecordStreamer(MCContext &Context, const Module &M)
static bool isWeakForLinker(LinkageTypes Linkage)
Whether the definition of this global may be replaced at link time.
virtual void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI)
Emit the given Instruction into the current section.
bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override
Add the given Attribute to Symbol.
StandardInstrumentations SI(Debug, VerifyEach)
bool hasLocalLinkage() const
A Module instance is used to store all the information related to an LLVM module.
StringMap< State >::const_iterator const_iterator
StringRef - Represent a constant reference to a string, i.e.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
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
void emitAssignment(MCSymbol *Symbol, const MCExpr *Value) override
Emit an assignment of Value to Symbol.
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
@ MCSA_Global
.type _foo, @gnu_unique_object
void emitELFSymverDirective(const MCSymbol *OriginalSym, StringRef Name, bool KeepOriginalSym) override
Record .symver aliases for later processing.
MCContext & getContext() const
A range adaptor for a pair of iterators.
bool isDeclarationForLinker() const
void reserve(size_type N)
void flushSymverDirectives()
Generic base class for all target subtargets.
LLVM Value Representation.
Base class for the full range of assembler expressions which are needed for parsing.
GlobalValue * getNamedValue(StringRef Name) const
Return the global value in the module with the specified name, of arbitrary type.
void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override
Emit the given Instruction into the current section.