LLVM  14.0.0git
CodeGenCoverage.h
Go to the documentation of this file.
1 //== llvm/Support/CodeGenCoverage.h ------------------------------*- 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 /// \file This file provides rule coverage tracking for tablegen-erated CodeGen.
9 //===----------------------------------------------------------------------===//
10 
11 #ifndef LLVM_SUPPORT_CODEGENCOVERAGE_H
12 #define LLVM_SUPPORT_CODEGENCOVERAGE_H
13 
14 #include "llvm/ADT/BitVector.h"
15 
16 namespace llvm {
17 class LLVMContext;
18 class MemoryBuffer;
19 
21 protected:
23 
24 public:
26 
28 
29  void setCovered(uint64_t RuleID);
30  bool isCovered(uint64_t RuleID) const;
32 
33  bool parse(MemoryBuffer &Buffer, StringRef BackendName);
34  bool emit(StringRef FilePrefix, StringRef BackendName) const;
35  void reset();
36 };
37 } // namespace llvm
38 
39 #endif // LLVM_SUPPORT_CODEGENCOVERAGE_H
llvm::CodeGenCoverage::CodeGenCoverage
CodeGenCoverage()
Definition: CodeGenCoverage.cpp:26
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
llvm::CodeGenCoverage::isCovered
bool isCovered(uint64_t RuleID) const
Definition: CodeGenCoverage.cpp:34
llvm::CodeGenCoverage::parse
bool parse(MemoryBuffer &Buffer, StringRef BackendName)
Definition: CodeGenCoverage.cpp:45
llvm::CodeGenCoverage::setCovered
void setCovered(uint64_t RuleID)
Definition: CodeGenCoverage.cpp:28
llvm::CodeGenCoverage::covered
iterator_range< const_covered_iterator > covered() const
Definition: CodeGenCoverage.cpp:41
llvm::CodeGenCoverage::emit
bool emit(StringRef FilePrefix, StringRef BackendName) const
Definition: CodeGenCoverage.cpp:78
llvm::MemoryBuffer
This interface provides simple read-only access to a block of memory, and provides simple methods for...
Definition: MemoryBuffer.h:50
BitVector.h
llvm::BitVector
Definition: BitVector.h:74
llvm::CodeGenCoverage
Definition: CodeGenCoverage.h:20
uint64_t
llvm::CodeGenCoverage::reset
void reset()
Definition: CodeGenCoverage.cpp:111
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:57
llvm::CodeGenCoverage::RuleCoverage
BitVector RuleCoverage
Definition: CodeGenCoverage.h:22
llvm::BitVector::const_set_bits_iterator
const_set_bits_iterator_impl< BitVector > const_set_bits_iterator
Definition: BitVector.h:123
llvm::iterator_range
A range adaptor for a pair of iterators.
Definition: iterator_range.h:30
llvm::const_set_bits_iterator_impl
ForwardIterator for the bits that are set.
Definition: BitVector.h:32