summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
diff options
context:
space:
mode:
authorSean Silva <chisophugis@gmail.com>2016-08-01 04:16:09 +0000
committerSean Silva <chisophugis@gmail.com>2016-08-01 04:16:09 +0000
commit423c7149dccf4be10aca069616c07527e7d77fa9 (patch)
treec27ad037c5ed7d043311b2cdfc8810e014ba4ced /llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
parente5a5c966cd773c41f0b36ff6d4aa5e972f273ac5 (diff)
downloadbcm5719-llvm-423c7149dccf4be10aca069616c07527e7d77fa9.tar.gz
bcm5719-llvm-423c7149dccf4be10aca069616c07527e7d77fa9.zip
Revert r277313 and r277314.
They seem to trigger an LSan failure: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/15140/steps/check-llvm%20asan/logs/stdio Revert "Add the tests for r277313" This reverts commit r277314. Revert "CodeExtractor : Add ability to preserve profile data." This reverts commit r277313. llvm-svn: 277317
Diffstat (limited to 'llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp')
-rw-r--r--llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp b/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
index 77fe72d5434..90bc249bcb3 100644
--- a/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
+++ b/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
@@ -533,18 +533,12 @@ BlockFrequencyInfoImplBase::getBlockFreq(const BlockNode &Node) const {
Optional<uint64_t>
BlockFrequencyInfoImplBase::getBlockProfileCount(const Function &F,
const BlockNode &Node) const {
- return getProfileCountFromFreq(F, getBlockFreq(Node).getFrequency());
-}
-
-Optional<uint64_t>
-BlockFrequencyInfoImplBase::getProfileCountFromFreq(const Function &F,
- uint64_t Freq) const {
auto EntryCount = F.getEntryCount();
if (!EntryCount)
return None;
// Use 128 bit APInt to do the arithmetic to avoid overflow.
APInt BlockCount(128, EntryCount.getValue());
- APInt BlockFreq(128, Freq);
+ APInt BlockFreq(128, getBlockFreq(Node).getFrequency());
APInt EntryFreq(128, getEntryFreq());
BlockCount *= BlockFreq;
BlockCount = BlockCount.udiv(EntryFreq);
OpenPOWER on IntegriCloud