[PATCH] D108114: [LoopPeel] Peel if it turns invariant loads dereferenceable.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 27 14:03:09 PDT 2021


reames added a comment.

In D108114#2955727 <https://reviews.llvm.org/D108114#2955727>, @fhahn wrote:

> In D108114#2951160 <https://reviews.llvm.org/D108114#2951160>, @reames wrote:
>
>> 
>
> I realize that the problem description missed a key bit of information: the motivating case has vectors passed through pointers, not references so deref is not guaranteed unfortunately.

Shouldn't points to std::vectors still be deref_or_null?  If so, we should be able to prove non-null here.

> AFAIK we do not iterate loop passes to a fixed point until no changes are made, I think we only execute them for each loop once (and new loops). Let me take a look and see on how re-composing the existing passes would look like.

Honestly, I feel like we really should do either a) bounded iteration, or b) unroll the bounded iteration by hand a small handful of times.  The whole premise of the new PM was to allow conditional pass execution, this is a case where doing so is clearly "worth it".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108114



More information about the llvm-commits mailing list