Skip to content

Commit 663bb9b

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:d34be649af1aa849c21a5a0570617c3a89d5f0b8 into amd-gfx:95f9b6ae8b37
Local branch amd-gfx 95f9b6a Merged main:597ac471cc7da97ccf957362a7e9f7a52d6910ee into amd-gfx:e36a339769fe Remote branch main d34be64 [ThinLTO]Sort imported GUIDs before cache key update (llvm#92622)
2 parents 95f9b6a + d34be64 commit 663bb9b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

llvm/include/llvm/Config/llvm-config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* Indicate that this is LLVM compiled from the amd-gfx branch. */
1818
#define LLVM_HAVE_BRANCH_AMD_GFX
19-
#define LLVM_MAIN_REVISION 499112
19+
#define LLVM_MAIN_REVISION 499113
2020

2121
/* Define if LLVM_ENABLE_DUMP is enabled */
2222
#cmakedefine LLVM_ENABLE_DUMP

llvm/lib/LTO/LTO.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,19 @@ void llvm::computeLTOCacheKey(
199199
[](const ImportModule &Lhs, const ImportModule &Rhs) -> bool {
200200
return Lhs.getHash() < Rhs.getHash();
201201
});
202+
std::vector<uint64_t> ImportedGUIDs;
202203
for (const ImportModule &Entry : ImportModulesVector) {
203204
auto ModHash = Entry.getHash();
204205
Hasher.update(ArrayRef<uint8_t>((uint8_t *)&ModHash[0], sizeof(ModHash)));
205206

206207
AddUint64(Entry.getFunctions().size());
208+
209+
ImportedGUIDs.clear();
207210
for (auto &Fn : Entry.getFunctions())
208-
AddUint64(Fn);
211+
ImportedGUIDs.push_back(Fn);
212+
llvm::sort(ImportedGUIDs);
213+
for (auto &GUID : ImportedGUIDs)
214+
AddUint64(GUID);
209215
}
210216

211217
// Include the hash for the resolved ODR.

0 commit comments

Comments
 (0)