[PATCH] D92293: [RISCVAsmParser] Allow a SymbolRef operand to be a complex expression
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 30 10:31:27 PST 2020
MaskRay marked an inline comment as done.
MaskRay added inline comments.
================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:1862
+ MCFixup Fixup;
+ if (Expr->evaluateAsRelocatable(Res, nullptr, &Fixup))
+ return Res.getRefKind() == RISCVMCExpr::VK_RISCV_None;
----------------
jrtc27 wrote:
> Should we not be passing the assembler pointer? I don't remember when exactly RISC-V needs it, but RISC-V is pickier due to supporting linker relaxation.
We don't need it here. Passing the pointer can enable more aggressive constant folding, but this appears to be fine for now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92293/new/
https://reviews.llvm.org/D92293
More information about the llvm-commits
mailing list