[PATCH] D151025: [llvm-exegesis] Add support for using memory annotations

Aiden Grossman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 16 01:42:28 PDT 2023


aidengrossman added inline comments.


================
Comment at: llvm/tools/llvm-exegesis/lib/Assembler.cpp:70
+#ifdef HAVE_LIBPFM
+    BBF.addInstructions(ET.configurePerfCounter(PERF_EVENT_IOC_RESET));
+#endif // HAVE_LIBPFM
----------------
courbet wrote:
> This might clobber the registers we just set up above.
Yes. I have a TODO listed in https://reviews.llvm.org/D151023 for this function to push the current values of RAX, RDI, and RSI to the stack to save them and then pop them back after the operation. I was planning on doing this as a follow up after this landed once I actually needed to use those registers, but if this is a blocker I can get this fixed before landing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151025



More information about the llvm-commits mailing list