[llvm] r250242 - Sample profile reader - remove dead code. NFC.
Diego Novillo via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 13 15:48:48 PDT 2015
Author: dnovillo
Date: Tue Oct 13 17:48:48 2015
New Revision: 250242
URL: http://llvm.org/viewvc/llvm-project?rev=250242&view=rev
Log:
Sample profile reader - remove dead code. NFC.
This removes old remnants from the gcov reader. I missed these when I
re-wrote it recently.
Modified:
llvm/trunk/include/llvm/ProfileData/SampleProfReader.h
llvm/trunk/lib/ProfileData/SampleProfReader.cpp
Modified: llvm/trunk/include/llvm/ProfileData/SampleProfReader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/SampleProfReader.h?rev=250242&r1=250241&r2=250242&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ProfileData/SampleProfReader.h (original)
+++ llvm/trunk/include/llvm/ProfileData/SampleProfReader.h Tue Oct 13 17:48:48 2015
@@ -173,31 +173,6 @@ protected:
std::vector<StringRef> NameTable;
};
-// Represents the source position in GCC sample profiles.
-struct SourceInfo {
- SourceInfo()
- : FuncName(), DirName(), FileName(), StartLine(0), Line(0),
- Discriminator(0) {}
-
- SourceInfo(StringRef FuncName, StringRef DirName, StringRef FileName,
- uint32_t StartLine, uint32_t Line, uint32_t Discriminator)
- : FuncName(FuncName), DirName(DirName), FileName(FileName),
- StartLine(StartLine), Line(Line), Discriminator(Discriminator) {}
-
- bool operator<(const SourceInfo &p) const;
-
- uint32_t Offset() const { return ((Line - StartLine) << 16) | Discriminator; }
-
- bool Malformed() const { return Line < StartLine; }
-
- StringRef FuncName;
- StringRef DirName;
- StringRef FileName;
- uint32_t StartLine;
- uint32_t Line;
- uint32_t Discriminator;
-};
-
typedef SmallVector<FunctionSamples *, 10> InlineCallStack;
// Supported histogram types in GCC. Currently, we only need support for
Modified: llvm/trunk/lib/ProfileData/SampleProfReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/SampleProfReader.cpp?rev=250242&r1=250241&r2=250242&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/SampleProfReader.cpp (original)
+++ llvm/trunk/lib/ProfileData/SampleProfReader.cpp Tue Oct 13 17:48:48 2015
@@ -521,16 +521,6 @@ bool SampleProfileReaderBinary::hasForma
return Magic == SPMagic();
}
-bool SourceInfo::operator<(const SourceInfo &P) const {
- if (Line != P.Line)
- return Line < P.Line;
- if (StartLine != P.StartLine)
- return StartLine < P.StartLine;
- if (Discriminator != P.Discriminator)
- return Discriminator < P.Discriminator;
- return FuncName < P.FuncName;
-}
-
std::error_code SampleProfileReaderGCC::skipNextWord() {
uint32_t dummy;
if (!GcovBuffer.readInt(dummy))
More information about the llvm-commits
mailing list