[llvm] 07107f3 - [llvm-profdata] Remove unnecessary file size check
William Huang via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 3 11:24:53 PST 2023
Author: William Huang
Date: 2023-01-03T19:24:45Z
New Revision: 07107f339058ba10c44b64c85412578e5e68256e
URL: https://github.com/llvm/llvm-project/commit/07107f339058ba10c44b64c85412578e5e68256e
DIFF: https://github.com/llvm/llvm-project/commit/07107f339058ba10c44b64c85412578e5e68256e.diff
LOG: [llvm-profdata] Remove unnecessary file size check
Unsure why profile reader checks profile size to be less than 4 GB. This breaks builds using a very large profile.
The limit is not seen anywhere else, so I am not sure why is it there in the first place.
Reviewed By: davidxl
Differential Revision: https://reviews.llvm.org/D140741
Added:
Modified:
llvm/lib/ProfileData/SampleProfReader.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ProfileData/SampleProfReader.cpp b/llvm/lib/ProfileData/SampleProfReader.cpp
index 25b13e043aea8..b2a38c6fa958d 100644
--- a/llvm/lib/ProfileData/SampleProfReader.cpp
+++ b/llvm/lib/ProfileData/SampleProfReader.cpp
@@ -1837,10 +1837,6 @@ setupMemoryBuffer(const Twine &Filename) {
return EC;
auto Buffer = std::move(BufferOrErr.get());
- // Check the file.
- if (uint64_t(Buffer->getBufferSize()) > std::numeric_limits<uint32_t>::max())
- return sampleprof_error::too_large;
-
return std::move(Buffer);
}
More information about the llvm-commits
mailing list