[PATCH] D78298: [LV] Invalidate cost model decisions along with interleave groups.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 08:37:44 PDT 2020


Ayal added inline comments.


================
Comment at: llvm/include/llvm/Analysis/VectorUtils.h:715
+  /// groups were invalidated.
+  bool invalidateGroups() {
     InterleaveGroupMap.clear();
----------------
Ayal wrote:
> Simpler to early-exit at the start by "if (InterleaveGroups.empty()) return false;" and at the end "return true;"?
> 
> Still need to set RequiresScalarEpilogue to false. One would hope RequiresScalarEpilogue would always be false if there are no groups, but that requires another fix: releaseGroup() does not recompute RequiresScalarEpilogue (if it's true and the released group requiresScalarEpilogue); another option would be to set ReleaseScalarEpilogue once at the end, if any surviving group requiresScalarEpilogue.
Actually releaseGroup() does not need to recompute RequiresScalarEpilogue, because the latter is indeed set according to surviving groups only, that are not released later.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78298





More information about the llvm-commits mailing list