LLVM  14.0.0git
GCOV.h
Go to the documentation of this file.
1 //===- GCOV.h - LLVM coverage tool ------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This header provides the interface to read and write coverage files that
10 // use 'gcov' format.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_PROFILEDATA_GCOV_H
15 #define LLVM_PROFILEDATA_GCOV_H
16 
17 #include "llvm/ADT/DenseMap.h"
18 #include "llvm/ADT/DenseSet.h"
19 #include "llvm/ADT/MapVector.h"
20 #include "llvm/ADT/SmallVector.h"
21 #include "llvm/ADT/StringMap.h"
22 #include "llvm/ADT/StringRef.h"
23 #include "llvm/ADT/iterator.h"
28 #include <algorithm>
29 #include <cassert>
30 #include <cstddef>
31 #include <cstdint>
32 #include <limits>
33 #include <map>
34 #include <memory>
35 #include <string>
36 #include <utility>
37 
38 namespace llvm {
39 
40 class GCOVFunction;
41 class GCOVBlock;
42 
43 namespace GCOV {
44 
46 
47 /// A struct for passing gcov options between functions.
48 struct Options {
49  Options(bool A, bool B, bool C, bool F, bool P, bool U, bool I, bool L,
50  bool M, bool N, bool R, bool T, bool X, std::string SourcePrefix)
55 
56  bool AllBlocks;
57  bool BranchInfo;
64  bool Demangle;
65  bool NoOutput;
67  bool UseStdout;
69  std::string SourcePrefix;
70 };
71 
72 } // end namespace GCOV
73 
74 /// GCOVBuffer - A wrapper around MemoryBuffer to provide GCOV specific
75 /// read operations.
76 class GCOVBuffer {
77 public:
78  GCOVBuffer(MemoryBuffer *B) : Buffer(B) {}
80 
81  /// readGCNOFormat - Check GCNO signature is valid at the beginning of buffer.
82  bool readGCNOFormat() {
83  StringRef buf = Buffer->getBuffer();
84  StringRef magic = buf.substr(0, 4);
85  if (magic == "gcno") {
86  de = DataExtractor(buf.substr(4), false, 0);
87  } else if (magic == "oncg") {
88  de = DataExtractor(buf.substr(4), true, 0);
89  } else {
90  errs() << "unexpected magic: " << magic << "\n";
91  return false;
92  }
93  return true;
94  }
95 
96  /// readGCDAFormat - Check GCDA signature is valid at the beginning of buffer.
97  bool readGCDAFormat() {
98  StringRef buf = Buffer->getBuffer();
99  StringRef magic = buf.substr(0, 4);
100  if (magic == "gcda") {
101  de = DataExtractor(buf.substr(4), false, 0);
102  } else if (magic == "adcg") {
103  de = DataExtractor(buf.substr(4), true, 0);
104  } else {
105  return false;
106  }
107  return true;
108  }
109 
110  /// readGCOVVersion - Read GCOV version.
112  std::string str(de.getBytes(cursor, 4));
113  if (str.size() != 4)
114  return false;
115  if (de.isLittleEndian())
116  std::reverse(str.begin(), str.end());
117  int ver = str[0] >= 'A'
118  ? (str[0] - 'A') * 100 + (str[1] - '0') * 10 + str[2] - '0'
119  : (str[0] - '0') * 10 + str[2] - '0';
120  if (ver >= 120) {
121  this->version = version = GCOV::V1200;
122  return true;
123  } else if (ver >= 90) {
124  // PR gcov-profile/84846, r269678
125  this->version = version = GCOV::V900;
126  return true;
127  } else if (ver >= 80) {
128  // PR gcov-profile/48463
129  this->version = version = GCOV::V800;
130  return true;
131  } else if (ver >= 48) {
132  // r189778: the exit block moved from the last to the second.
133  this->version = version = GCOV::V408;
134  return true;
135  } else if (ver >= 47) {
136  // r173147: split checksum into cfg checksum and line checksum.
137  this->version = version = GCOV::V407;
138  return true;
139  } else if (ver >= 34) {
140  this->version = version = GCOV::V304;
141  return true;
142  }
143  errs() << "unexpected version: " << str << "\n";
144  return false;
145  }
146 
147  uint32_t getWord() { return de.getU32(cursor); }
149  uint32_t len;
150  if (!readInt(len) || len == 0)
151  return {};
152  return de.getBytes(cursor, len * 4).split('\0').first;
153  }
154 
155  bool readInt(uint32_t &Val) {
156  if (cursor.tell() + 4 > de.size()) {
157  Val = 0;
158  errs() << "unexpected end of memory buffer: " << cursor.tell() << "\n";
159  return false;
160  }
161  Val = de.getU32(cursor);
162  return true;
163  }
164 
165  bool readInt64(uint64_t &Val) {
166  uint32_t Lo, Hi;
167  if (!readInt(Lo) || !readInt(Hi))
168  return false;
169  Val = ((uint64_t)Hi << 32) | Lo;
170  return true;
171  }
172 
173  bool readString(StringRef &str) {
174  uint32_t len;
175  if (!readInt(len) || len == 0)
176  return false;
177  if (version >= GCOV::V1200)
178  str = de.getBytes(cursor, len).drop_back();
179  else
180  str = de.getBytes(cursor, len * 4).split('\0').first;
181  return bool(cursor);
182  }
183 
186 
187 private:
188  MemoryBuffer *Buffer;
189  GCOV::GCOVVersion version{};
190 };
191 
192 /// GCOVFile - Collects coverage information for one pair of coverage file
193 /// (.gcno and .gcda).
194 class GCOVFile {
195 public:
196  GCOVFile() = default;
197 
198  bool readGCNO(GCOVBuffer &Buffer);
199  bool readGCDA(GCOVBuffer &Buffer);
201  void print(raw_ostream &OS) const;
202  void dump() const;
203 
204  std::vector<std::string> filenames;
206 
207 public:
208  bool GCNOInitialized = false;
213  std::map<uint32_t, GCOVFunction *> identToFunction;
216 
217  using iterator = pointee_iterator<
219  iterator begin() const { return iterator(functions.begin()); }
220  iterator end() const { return iterator(functions.end()); }
221 };
222 
223 struct GCOVArc {
225  : src(src), dst(dst), flags(flags) {}
226  bool onTree() const;
227 
233 };
234 
235 /// GCOVFunction - Collects function information.
237 public:
240 
242 
243  StringRef getName(bool demangle) const;
244  StringRef getFilename() const;
245  uint64_t getEntryCount() const;
246  GCOVBlock &getExitBlock() const;
247 
249  return make_range(blocks.begin(), blocks.end());
250  }
251 
253  void print(raw_ostream &OS) const;
254  void dump() const;
255 
264  uint8_t artificial = 0;
267  unsigned srcIdx;
271 };
272 
273 /// GCOVBlock - Collects block information.
274 class GCOVBlock {
275 public:
280 
282 
283  void addLine(uint32_t N) { lines.push_back(N); }
284  uint32_t getLastLine() const { return lines.back(); }
285  uint64_t getCount() const { return count; }
286 
287  void addSrcEdge(GCOVArc *Edge) { pred.push_back(Edge); }
288 
289  void addDstEdge(GCOVArc *Edge) { succ.push_back(Edge); }
290 
292  return make_range(pred.begin(), pred.end());
293  }
294 
296  return make_range(succ.begin(), succ.end());
297  }
298 
299  void print(raw_ostream &OS) const;
300  void dump() const;
301 
302  static uint64_t
304  std::vector<std::pair<GCOVBlock *, size_t>> &stack);
305  static uint64_t getCyclesCount(const BlockVector &blocks);
306  static uint64_t getLineCount(const BlockVector &Blocks);
307 
308 public:
314  bool traversable = false;
315  GCOVArc *incoming = nullptr;
316 };
317 
319  StringRef gcno, StringRef gcda, GCOVFile &file);
320 
321 } // end namespace llvm
322 
323 #endif // LLVM_PROFILEDATA_GCOV_H
llvm::GCOVFile::functions
SmallVector< std::unique_ptr< GCOVFunction >, 16 > functions
Definition: GCOV.h:212
MemoryBuffer.h
llvm::GCOVFile::iterator
pointee_iterator< SmallVectorImpl< std::unique_ptr< GCOVFunction > >::const_iterator > iterator
Definition: GCOV.h:218
llvm::GCOVFunction::artificial
uint8_t artificial
Definition: GCOV.h:264
llvm::GCOVBlock::getLineCount
static uint64_t getLineCount(const BlockVector &Blocks)
llvm::GCOVBuffer::cursor
DataExtractor::Cursor cursor
Definition: GCOV.h:185
llvm::GCOVBlock::srcs
iterator_range< EdgeIterator > srcs() const
Definition: GCOV.h:291
llvm::GCOVBuffer::readGCOVVersion
bool readGCOVVersion(GCOV::GCOVVersion &version)
readGCOVVersion - Read GCOV version.
Definition: GCOV.h:111
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::GCOVFunction::getEntryCount
uint64_t getEntryCount() const
getEntryCount - Get the number of times the function was called by retrieving the entry block's count...
Definition: GCOV.cpp:357
llvm::GCOVFunction::cfgChecksum
uint32_t cfgChecksum
Definition: GCOV.h:259
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
llvm::make_range
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
Definition: iterator_range.h:53
llvm::GCOVBlock::pred
SmallVector< GCOVArc *, 2 > pred
Definition: GCOV.h:311
llvm::GCOVFunction::startLine
uint32_t startLine
Definition: GCOV.h:260
llvm::GCOVFunction::demangled
SmallString< 0 > demangled
Definition: GCOV.h:266
llvm::GCOVFile::cwd
StringRef cwd
Definition: GCOV.h:211
llvm::GCOVBuffer::de
DataExtractor de
Definition: GCOV.h:184
llvm::GCOVBlock::incoming
GCOVArc * incoming
Definition: GCOV.h:315
llvm::GCOVBlock
GCOVBlock - Collects block information.
Definition: GCOV.h:274
StringRef.h
P
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
Definition: README-SSE.txt:411
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1168
llvm::MipsISD::Lo
@ Lo
Definition: MipsISelLowering.h:79
MapVector.h
llvm::GCOV::GCOVVersion
GCOVVersion
Definition: GCOV.h:45
llvm::GCOVBuffer::GCOVBuffer
GCOVBuffer(MemoryBuffer *B)
Definition: GCOV.h:78
llvm::GCOVFunction::visited
DenseSet< const GCOVBlock * > visited
Definition: GCOV.h:270
DenseMap.h
llvm::reverse
auto reverse(ContainerTy &&C, std::enable_if_t< has_rbegin< ContainerTy >::value > *=nullptr)
Definition: STLExtras.h:333
llvm::GCOVFile::identToFunction
std::map< uint32_t, GCOVFunction * > identToFunction
Definition: GCOV.h:213
T
#define T
Definition: Mips16ISelLowering.cpp:341
llvm::GCOVBlock::count
uint64_t count
Definition: GCOV.h:310
llvm::GCOVArc::count
uint64_t count
Definition: GCOV.h:231
llvm::errs
raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.
Definition: raw_ostream.cpp:892
llvm::GCOV::Options::Options
Options(bool A, bool B, bool C, bool F, bool P, bool U, bool I, bool L, bool M, bool N, bool R, bool T, bool X, std::string SourcePrefix)
Definition: GCOV.h:49
llvm::GCOVFunction::getName
StringRef getName(bool demangle) const
Definition: GCOV.cpp:333
llvm::GCOVBlock::addLine
void addLine(uint32_t N)
Definition: GCOV.h:283
llvm::consumeError
void consumeError(Error Err)
Consume a Error without doing anything.
Definition: Error.h:1035
llvm::GCOVBlock::BlockVector
SmallVector< const GCOVBlock *, 1 > BlockVector
Definition: GCOV.h:277
llvm::MemoryBuffer
This interface provides simple read-only access to a block of memory, and provides simple methods for...
Definition: MemoryBuffer.h:50
llvm::GCOV::Options::NoOutput
bool NoOutput
Definition: GCOV.h:65
F
#define F(x, y, z)
Definition: MD5.cpp:56
llvm::GCOV::V900
@ V900
Definition: GCOV.h:45
llvm::MipsISD::Hi
@ Hi
Definition: MipsISelLowering.h:75
llvm::GCOVArc::flags
uint32_t flags
Definition: GCOV.h:230
llvm::StringRef::substr
LLVM_NODISCARD StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
Definition: StringRef.h:611
llvm::GCOVFile::filenameToIdx
StringMap< unsigned > filenameToIdx
Definition: GCOV.h:205
llvm::GCOVFile::dump
void dump() const
dump - Dump GCOVFile content to dbgs() for debugging purposes.
Definition: GCOV.cpp:325
llvm::GCOV::Options::AllBlocks
bool AllBlocks
Definition: GCOV.h:56
llvm::DataExtractor::Cursor::takeError
Error takeError()
Return error contained inside this Cursor, if any.
Definition: DataExtractor.h:78
llvm::GCOVBlock::addDstEdge
void addDstEdge(GCOVArc *Edge)
Definition: GCOV.h:289
llvm::DataExtractor::getBytes
StringRef getBytes(uint64_t *OffsetPtr, uint64_t Length, Error *Err=nullptr) const
Extract a fixed number of bytes from the specified offset.
Definition: DataExtractor.cpp:181
llvm::GCOVFile::begin
iterator begin() const
Definition: GCOV.h:219
llvm::GCOV::Options::UseStdout
bool UseStdout
Definition: GCOV.h:67
llvm::DataExtractor::isLittleEndian
bool isLittleEndian() const
Get the endianness for this extractor.
Definition: DataExtractor.h:97
llvm::GCOVArc::cycleCount
uint64_t cycleCount
Definition: GCOV.h:232
llvm::GCOVFunction::blocksRange
iterator_range< BlockIterator > blocksRange() const
Definition: GCOV.h:248
llvm::StringRef::split
LLVM_NODISCARD std::pair< StringRef, StringRef > split(char Separator) const
Split into two substrings around the first occurrence of a separator character.
Definition: StringRef.h:749
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::GCOVFunction::ident
uint32_t ident
Definition: GCOV.h:257
llvm::GCOVBlock::number
uint32_t number
Definition: GCOV.h:309
llvm::GCOVBuffer::readGCDAFormat
bool readGCDAFormat()
readGCDAFormat - Check GCDA signature is valid at the beginning of buffer.
Definition: GCOV.h:97
llvm::GCOV::V407
@ V407
Definition: GCOV.h:45
llvm::GCOV::Options::RelativeOnly
bool RelativeOnly
Definition: GCOV.h:66
llvm::GCOVBlock::lines
SmallVector< uint32_t, 4 > lines
Definition: GCOV.h:313
llvm::GCOVBlock::succ
SmallVector< GCOVArc *, 2 > succ
Definition: GCOV.h:312
llvm::GCOV::V1200
@ V1200
Definition: GCOV.h:45
DenseSet.h
B
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
llvm::GCOVFunction::file
GCOVFile & file
Definition: GCOV.h:256
llvm::GCOVBlock::getCyclesCount
static uint64_t getCyclesCount(const BlockVector &blocks)
Definition: GCOV.cpp:489
llvm::GCOVFunction::getFilename
StringRef getFilename() const
Definition: GCOV.cpp:353
llvm::GCOVFunction::endLine
uint32_t endLine
Definition: GCOV.h:262
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
llvm::GCOVBuffer::getString
StringRef getString()
Definition: GCOV.h:148
llvm::MemoryBuffer::getBuffer
StringRef getBuffer() const
Definition: MemoryBuffer.h:69
StringMap.h
llvm::GCOVFile::end
iterator end() const
Definition: GCOV.h:220
llvm::GCOVBlock::getCount
uint64_t getCount() const
Definition: GCOV.h:285
X
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
llvm::demangle
std::string demangle(const std::string &MangledName)
Attempt to demangle a string using different demangling schemes.
Definition: Demangle.cpp:27
llvm::GCOV::Options::BranchCount
bool BranchCount
Definition: GCOV.h:58
llvm::StringMap< unsigned >
llvm::SmallString< 0 >
llvm::GCOVBlock::getLastLine
uint32_t getLastLine() const
Definition: GCOV.h:284
llvm::GCOVFile::GCOVFile
GCOVFile()=default
llvm::GCOVBlock::augmentOneCycle
static uint64_t augmentOneCycle(GCOVBlock *src, std::vector< std::pair< GCOVBlock *, size_t >> &stack)
Definition: GCOV.cpp:438
llvm::GCOVFile::getVersion
GCOV::GCOVVersion getVersion() const
Definition: GCOV.h:200
llvm::DataExtractor::size
size_t size() const
Return the number of bytes in the underlying buffer.
Definition: DataExtractor.h:688
llvm::DenseSet
Implements a dense probed hash-table based set.
Definition: DenseSet.h:268
llvm::GCOV::Options::UncondBranch
bool UncondBranch
Definition: GCOV.h:61
llvm::GCOVFunction::getExitBlock
GCOVBlock & getExitBlock() const
Definition: GCOV.cpp:361
llvm::GCOVBlock::traversable
bool traversable
Definition: GCOV.h:314
file
dot regions Print regions of function to dot file(with no function bodies)"
llvm::GCOV::Options::LongFileNames
bool LongFileNames
Definition: GCOV.h:63
uint64_t
llvm::GCOVBlock::EdgeIterator
SmallVectorImpl< GCOVArc * >::const_iterator EdgeIterator
Definition: GCOV.h:276
iterator.h
I
#define I(x, y, z)
Definition: MD5.cpp:59
llvm::GCOVArc::src
GCOVBlock & src
Definition: GCOV.h:228
llvm::GCOVFunction::arcs
SmallVector< std::unique_ptr< GCOVArc >, 0 > arcs
Definition: GCOV.h:269
llvm::SmallVectorImpl::const_iterator
typename SuperClass::const_iterator const_iterator
Definition: SmallVector.h:563
llvm::move
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition: STLExtras.h:1609
llvm::DataExtractor::Cursor::tell
uint64_t tell() const
Return the current position of this Cursor.
Definition: DataExtractor.h:71
iterator_range.h
llvm::GCOV::Options::FuncCoverage
bool FuncCoverage
Definition: GCOV.h:59
llvm::GCOVBuffer::readInt
bool readInt(uint32_t &Val)
Definition: GCOV.h:155
llvm::DataExtractor::Cursor
A class representing a position in a DataExtractor, as well as any error encountered during extractio...
Definition: DataExtractor.h:54
llvm::gcovOneInput
void gcovOneInput(const GCOV::Options &options, StringRef filename, StringRef gcno, StringRef gcda, GCOVFile &file)
Definition: GCOV.cpp:955
llvm::GCOVFunction::Name
StringRef Name
Definition: GCOV.h:265
llvm::GCOVBlock::GCOVBlock
GCOVBlock(uint32_t N)
Definition: GCOV.h:281
llvm::GCOVBuffer::readInt64
bool readInt64(uint64_t &Val)
Definition: GCOV.h:165
llvm::StringRef::drop_back
LLVM_NODISCARD StringRef drop_back(size_t N=1) const
Return a StringRef equal to 'this' but with the last N elements dropped.
Definition: StringRef.h:661
llvm::DataExtractor::getU32
uint32_t getU32(uint64_t *offset_ptr, Error *Err=nullptr) const
Extract a uint32_t value from *offset_ptr.
Definition: DataExtractor.cpp:108
llvm::ArrayRef< uint8_t >
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
const_iterator
uint32_t
llvm::GCOVBuffer::getWord
uint32_t getWord()
Definition: GCOV.h:147
magic
static ms magic(const APInt &d)
Calculate the magic numbers required to implement a signed integer division by a constant as a sequen...
Definition: TargetLowering.cpp:5192
llvm::GCOV::V800
@ V800
Definition: GCOV.h:45
llvm::GCOVArc
Definition: GCOV.h:223
llvm::GCOVFile::runCount
uint32_t runCount
Definition: GCOV.h:214
llvm::GCOVFunction::srcIdx
unsigned srcIdx
Definition: GCOV.h:267
llvm::GCOVFunction::dump
void dump() const
dump - Dump GCOVFunction content to dbgs() for debugging purposes.
Definition: GCOV.cpp:398
llvm::GCOVFile::print
void print(raw_ostream &OS) const
Definition: GCOV.cpp:318
llvm::GCOV::Options::Demangle
bool Demangle
Definition: GCOV.h:64
llvm::GCOV::Options::HashFilenames
bool HashFilenames
Definition: GCOV.h:68
std
Definition: BitVector.h:838
llvm::GCOV::Options
A struct for passing gcov options between functions.
Definition: GCOV.h:48
llvm::GCOV::Options::Intermediate
bool Intermediate
Definition: GCOV.h:62
llvm::GCOVFile::version
GCOV::GCOVVersion version
Definition: GCOV.h:209
llvm::GCOVArc::onTree
bool onTree() const
Definition: GCOV.cpp:328
llvm::GCOV::Options::BranchInfo
bool BranchInfo
Definition: GCOV.h:57
options
The object format emitted by the WebAssembly backed is documented see the home and packaging for producing WebAssembly applications that can run in browsers and other environments wasi sdk provides a more minimal C C SDK based on llvm and a libc based on for producing WebAssemmbly applictions that use the WASI ABI Rust provides WebAssembly support integrated into Cargo There are two main options
Definition: README.txt:24
DataExtractor.h
llvm::GCOVFile::GCNOInitialized
bool GCNOInitialized
Definition: GCOV.h:208
llvm::GCOVBlock::print
void print(raw_ostream &OS) const
collectLineCounts - Collect line counts.
Definition: GCOV.cpp:407
llvm::GCOVFunction::endColumn
uint32_t endColumn
Definition: GCOV.h:263
llvm::GCOVArc::GCOVArc
GCOVArc(GCOVBlock &src, GCOVBlock &dst, uint32_t flags)
Definition: GCOV.h:224
llvm::GCOV::V408
@ V408
Definition: GCOV.h:45
llvm::GCOVFunction::linenoChecksum
uint32_t linenoChecksum
Definition: GCOV.h:258
llvm::GCOVFunction::print
void print(raw_ostream &OS) const
Definition: GCOV.cpp:389
llvm::GCOVBuffer::readGCNOFormat
bool readGCNOFormat()
readGCNOFormat - Check GCNO signature is valid at the beginning of buffer.
Definition: GCOV.h:82
llvm::GCOVBlock::dsts
iterator_range< EdgeIterator > dsts() const
Definition: GCOV.h:295
llvm::GCOVFile::filenames
std::vector< std::string > filenames
Definition: GCOV.h:204
llvm::GCOVFunction::startColumn
uint32_t startColumn
Definition: GCOV.h:261
llvm::GCOVFile::readGCDA
bool readGCDA(GCOVBuffer &Buffer)
readGCDA - Read GCDA buffer.
Definition: GCOV.cpp:212
llvm::DataExtractor
Definition: DataExtractor.h:41
llvm::sys::path::filename
StringRef filename(StringRef path, Style style=Style::native)
Get filename.
Definition: Path.cpp:575
llvm::GCOV::V304
@ V304
Definition: GCOV.h:45
SmallVector.h
llvm::GCOVFile
GCOVFile - Collects coverage information for one pair of coverage file (.gcno and ....
Definition: GCOV.h:194
N
#define N
llvm::GCOVBlock::addSrcEdge
void addSrcEdge(GCOVArc *Edge)
Definition: GCOV.h:287
llvm::iterator_range
A range adaptor for a pair of iterators.
Definition: iterator_range.h:30
llvm::GCOVBlock::dump
void dump() const
dump - Dump GCOVBlock content to dbgs() for debugging purposes.
Definition: GCOV.cpp:434
llvm::GCOVFunction::treeArcs
SmallVector< std::unique_ptr< GCOVArc >, 0 > treeArcs
Definition: GCOV.h:269
stack
S is passed via registers r2 But gcc stores them to the stack
Definition: README.txt:189
llvm::GCOVFile::programCount
uint32_t programCount
Definition: GCOV.h:215
llvm::SmallVectorImpl
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: APFloat.h:43
llvm::GCOVBuffer::~GCOVBuffer
~GCOVBuffer()
Definition: GCOV.h:79
pred
hexagon gen pred
Definition: HexagonGenPredicate.cpp:134
llvm::GCOVBuffer::readString
bool readString(StringRef &str)
Definition: GCOV.h:173
llvm::GCOVArc::dst
GCOVBlock & dst
Definition: GCOV.h:229
llvm::GCOVFunction::blocks
SmallVector< std::unique_ptr< GCOVBlock >, 0 > blocks
Definition: GCOV.h:268
llvm::GCOVFunction
GCOVFunction - Collects function information.
Definition: GCOV.h:236
llvm::GCOV::Options::SourcePrefix
std::string SourcePrefix
Definition: GCOV.h:69
llvm::pointee_iterator
An iterator type that allows iterating over the pointees via some other iterator.
Definition: iterator.h:314
llvm::GCOVBuffer
GCOVBuffer - A wrapper around MemoryBuffer to provide GCOV specific read operations.
Definition: GCOV.h:76
raw_ostream.h
llvm::GCOVFunction::GCOVFunction
GCOVFunction(GCOVFile &file)
Definition: GCOV.h:241
llvm::GCOV::Options::PreservePaths
bool PreservePaths
Definition: GCOV.h:60
llvm::GCOVFunction::propagateCounts
uint64_t propagateCounts(const GCOVBlock &v, GCOVArc *pred)
Definition: GCOV.cpp:369
llvm::GCOVFile::readGCNO
bool readGCNO(GCOVBuffer &Buffer)
readGCNO - Read GCNO buffer.
Definition: GCOV.cpp:101
llvm::GCOVFile::checksum
uint32_t checksum
Definition: GCOV.h:210