Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:28

0001 //== llvm/Support/CodeGenCoverage.h ------------------------------*- C++ -*-==//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 /// \file This file provides rule coverage tracking for tablegen-erated CodeGen.
0009 //===----------------------------------------------------------------------===//
0010 
0011 #ifndef LLVM_SUPPORT_CODEGENCOVERAGE_H
0012 #define LLVM_SUPPORT_CODEGENCOVERAGE_H
0013 
0014 #include "llvm/ADT/BitVector.h"
0015 
0016 namespace llvm {
0017 class MemoryBuffer;
0018 
0019 class CodeGenCoverage {
0020 protected:
0021   BitVector RuleCoverage;
0022 
0023 public:
0024   using const_covered_iterator = BitVector::const_set_bits_iterator;
0025 
0026   CodeGenCoverage();
0027 
0028   void setCovered(uint64_t RuleID);
0029   bool isCovered(uint64_t RuleID) const;
0030   iterator_range<const_covered_iterator> covered() const;
0031 
0032   bool parse(MemoryBuffer &Buffer, StringRef BackendName);
0033   bool emit(StringRef FilePrefix, StringRef BackendName) const;
0034   void reset();
0035 };
0036 } // namespace llvm
0037 
0038 #endif // LLVM_SUPPORT_CODEGENCOVERAGE_H