[PATCH] D30233: Fix an obvious bug in SampleProfileReaderGCC.
Dehao Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 21 15:31:30 PST 2017
danielcdh created this revision.
The CallTargetProfile should be added to FProfile to be consistent with other profile readers.
https://reviews.llvm.org/D30233
Files:
lib/ProfileData/SampleProfReader.cpp
Index: lib/ProfileData/SampleProfReader.cpp
===================================================================
--- lib/ProfileData/SampleProfReader.cpp
+++ lib/ProfileData/SampleProfReader.cpp
@@ -681,11 +681,9 @@
if (!GcovBuffer.readInt64(TargetCount))
return sampleprof_error::truncated;
- if (Update) {
- FunctionSamples &TargetProfile = Profiles[TargetName];
- TargetProfile.addCalledTargetSamples(LineOffset, Discriminator,
- TargetName, TargetCount);
- }
+ if (Update)
+ FProfile->addCalledTargetSamples(LineOffset, Discriminator,
+ TargetName, TargetCount);
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30233.89294.patch
Type: text/x-patch
Size: 718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170221/1813bd3d/attachment.bin>
More information about the llvm-commits
mailing list