Go to the documentation of this file.
28 #define RECORD(name, altName, print, parse) #name
38 #define RECORD(name, altName, print, parse) #altName
49 for (
unsigned i = 0;
i < names.
size(); ++
i) {
51 map.
insert(std::pair(altNames[
i],
i));
59 return map.lookup(
name) - 1;
69 return OS << Name <<
" = ";
72 template <
typename T, T amd_kernel_code_t::*ptr>
78 template <
typename T, T amd_kernel_code_t::*ptr,
int shift,
int w
idth = 1>
81 const auto Mask = (
static_cast<T>(1) << width) - 1;
88 static const PrintFx Table[] = {
89 #define RECORD(name, altName, print, parse) print
108 for (
int i = 0;
i < Size; ++
i) {
120 Err <<
"expected '='";
126 Err <<
"integer absolute expression expected";
132 template <
typename T, T amd_kernel_code_t::*ptr>
142 template <
typename T, T amd_kernel_code_t::*ptr,
int shift,
int w
idth = 1>
158 static const ParseFx Table[] = {
159 #define RECORD(name, altName, print, parse) parse
172 Err <<
"unexpected amd_kernel_code_t field name " <<
ID;
176 return Parser ? Parser(
C, MCParser, Err) :
false;
static ArrayRef< ParseFx > getParserTable()
Generic assembler parser interface, for use by target specific assembly parsers.
This is an optimization pass for GlobalISel generic memory operations.
void(*)(StringRef, const amd_kernel_code_t &, raw_ostream &) PrintFx
void dumpAmdKernelCode(const amd_kernel_code_t *C, raw_ostream &OS, const char *tab)
static bool parseBitField(amd_kernel_code_t &C, MCAsmParser &MCParser, raw_ostream &Err)
const AsmToken & Lex()
Consume the next token from the input stream and return it.
virtual bool parseAbsoluteExpression(int64_t &Res)=0
Parse an expression which must evaluate to an absolute value.
static ArrayRef< StringRef > get_amd_kernel_code_t_FldNames()
constexpr std::underlying_type_t< E > Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
static raw_ostream & printName(raw_ostream &OS, StringRef Name)
bool(*)(amd_kernel_code_t &, MCAsmParser &MCParser, raw_ostream &Err) ParseFx
(vector float) vec_cmpeq(*A, *B) C
Clang compiles this i1 i64 store i64 i64 store i64 i64 store i64 i64 store i64 align Which gets codegen d xmm0 movaps rbp movaps rbp movaps rbp movaps rbp rbp rbp rbp rbp It would be better to have movq s of instead of the movaps s LLVM produces ret int
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
static StringMap< int > createIndexMap(const ArrayRef< StringRef > &names, const ArrayRef< StringRef > &altNames)
static ArrayRef< PrintFx > getPrinterTable()
This class implements an extremely fast bulk output stream that can only output to a stream.
the resulting code requires compare and branches when and if the revised code is with conditional branches instead of More there is a byte word extend before each where there should be only and the condition codes are not remembered when the same two values are compared twice More LSR enhancements i8 and i32 load store addressing modes are identical int int c
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
static void printBitField(StringRef Name, const amd_kernel_code_t &c, raw_ostream &OS)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
StringRef - Represent a constant reference to a string, i.e.
Memory true print Memory SSA Printer
static void printField(StringRef Name, const amd_kernel_code_t &C, raw_ostream &OS)
AMD Kernel Code Object (amd_kernel_code_t).
static ArrayRef< StringRef > get_amd_kernel_code_t_FldAltNames()
void printAmdKernelCodeField(const amd_kernel_code_t &C, int FldIndex, raw_ostream &OS)
bool isNot(AsmToken::TokenKind K) const
Check if the current token has kind K.
static bool expectAbsExpression(MCAsmParser &MCParser, int64_t &Value, raw_ostream &Err)
virtual MCAsmLexer & getLexer()=0
size_t size() const
size - Get the array size.
static bool parseField(amd_kernel_code_t &C, MCAsmParser &MCParser, raw_ostream &Err)
http eax xorl edx cl sete al setne dl sall eax sall edx But that requires good bit subreg support this might be better It s an extra shift
static StringRef get_amd_kernel_code_t_FieldName(int index)
ArrayRef(const T &OneElt) -> ArrayRef< T >
static int get_amd_kernel_code_t_FieldIndex(StringRef name)
LLVM Value Representation.
bool parseAmdKernelCodeField(StringRef ID, MCAsmParser &Parser, amd_kernel_code_t &C, raw_ostream &Err)