[PATCH] D136861: [IR] Add LLVM IR support for target("aarch64.svcount") type.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 23 07:55:46 PST 2023


nikic added inline comments.


================
Comment at: llvm/include/llvm/IR/Type.h:216
+    return getTypeID() == ScalableVectorTyID || isScalableTargetExtTy();
+  }
+
----------------
sdesmalen wrote:
> nikic wrote:
> > It doesn't look like these new methods are actually used?
> They are used in the patches that follow it (D143642 and D136862). I thought it made sense to add them to this patch, given that this patch adds the concept of //scalable// target extension types (with svcount being an instantiation of that). I'm happy to move the interfaces to the other patches if that has the preference.
I think it would be better to introduce them later, mainly because I'm not sure we really need them. I think checking `isa<ScalabelVectorType>` is an anti-pattern in most (but maybe not all) cases.

E.g. for the SCEV change I put up D144624 as an alternative which works on TypeSize only. I think something like this can usually be done (places that have to guard against scalable vectors are generally places that query TypeSize...)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136861



More information about the llvm-commits mailing list