[llvm] [bolt][aarch64] simplify rodata/literal load for X86 & AArch64 (PR #165723)

YongKang Zhu via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 5 09:13:27 PST 2025


================
@@ -1477,6 +1477,24 @@ class X86MCPlusBuilder : public MCPlusBuilder {
     return true;
   }
 
+  InstructionListType materializeConstant(const MCInst &Inst,
+                                          StringRef ConstantData,
+                                          uint64_t Offset) const override {
+    InstructionListType Instrs;
+    MCInst InstCopy = Inst;
+
+    if (!replaceMemOperandWithImm(InstCopy, ConstantData, Offset))
+      return InstructionListType{};
----------------
yozhu wrote:

nit: `return Instrs`

https://github.com/llvm/llvm-project/pull/165723


More information about the llvm-commits mailing list