This is an archive of the discontinued LLVM Phabricator instance.

[LoopRerolling] Be more forgiving with instruction order.
ClosedPublic

Authored by jmolloy on Feb 11 2015, 7:28 AM.

Details

Reviewers
hfinkel
Summary

We can't solve the full subgraph isomorphism problem. But we can
allow obvious cases, where for example two instructions of different
types are out of order. Due to them having different types/opcodes,
there is no ambiguity.

Diff Detail

Repository
rL LLVM

Event Timeline

jmolloy updated this revision to Diff 19755.Feb 11 2015, 7:28 AM
jmolloy retitled this revision from to [LoopRerolling] Be more forgiving with instruction order..
jmolloy updated this object.
jmolloy edited the test plan for this revision. (Show Details)
jmolloy added a reviewer: hfinkel.
jmolloy set the repository for this revision to rL LLVM.
jmolloy added a subscriber: Unknown Object (MLST).
hfinkel added inline comments.Feb 11 2015, 1:34 PM
lib/Transforms/Scalar/LoopRerollPass.cpp
1080

Lines here are too long?

1089

This is potentially N^2 in the size of Uses? We should probably cut this off at some point.

jmolloy updated this revision to Diff 19812.Feb 12 2015, 2:02 AM

Hi Hal,

Updated. Good idea about a cutoff, we don't want this to become quadratic.

Cheers,

James

hfinkel accepted this revision.Feb 12 2015, 5:29 AM
hfinkel edited edge metadata.

LGTM.

lib/Transforms/Scalar/LoopRerollPass.cpp
52

Please make this default 400, not 4. A search threshold like 4 is likely to cause cases where seemingly innocuous source changes drastically change code performance. We just want to limit the worst case.

This revision is now accepted and ready to land.Feb 12 2015, 5:29 AM
jmolloy closed this revision.Feb 12 2015, 7:56 AM

Thanks Hal, landed with your change in r228931.