[PATCH] D85794: [WIP][llvm][LV] Replace `unsigned VF` with `ElementCount VF` [NFCI]

Francesco Petrogalli via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 14:30:21 PDT 2020


fpetrogalli updated this revision to Diff 286149.
fpetrogalli marked 27 inline comments as done.
fpetrogalli added a subscriber: david-arm.
fpetrogalli added a comment.

Thank you again for the review. In the last update I have:

1. Removed the methods `getScalar` and `getZero` of

`ElementCount`. The constructor is not invoked directly when needed. I
agree with @ctetreau that ideally we should hide all constructor of
`ElementCount` in terms of using static method `getFixed` and
`getScalable`, but I would like to do this in a separate
patch. perhapd, this could be done as a follow up patch to the changes
that @david-arm is implementing in making the members `ElementCount`
private (see D86065 <https://reviews.llvm.org/D86065>).

2. I have added all the missing assertions. Thank you for pointing them out, @ctetreau.

3. I have converted some of the `FixedVectorType::get` into

`VectorType::get`. To guarantee that the code is still an NFC, I have
added an assert that checks that the `ElementCount` instance being
sued to construct the vector type is not scalable.

4. I have updated the description of the differential review to

address for these changes.

4. `BestVF` in VPlan is now of type `Optional<ElementCount>` so that

we don't need to construc any `ElementCount` instance with `Min = 0`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85794

Files:
  llvm/include/llvm/Analysis/TargetTransformInfo.h
  llvm/include/llvm/Analysis/VectorUtils.h
  llvm/include/llvm/IR/DiagnosticInfo.h
  llvm/include/llvm/Support/TypeSize.h
  llvm/lib/IR/DiagnosticInfo.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/VPlan.cpp
  llvm/lib/Transforms/Vectorize/VPlan.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85794.286149.patch
Type: text/x-patch
Size: 106328 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200817/e4d9b3fa/attachment-0001.bin>


More information about the llvm-commits mailing list