Go to the documentation of this file.
22 if (
A->SectionID !=
B->SectionID)
23 return A->SectionID <
B->SectionID ? -1 : 1;
24 if (
A->Address !=
B->Address)
25 return A->Address <
B->Address ? -1 : 1;
30 if (
auto *
M = dyn_cast<MachOObjectFile>(&
O))
31 return M->getSectionID(Sec);
32 if (isa<WasmObjectFile>(&
O))
33 return Sec.getIndex();
34 if (isa<XCOFFObjectFile>(&
O))
35 return Sec.getIndex();
36 return cast<COFFObjectFile>(
O).getSectionID(Sec);
40 if (
auto *
M = dyn_cast<MachOObjectFile>(&
O))
41 return M->getSymbolSectionID(Sym);
42 if (
const auto *
M = dyn_cast<WasmObjectFile>(&
O))
43 return M->getSymbolSectionId(Sym);
44 if (
const auto *
M = dyn_cast<XCOFFObjectFile>(&
O))
45 return M->getSymbolSectionID(Sym);
46 return cast<COFFObjectFile>(
O).getSymbolSectionID(Sym);
49 std::vector<std::pair<SymbolRef, uint64_t>>
51 std::vector<std::pair<SymbolRef, uint64_t>>
Ret;
53 if (
const auto *
E = dyn_cast<ELFObjectFileBase>(&
O)) {
54 auto Syms =
E->symbols();
56 Syms =
E->getDynamicSymbolIterators();
58 Ret.push_back({Sym, Sym.getSize()});
64 std::vector<SymEntry> Addresses;
82 if (Addresses.empty())
88 for (
unsigned I = 0,
N = Addresses.size() - 1;
I <
N; ++
I) {
89 auto &
P = Addresses[
I];
90 if (
P.I ==
O.symbol_end())
94 unsigned NextI =
I + 1;
95 while (NextI <
N && Addresses[NextI].Address ==
P.Address)
105 if (
P.I ==
O.symbol_end())
107 Ret[
P.Number] = {*
P.I,
P.Address};
void array_pod_sort(IteratorTy Start, IteratorTy End)
array_pod_sort - This sorts an array with the specified start and end extent.
This is an optimization pass for GlobalISel generic memory operations.
Expected< uint64_t > getValue() const
Return the value of the symbol depending on the object this can be an offset or a virtual address.
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
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
Tagged union holding either a T or a Error.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This is a value type class that represents a single section in the list of sections in the object fil...
int compareAddress(const SymEntry *A, const SymEntry *B)
bar al al movzbl eax ret Missed when stored in a memory object
This class is the base class for all object file types.
std::vector< std::pair< SymbolRef, uint64_t > > computeSymbolSizes(const ObjectFile &O)
static unsigned getSectionID(const ObjectFile &O, SectionRef Sec)
Error takeError()
Take ownership of the stored error.
static unsigned getSymbolSectionID(const ObjectFile &O, SymbolRef Sym)
This is a value type class that represents a single symbol in the list of symbols in the object file.