[PATCH] D151901: [BOLT] Instrumentation: Add support for MacOS counters

Rafael Auler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 16:52:05 PDT 2023


rafauler added inline comments.


================
Comment at: bolt/include/bolt/Core/MCPlusBuilder.h:1980-1985
+  virtual InstructionListType createGetter(MCContext *Ctx,
+                                           const char *name) const {
+    llvm_unreachable("not implemented");
+    return {};
+  }
+
----------------
Let's avoid publishing this to the target-independent interface. Make it a local helper in AArch64MCPlusBuilder


================
Comment at: bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp:1332
+                                   const char *name) const override {
+    const MCPhysReg TempReg = getIntArgRegister(0);
+    InstructionListType Insts(4);
----------------
nit:  TempReg -> ReturnValReg


================
Comment at: bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp:1336
+    InstructionListType Addr = materializeAddress(Locs, Ctx, TempReg);
+    std::copy(Addr.begin(), Addr.end(), Insts.begin());
+    loadReg(Insts[2], TempReg, false);
----------------
assert on size being 2


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151901



More information about the llvm-commits mailing list