[PATCH] D145945: [IRBuilder] Add utilities for materializing scalable values

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 08:53:58 PDT 2023


luke added inline comments.


================
Comment at: llvm/include/llvm/IR/IRBuilder.h:898
+  /// at runtime.
+  Value *CreateRuntimeElementCount(Type *DstType, ElementCount EC);
+
----------------
paulwalker-arm wrote:
> I guess this is bike shedding but given IRBuilder has functions like `getInt16()` to return the IR form on a 16-bit integer value, how about just `CreateElementCount` that returns the IR form of ElementCount?
> 
> Not isolated to this patch but in general I dislike the use of `runtime` when naming things we've already named in order to allow for fixed length and scalable vectors.  By which I mean I don't really consider CompileTimeElementCount/TypeSize as something that exists. But then perhaps I'm just being too picky :)
+1, `CreateElementCount` makes sense to me. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145945



More information about the llvm-commits mailing list