Go to the documentation of this file.
23 assert(GV.
hasName() &&
"Can't get flags for anonymous symbol");
33 if (isa<Function>(GV))
35 else if (isa<GlobalAlias>(GV) &&
36 isa<Function>(cast<GlobalAlias>(GV).getAliasee()))
42 const auto &
DL =
M->getDataLayout();
54 auto L =
S->linkage();
62 if (isa<FunctionSummary>(
S))
71 if (!SymbolFlagsOrErr)
96 if (!SymbolFlagsOrErr)
111 for (
auto &Symbol : Symbols) {
112 std::string SymName = Symbol.str();
114 if (
auto AddrOrErr = Sym.getAddress())
117 OnResolved(AddrOrErr.takeError());
120 }
else if (
auto Err = Sym.takeError()) {
126 if (
auto AddrOrErr = Sym.getAddress())
129 OnResolved(AddrOrErr.takeError());
132 }
else if (
auto Err = Sym.takeError()) {
136 OnResolved(make_error<StringError>(
"Symbol not found: " + Symbol,
152 for (
auto &Symbol : Symbols) {
153 std::string SymName = Symbol.str();
157 if (!Sym.getFlags().isStrong())
158 Result.insert(Symbol);
159 }
else if (
auto Err = Sym.takeError())
164 Result.insert(Symbol);
This is an optimization pass for GlobalISel generic memory operations.
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
bool hasCommonLinkage() const
unique_function is a type-erasing functor similar to std::function.
char front() const
front - Get the first character in the string.
void lookup(const LookupSet &Symbols, OnResolvedFunction OnResolved) final
Performs lookup by, for each symbol, first calling findSymbolInLogicalDylib and if that fails calling...
bool hasWeakLinkage() const
static JITSymbolFlags fromSummary(GlobalValueSummary *S)
Construct a JITSymbolFlags value based on the flags of the given global value summary.
bool hasHiddenVisibility() const
Tagged union holding either a T or a Error.
Expected< LookupSet > getResponsibilitySet(const LookupSet &Symbols) final
Performs flags lookup by calling findSymbolInLogicalDylib and returning the flags value for that symb...
Flags for symbols in the JIT.
Represents a symbol that has been evaluated to an address already.
ARM-specific JIT symbol flags.
static bool isCommonLinkage(LinkageTypes Linkage)
std::set< StringRef > LookupSet
Function and variable summary information to aid decisions and implementation of importing.
bool startswith(StringRef Prefix) const
virtual JITSymbol findSymbolInLogicalDylib(const std::string &Name)=0
This method returns the address of the specified symbol if it exists within the logical dynamic libra...
constexpr StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
constexpr bool empty() const
empty - Check if the string is empty.
Module * getParent()
Get the module that this global value is contained inside of...
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static bool isExternalLinkage(LinkageTypes Linkage)
bool hasLocalLinkage() const
static bool isWeakLinkage(LinkageTypes Linkage)
StringRef - Represent a constant reference to a string, i.e.
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
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
StringRef getName() const
Return a constant reference to the value's name.
static bool isLinkOnceLinkage(LinkageTypes Linkage)
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
static JITSymbolFlags fromGlobalValue(const GlobalValue &GV)
Construct a JITSymbolFlags value based on the flags of the given global value.
Error takeError()
Take ownership of the stored error.
static ARMJITSymbolFlags fromObjectSymbol(const object::SymbolRef &Symbol)
static Expected< JITSymbolFlags > fromObjectSymbol(const object::SymbolRef &Symbol)
Construct a JITSymbolFlags value based on the flags of the given libobject symbol.
std::map< StringRef, JITEvaluatedSymbol > LookupResult
bool hasLinkOnceLinkage() const
This is a value type class that represents a single symbol in the list of symbols in the object file.
static bool isExternalWeakLinkage(LinkageTypes Linkage)
virtual JITSymbol findSymbol(const std::string &Name)=0
This method returns the address of the specified function or variable.