This is an archive of the discontinued LLVM Phabricator instance.

Remove a unnecessary hasLoopInvariantOperands check in loop sink.
ClosedPublic

Authored by trentxintong on Jan 3 2017, 5:26 PM.

Details

Summary

Preheader instruction's operands will always be invariant w.r.t. the loop which its the preheader
for.

Memory aliases are handled in canSinkOrHoistInst.

Diff Detail

Repository
rL LLVM

Event Timeline

trentxintong retitled this revision from to Remove a unnecessary hasLoopInvariantOperands check in loop sink..
trentxintong updated this object.
trentxintong added reviewers: danielcdh, davidxl.
trentxintong added a subscriber: llvm-commits.

Friendly ping.

danielcdh accepted this revision.Jan 5 2017, 8:39 AM
danielcdh edited edge metadata.
This revision is now accepted and ready to land.Jan 5 2017, 8:39 AM
This revision was automatically updated to reflect the committed changes.
sanjoy added a subscriber: sanjoy.Jan 9 2017, 3:45 PM
sanjoy added inline comments.
llvm/trunk/lib/Transforms/Scalar/LoopSink.cpp
286

Did you consider asserting on hasLoopInvariantOperands instead? That kind of checking tends to make things easier to debug.

Thats a good idea.