[PATCH] D156532: [Pipelines] Perform hoisting prior to GVN

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 12:14:15 PDT 2023


nikic added a comment.

In D156532#4570045 <https://reviews.llvm.org/D156532#4570045>, @dmgreen wrote:

> In D156532#4569747 <https://reviews.llvm.org/D156532#4569747>, @nikic wrote:
>
>> I've added a phase ordering test for quant_4x4 in https://github.com/llvm/llvm-project/commit/b92711931daf45426a23c082c732ddfbf6d02814. Moving the SimplifyCFG run until after LPM2 should avoid this issue, not sure whether that would cause other problems.
>
> Thanks. I guess there are maybe two things going on. The unrolling of loops with conditions creates something this is not easy to deal with in the SLP vectorizer (multiple blocks), and the SLP vectorizer doesn't know how to add runtime alias checks.
>
> I can try moving the simplifycfg run later and see what effect it has. There might also be something that we can do about not unrolling with multiple blocks that are not going to be simplified.

Yeah, fully unrolling a loop with interior (that is, non-exit) control flow is probably significantly less profitable than unrolling without interior control flow, because the latter gives you straight-line code (or at least an extended basic block, if there are multiple exits). That seems like something we should take into account during cost modelling, but currently don't.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156532



More information about the llvm-commits mailing list