[PATCH] D120379: [BOLT] Support PC-relative relocations with addends

Maksim Panchenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 23 15:43:20 PST 2022


maksfb added inline comments.


================
Comment at: bolt/lib/Core/BinaryFunction.cpp:1401
+
+          const MCExpr *Expr = MCSymbolRefExpr::create(
+              Relocation.Symbol, MCSymbolRefExpr::VK_None, *BC.Ctx);
----------------
yota9 wrote:
> Maybe move this code to smth like replaceMemOperandWithSymbolRef, that will use setOperandToSymbolRef ?
That's a reasonable suggestion. However, I'm in the process of refactoring the code to use `MCSymbolizer` that will render such effort wasteful. The new code will not be replacing the operand but generating the expression in-place.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120379



More information about the llvm-commits mailing list