#include "Common/GlobalISel/PatternParser.h"
#include "Basic/CodeGenIntrinsics.h"
#include "Common/CodeGenTarget.h"
#include "Common/GlobalISel/CombinerUtils.h"
#include "Common/GlobalISel/Patterns.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/SaveAndRestore.h"
#include "llvm/TableGen/Error.h"
#include "llvm/TableGen/Record.h"
namespace llvm {
namespace gi {
static constexpr StringLiteral MIFlagsEnumClassName = …;
namespace {
class PrettyStackTraceParse : public PrettyStackTraceEntry { … };
}
bool PatternParser::parsePatternList(
const DagInit &List,
function_ref<bool(std::unique_ptr<Pattern>)> ParseAction,
StringRef Operator, StringRef AnonPatNamePrefix) { … }
static const CodeGenInstruction &
getInstrForIntrinsic(const CodeGenTarget &CGT, const CodeGenIntrinsic *I) { … }
static const CodeGenIntrinsic *getCodeGenIntrinsic(Record *R) { … }
std::unique_ptr<Pattern>
PatternParser::parseInstructionPattern(const Init &Arg, StringRef Name) { … }
std::unique_ptr<Pattern>
PatternParser::parseWipMatchOpcodeMatcher(const Init &Arg, StringRef Name) { … }
bool PatternParser::parseInstructionPatternOperand(InstructionPattern &IP,
const Init *OpInit,
const StringInit *OpName) { … }
bool PatternParser::parseInstructionPatternMIFlags(InstructionPattern &IP,
const DagInit *Op) { … }
std::unique_ptr<PatFrag> PatternParser::parsePatFragImpl(const Record *Def) { … }
bool PatternParser::parsePatFragParamList(
const DagInit &OpsList,
function_ref<bool(StringRef, unsigned)> ParseAction) { … }
const PatFrag *PatternParser::parsePatFrag(const Record *Def) { … }
}
}