[PATCH] D96931: [LTO] Discard non-prevailing defined symbols in module-level assembly

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 8 15:22:22 PST 2021


ychen marked 5 inline comments as done.
ychen added inline comments.


================
Comment at: llvm/include/llvm/MC/MCRegisterInfo.h:170
 
-  unsigned L2DwarfRegsSize;
-  unsigned EHL2DwarfRegsSize;
-  unsigned Dwarf2LRegsSize;
-  unsigned EHDwarf2LRegsSize;
-  const DwarfLLVMRegPair *L2DwarfRegs;        // LLVM to Dwarf regs mapping
-  const DwarfLLVMRegPair *EHL2DwarfRegs;      // LLVM to Dwarf regs mapping EH
-  const DwarfLLVMRegPair *Dwarf2LRegs;        // Dwarf to LLVM regs mapping
-  const DwarfLLVMRegPair *EHDwarf2LRegs;      // Dwarf to LLVM regs mapping EH
+  unsigned L2DwarfRegsSize = 0;
+  unsigned EHL2DwarfRegsSize = 0;
----------------
This is to avoid creating a real `MCRegisterInfo` in `getTargetAsmSeparator` below.


================
Comment at: llvm/lib/LTO/LTO.cpp:733
+  std::string Sep = getTargetAsmSeparator(M);
+  std::string PrefixPat = "(^|[[:blank:]]+)";
+  std::string SuffixPat = "($|" + Sep + ")";
----------------
MaskRay wrote:
> StringRef
I could not do `PrefixPat + P` below with this. `PrefixPat.str() + P` also works but it seems easier just declaring it string?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96931



More information about the llvm-commits mailing list