[PATCH] D92293: [RISCVAsmParser] Allow a SymbolRef operand to be a complex expression

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 10:34:11 PST 2020


jrtc27 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;
----------------
MaskRay wrote:
> 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.
Then we might as well? It's lying around in the target streamer's streamer (maybe elsewhere is more accessible too, this area of the MC layer gets a bit twisty-turny-maze).


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