Go to the documentation of this file.
12 #include "llvm/Config/llvm-config.h"
27 cl::desc(
"The maximum nesting depth allowed for assembly macros."));
35 assert(!TargetParser &&
"Target parser is already initialized!");
51 return Error(
getTok().getLoc(),
"expected newline");
146 int64_t &IntegerValue) {
166 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
167 dbgs() <<
" " << *
this;
should just be implemented with a CLZ instruction Since there are other e that share this it would be best to implement this in a target independent as zero is the default value for the binary encoder e add r0 add r5 Register operands should be distinct That is
This is an optimization pass for GlobalISel generic memory operations.
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
int64_t getIntVal() const
const AsmToken & getTok() const
Get the current (last) lexed token.
bool parseOptionalToken(AsmToken::TokenKind T)
Attempt to parse and consume token, returning true on success.
const AsmToken & Lex()
Consume the next token from the input stream and return it.
virtual void dump() const
dump - Print to the debug stream.
Target independent representation for an assembler token.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
virtual const AsmToken & Lex()=0
Get the next AsmToken in the stream, possibly handling file inclusion first.
bool TokError(const Twine &Msg, SMRange Range=std::nullopt)
Report an error at the current lexer location.
virtual bool parseExpression(const MCExpr *&Res, SMLoc &EndLoc)=0
Parse an arbitrary expression.
Represents a location in source code.
bool parseIntToken(int64_t &V, const Twine &ErrMsg)
SmallVector< MCPendingError, 0 > PendingErrors
TokenKind getKind() const
An efficient, type-erasing, non-owning reference to a callable.
bool addErrorSuffix(const Twine &Suffix)
bool parseMany(function_ref< bool()> parseOne, bool hasComma=true)
virtual void Initialize(MCAsmParser &Parser)
Initialize the extension for parsing using the given Parser.
void toVector(SmallVectorImpl< char > &Out) const
Append the concatenated string into the given SmallString or SmallVector.
bool check(bool P, const Twine &Msg)
initializer< Ty > init(const Ty &Val)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool Error(SMLoc L, const Twine &Msg, SMRange Range=std::nullopt)
Return an error at the location L, with the message Msg.
StringRef - Represent a constant reference to a string, i.e.
const AsmToken & getTok() const
Get the current AsmToken from the stream.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
const CustomOperand< const MCSubtargetInfo & > Msg[]
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
bool isNot(TokenKind K) const
const char * getPointer() const
MCTargetAsmParser - Generic interface to target specific assembly parsers.
bool parseGNUAttribute(SMLoc L, int64_t &Tag, int64_t &IntegerValue)
Parse a .gnu_attribute.
virtual MCAsmLexer & getLexer()=0
Represents a range in source code.
cl::opt< unsigned > AsmMacroMaxNestingDepth
Base class for the full range of assembler expressions which are needed for parsing.
bool parseToken(AsmToken::TokenKind T, const Twine &Msg="unexpected token")
void setTargetParser(MCTargetAsmParser &P)
bool parseTokenLoc(SMLoc &Loc)