This is an archive of the discontinued LLVM Phabricator instance.

[NaryReassociate] speeds up candidate searching
ClosedPublic

Authored by jingyue on Apr 16 2015, 11:22 AM.

Details

Summary

This fixes a left-over efficiency issue in D8950.

As Andrew and Daniel suggested, we can store the candidates in a stack
and pop the top element when it does not dominate the current
instruction. This reduces the worst-case time complexity to O(n).

Diff Detail

Event Timeline

jingyue updated this revision to Diff 23870.Apr 16 2015, 11:22 AM
jingyue retitled this revision from to [NaryReassociate] speeds up candidate searching.
jingyue updated this object.
jingyue edited the test plan for this revision. (Show Details)
jingyue added reviewers: atrick, broune, dberlin, meheff.
jingyue added subscribers: sanjoy, Unknown Object (MLST).
atrick accepted this revision.Apr 16 2015, 11:33 AM
atrick edited edge metadata.

Nice!

This revision is now accepted and ready to land.Apr 16 2015, 11:33 AM
jingyue closed this revision.Apr 16 2015, 11:45 AM
dberlin edited edge metadata.Apr 16 2015, 12:06 PM

Great job. LGTM