[PATCH] D12425: [AArch64] Lower READCYCLECOUNTER using MRS PMCCTNR_EL0.

Salvatore Dipietro via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 24 16:04:30 PDT 2022


salvatoredipietro added a comment.
Herald added a subscriber: kristof.beyls.
Herald added a reviewer: apazos.
Herald added projects: LLVM, All.

Hi @ab,
I was checking this code and I believe that it would be better for the readcyclecounter function to use the CNTVCT_EL0 register (Counter-timer Virtual Count register) instead of the PMCCNTR_EL0 (Performance Monitors Cycle Count Register) because the current one is a PMU register which, depending on PMU configuration, it might always return zeroes and it doesn't guaranteed to always be increased.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D12425



More information about the llvm-commits mailing list