From 5c142ff889bf9eb9feae8385bd64678de4973838 Mon Sep 17 00:00:00 2001 From: mingmingl Date: Sat, 23 Dec 2023 19:47:48 -0800 Subject: [PATCH] [RawProfReader]Read the MD5 of function name in proper byte order --- llvm/lib/ProfileData/InstrProfReader.cpp | 2 +- .../Transforms/PGOProfile/thinlto_indirect_call_promotion.ll | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp index 8f62df79d5b7e..b547cf7181b16 100644 --- a/llvm/lib/ProfileData/InstrProfReader.cpp +++ b/llvm/lib/ProfileData/InstrProfReader.cpp @@ -539,7 +539,7 @@ Error RawInstrProfReader::createSymtab(InstrProfSymtab &Symtab) { const IntPtrT FPtr = swap(I->FunctionPointer); if (!FPtr) continue; - Symtab.mapAddress(FPtr, I->NameRef); + Symtab.mapAddress(FPtr, swap(I->NameRef)); } return success(); } diff --git a/llvm/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll b/llvm/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll index b24effed7024c..d2f4696ccf41d 100644 --- a/llvm/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll +++ b/llvm/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll @@ -9,9 +9,6 @@ ; The raw profiles storesd compressed function names, so profile reader should ; be built with zlib support to decompress them. ; REQUIRES: zlib -; REQUIRES: host-byteorder-little-endian -; Raw profiles are generate on 64-bit systems. -; REQUIRES: llvm-64-bits ; RUN: rm -rf %t && split-file %s %t && cd %t