[PATCH] D113392: [LV] NFC: Remove LoopVectorizationCostModel::blockNeedsPredication.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 10 02:11:34 PST 2021


fhahn added a comment.

Having a dedicated function to check whether a block needs predication for any reason still seems convenient IMO from looking at the updates, if the only place we need to make the distinction for now is `isPredicateInst`. Perhaps it would be better to change the name to `blockNeedsPredicationForAnyReason` or  something like that so there's a clearer distinction between `blockNeedsPredication` in `Legal`?

With a proper doc-comment this would make the code slightly more explicit and it would also be easier to find all places that check for A and B. It would also be easier to update all occurrences, if the condition for A and B needs adjusting.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113392



More information about the llvm-commits mailing list