[PATCH] D97504: [llvm-exegesis] Disable the LBR check on AMD

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 2 12:12:13 PST 2021


oontvoo added inline comments.


================
Comment at: llvm/tools/llvm-exegesis/lib/X86/Target.cpp:735
+    // be confuse and think the AMD machine actually has LBR support.
+    if (state.getSubtargetInfo().getCPU().compare_lower("amd") != 0)
+      // If the kernel supports it, the hardware still may not have it.
----------------
ondrasej wrote:
> mgorny wrote:
> > I wonder if it wouldn't be better to explicitly check for Intel here, or maybe even for Intel family new enough for LBR. I'm going to guess that Cyrix/VIA processors don't have it either.
> +1. The perf counters are vendor specific (in particular, we have some Intel-specific magic numbers in the code), so it would make more sense to allow only Intel rather than reject only AMD. We can allow more architectures as soon as we can verify the LBR support on them.
Good point. 
So ideally we want to say abort if we see anything that's not Intel, but looking at `llvm::Triple::VendorType`, I don't see `Intel` listed as a vendor.
A bit surprised... Does anyone know why?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97504



More information about the llvm-commits mailing list