[PATCH] D86120: [NFC][llvm] Make the contructors of `ElementCount` private.

Francesco Petrogalli via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 08:58:20 PDT 2020


fpetrogalli added inline comments.


================
Comment at: llvm/lib/IR/ConstantFold.cpp:922
   unsigned MaskNumElts = Mask.size();
-  ElementCount MaskEltCount = {MaskNumElts, isa<ScalableVectorType>(V1VTy)};
+  ElementCount MaskEltCount =
+      ElementCount::get(MaskNumElts, isa<ScalableVectorType>(V1VTy));
----------------
david-arm wrote:
> Just a thought for code like this - since we're now calling ElementCount::get that means we can now use the 'auto' keyword in such places. This might help reduce the character count and help to fit on one line?
Good point! Done.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86120



More information about the llvm-commits mailing list