[PATCH] D110259: [SVE][Analysis] Tune the cost model according to the tune-cpu attribute

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 23 01:47:27 PDT 2021


sdesmalen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64Subtarget.cpp:359
+  unsigned MaxVScale = 16;
+  // Bail out if we don't have a Function
+  if (!F)
----------------
nit: redundant comment, the code says the same thing, just shorter :)


================
Comment at: llvm/lib/Target/AArch64/AArch64Subtarget.cpp:378
+
+  if (F && F->hasFnAttribute(Attribute::VScaleRange)) {
+    unsigned Arg =
----------------
1. F is already known to be != nullptr.
2. For consistency, can you do the same as above here, get the attribute and then check whether it's valid (as opposed to checking whether the function has the attribute.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110259



More information about the llvm-commits mailing list