[PATCH] D123264: [RISCV] Pre-RA expand pseudos pass

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 07:20:46 PDT 2022


luismarques marked an inline comment as done.
luismarques added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp:454
+  Symbol.setTargetFlags(FlagsHi);
+  MCSymbol *AUIPCSymbol = MF->getContext().createTempSymbol("PCRelHi");
+
----------------
luismarques wrote:
> StephenFan wrote:
> > Using `createTempSymbol` to create a symbol will cause the object code's string table to have an empty name for the symbol. Maybe you could use the `MF.getPICBaseSymbol()` function to create the PIC base symbol. It can create the function local symbol by using the unique function id.
> I'll look into this more carefully later. I thought (but didn't verify) that `createNamedTempSymbol` would emit the symbol like you wanted, even if that symbol wasn't then function-local. But then I looked at object files built with the original patch and they seemed already have the `.LPCRelHi0` etc in `.symtab`. So I'm not sure I follow your point. As I said, I need to look into this more carefully.
> Using `createTempSymbol` to create a symbol will cause the object code's string table to have an empty name for the symbol.

That doesn't seem to be the case.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123264/new/

https://reviews.llvm.org/D123264



More information about the llvm-commits mailing list