[PATCH] D103435: [PoC][RISCV] Define a symbol flags and a dynamic tag to avoid lazy binding for vector calls.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 19 14:18:48 PST 2022
MaskRay added inline comments.
================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:2210
+ MCAsmParser &Parser = getParser();
+
+ const AsmToken &Tok = Parser.getTok();
----------------
unneeded blank line
================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:2216
+ StringRef SymbolName = Tok.getIdentifier();
+
+ MCSymbol *Sym = getContext().lookupSymbol(SymbolName);
----------------
unneeded blank line
================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:2221
+
+ Parser.Lex(); // Eat the symbol
+
----------------
Delete ` // Eat the symbol` which does not convey more information than the code
================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:2223
+
+ // Shouldn't be any more tokens
+ if (parseToken(AsmToken::EndOfStatement))
----------------
comments are usually full sentences ending with `.`
================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:2225
+ if (parseToken(AsmToken::EndOfStatement))
+ return addErrorSuffix(" in '.variant_cc' directive");
+
----------------
`addErrorSuffix` is generally not useful because the error contains the source line.
================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h:106
void emitDirectiveOptionNoRelax() override;
+ void emitDirectiveVariantCC(MCSymbol *Symbol) override;
};
----------------
If Symbol is non-null, prefer a reference.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103435/new/
https://reviews.llvm.org/D103435
More information about the llvm-commits
mailing list