[PATCH] D64125: [RISCV] Support @llvm.readcyclecounter() Intrinsic

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 5 01:49:36 PDT 2019


asb accepted this revision.
asb added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: MaskRay.

LGTM, thanks!



================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:183
 
+  // READCYCLECOUNTER will use RDCYCLE[H]
+  setOperationAction(ISD::READCYCLECOUNTER, MVT::i64,
----------------
asb wrote:
> Nit: should have full stop at end of comment
New nit: reviewing this again, does this comment actually add value?

I'd actually consider a comment like:
`// TODO: On M-mode only targets, the cycle[h] CSR may not be present. Unfortunately this can't be determined just from the ISA naming string."


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64125





More information about the llvm-commits mailing list