forked from OSchip/llvm-project
COFF: Use parallel_sort in Writer::sortExceptionTable().
This patch saves 4 ms out of 5 ms. Very small improvement, but maybe better than nothing. llvm-svn: 248063
This commit is contained in:
parent
666892051c
commit
8197a4e0bf
|
@ -724,14 +724,16 @@ void Writer::sortExceptionTable() {
|
||||||
uint8_t *End = Begin + Sec->getVirtualSize();
|
uint8_t *End = Begin + Sec->getVirtualSize();
|
||||||
if (Config->Machine == AMD64) {
|
if (Config->Machine == AMD64) {
|
||||||
struct Entry { ulittle32_t Begin, End, Unwind; };
|
struct Entry { ulittle32_t Begin, End, Unwind; };
|
||||||
std::sort((Entry *)Begin, (Entry *)End,
|
parallel_sort(
|
||||||
[](const Entry &A, const Entry &B) { return A.Begin < B.Begin; });
|
(Entry *)Begin, (Entry *)End,
|
||||||
|
[](const Entry &A, const Entry &B) { return A.Begin < B.Begin; });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Config->Machine == ARMNT) {
|
if (Config->Machine == ARMNT) {
|
||||||
struct Entry { ulittle32_t Begin, Unwind; };
|
struct Entry { ulittle32_t Begin, Unwind; };
|
||||||
std::sort((Entry *)Begin, (Entry *)End,
|
parallel_sort(
|
||||||
[](const Entry &A, const Entry &B) { return A.Begin < B.Begin; });
|
(Entry *)Begin, (Entry *)End,
|
||||||
|
[](const Entry &A, const Entry &B) { return A.Begin < B.Begin; });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
errs() << "warning: don't know how to handle .pdata.\n";
|
errs() << "warning: don't know how to handle .pdata.\n";
|
||||||
|
|
Loading…
Reference in New Issue