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,13 +724,15 @@ void Writer::sortExceptionTable() {
|
|||
uint8_t *End = Begin + Sec->getVirtualSize();
|
||||
if (Config->Machine == AMD64) {
|
||||
struct Entry { ulittle32_t Begin, End, Unwind; };
|
||||
std::sort((Entry *)Begin, (Entry *)End,
|
||||
parallel_sort(
|
||||
(Entry *)Begin, (Entry *)End,
|
||||
[](const Entry &A, const Entry &B) { return A.Begin < B.Begin; });
|
||||
return;
|
||||
}
|
||||
if (Config->Machine == ARMNT) {
|
||||
struct Entry { ulittle32_t Begin, Unwind; };
|
||||
std::sort((Entry *)Begin, (Entry *)End,
|
||||
parallel_sort(
|
||||
(Entry *)Begin, (Entry *)End,
|
||||
[](const Entry &A, const Entry &B) { return A.Begin < B.Begin; });
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue