[PATCH] D66338: [CGP] Drop llvm.assume calls

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 16 12:19:10 PDT 2019


aemerson added a comment.

In D66338#1633517 <https://reviews.llvm.org/D66338#1633517>, @hfinkel wrote:

> In D66338#1633098 <https://reviews.llvm.org/D66338#1633098>, @xbolva00 wrote:
>
> > (As an alternative, this can be fixed in the phrase when llvm.assume is dropped in backend.. but not sure if we have "backend" version of RecursivelyDeleteTriviallyDeadInstructions)
>
>
> When I originally looked at this, dropping the assume during SelectionDAG construction seemed sufficient to also drop side-effect-free instructions used only by the assume. Maybe this SDAG logic should be extended to drop readnone functions in the same way?
>
> However, what I don't know is: In the context of GlobalISel (and maybe also FastISel) we really need to actively deal with this in some other way (e.g., like this)? Thoughts?


For GlobalISel side effect free dead instructions will be deleted at various points in the pipeline. However, calls won't be. I don't think clang should be allowing this at all though. It should be perfectly legal to drop an llvm.assume without having to deal with dead defs.


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

https://reviews.llvm.org/D66338





More information about the llvm-commits mailing list