From 423c7149dccf4be10aca069616c07527e7d77fa9 Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Mon, 1 Aug 2016 04:16:09 +0000 Subject: 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 --- llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp') 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 BlockFrequencyInfoImplBase::getBlockProfileCount(const Function &F, const BlockNode &Node) const { - return getProfileCountFromFreq(F, getBlockFreq(Node).getFrequency()); -} - -Optional -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); -- cgit v1.2.3