#include "OpGenHelpers.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Regex.h"
#include "llvm/TableGen/Error.h"
usingnamespacellvm;
usingnamespacemlir;
usingnamespacemlir::tblgen;
cl::OptionCategory opDefGenCat("Options for op definition generators");
static cl::opt<std::string> opIncFilter(
"op-include-regex",
cl::desc("Regex of name of op's to include (no filter if empty)"),
cl::cat(opDefGenCat));
static cl::opt<std::string> opExcFilter(
"op-exclude-regex",
cl::desc("Regex of name of op's to exclude (no filter if empty)"),
cl::cat(opDefGenCat));
static cl::opt<unsigned> opShardCount(
"op-shard-count",
cl::desc("The number of shards into which the op classes will be divided"),
cl::cat(opDefGenCat), cl::init(1));
static std::string getOperationName(const Record &def) { … }
std::vector<const Record *>
mlir::tblgen::getRequestedOpDefinitions(const RecordKeeper &recordKeeper) { … }
bool mlir::tblgen::isPythonReserved(StringRef str) { … }
void mlir::tblgen::shardOpDefinitions(
ArrayRef<const llvm::Record *> defs,
SmallVectorImpl<ArrayRef<const llvm::Record *>> &shardedDefs) { … }