This is an archive of the discontinued LLVM Phabricator instance.

Reapply [LSR] Create fewer redundant instructions.
ClosedPublic

Authored by gberry on Mar 25 2016, 1:06 PM.

Details

Summary

Fix LSRInstance::HoistInsertPosition() to check the original insert
position block first for a canonical insertion point that is dominated
by all inputs. This leads to SCEV being able to reuse more instructions
since it currently tracks the instructions it creates for reuse by
keeping a table of <Value, insert point> pairs.

Originally reviewed in http://reviews.llvm.org/D18001

Diff Detail

Repository
rL LLVM

Event Timeline

gberry updated this revision to Diff 51677.Mar 25 2016, 1:06 PM
gberry retitled this revision from to Reapply [LSR] Create fewer redundant instructions..
gberry updated this object.
gberry added a reviewer: atrick.
gberry added subscribers: mcrosier, mzolotukhin, llvm-commits.
qcolombet accepted this revision.Mar 29 2016, 10:30 AM
qcolombet edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Mar 29 2016, 10:30 AM

Thanks Quentin, but this patch exposes what I believe is a bug in the interaction between LSR and SCEV. I'm still in the process of resolving that issue.
If you're interested, the relevant email thread on llvm-dev has the Subject line "LSR/SCEV problem/question"

This revision was automatically updated to reflect the committed changes.