#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TableGen/Error.h"
#include "llvm/TableGen/Record.h"
#include "llvm/TableGen/TableGenBackend.h"
#include <cassert>
#include <map>
#include <string>
#include <vector>
usingnamespacellvm;
#define DEBUG_TYPE …
namespace {
class ExegesisEmitter { … };
static std::map<llvm::StringRef, unsigned>
collectPfmCounters(const RecordKeeper &Records) { … }
ExegesisEmitter::ExegesisEmitter(const RecordKeeper &RK)
: … { … }
struct ValidationCounterInfo { … };
bool EventNumberLess(const ValidationCounterInfo &LHS,
const ValidationCounterInfo &RHS) { … }
void ExegesisEmitter::emitPfmCountersInfo(const Record &Def,
unsigned &IssueCountersTableOffset,
raw_ostream &OS) const { … }
void ExegesisEmitter::emitPfmCounters(raw_ostream &OS) const { … }
void ExegesisEmitter::emitPfmCountersLookupTable(raw_ostream &OS) const { … }
void ExegesisEmitter::run(raw_ostream &OS) const { … }
}
static TableGen::Emitter::OptClass<ExegesisEmitter>
X("gen-exegesis", "Generate llvm-exegesis tables");