Skip to content

Commit

Permalink
Revert "[PGO] Fix computation of function Hash"
Browse files Browse the repository at this point in the history
This reverts commit 7c298c1.
Fails make check-clang.

Failing Tests (8):
	Clang :: Profile/c-counter-overflows.c
	Clang :: Profile/c-general.c
	Clang :: Profile/c-unprofiled-blocks.c
	Clang :: Profile/cxx-rangefor.cpp
	Clang :: Profile/cxx-throws.cpp
	Clang :: Profile/misexpect-switch-default.c
	Clang :: Profile/misexpect-switch-nonconst.c
	Clang :: Profile/misexpect-switch.c
  • Loading branch information
d0k committed May 25, 2020
1 parent b321b42 commit 2b8d6fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 27 deletions.
8 changes: 3 additions & 5 deletions clang/lib/CodeGen/CodeGenPGO.cpp
Expand Up @@ -747,15 +747,13 @@ uint64_t PGOHash::finalize() {
return Working;

// Check for remaining work in Working.
if (Working) {
using namespace llvm::support;
uint64_t Swapped = endian::byte_swap<uint64_t, little>(Working);
MD5.update(llvm::makeArrayRef((uint8_t *)&Swapped, sizeof(Swapped)));
}
if (Working)
MD5.update(Working);

// Finalize the MD5 and return the hash.
llvm::MD5::MD5Result Result;
MD5.final(Result);
using namespace llvm::support;
return Result.low();
}

Expand Down
22 changes: 0 additions & 22 deletions clang/test/Profile/c-collision.c

This file was deleted.

0 comments on commit 2b8d6fa

Please sign in to comment.