#include "Common/CodeGenDAGPatterns.h"
#include "Common/CodeGenInstruction.h"
#include "Common/CodeGenRegisters.h"
#include "Common/CodeGenTarget.h"
#include "Common/InfoByHwMode.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/TableGen/Error.h"
#include "llvm/TableGen/Record.h"
#include "llvm/TableGen/TableGenBackend.h"
#include <set>
#include <utility>
usingnamespacellvm;
namespace {
struct InstructionMemo { … };
}
namespace {
class ImmPredicateSet { … };
}
namespace {
struct OperandsSignature { … };
}
namespace {
class FastISelMap { … };
}
static std::string getOpcodeName(const Record *Op,
const CodeGenDAGPatterns &CGP) { … }
static std::string getLegalCName(std::string OpName) { … }
FastISelMap::FastISelMap(StringRef instns) : … { … }
static std::string PhyRegForNode(TreePatternNode &Op,
const CodeGenTarget &Target) { … }
void FastISelMap::collectPatterns(const CodeGenDAGPatterns &CGP) { … }
void FastISelMap::printImmediatePredicates(raw_ostream &OS) { … }
void FastISelMap::emitInstructionCode(raw_ostream &OS,
const OperandsSignature &Operands,
const PredMap &PM,
const std::string &RetVTName) { … }
void FastISelMap::printFunctionDefinitions(raw_ostream &OS) { … }
static void EmitFastISel(const RecordKeeper &RK, raw_ostream &OS) { … }
static TableGen::Emitter::Opt X("gen-fast-isel", EmitFastISel,
"Generate a \"fast\" instruction selector");