This is an archive of the discontinued LLVM Phabricator instance.

[SCEV] Always sort AddRecExprs from different loops by dominance
ClosedPublic

Authored by mkazantsev on May 15 2017, 11:45 PM.

Details

Summary

Sorting of AddRecExprs by loop nesting does not make sense since we only invoke the CompareSCEVComplexity for AddRecExprs that are used by one SCEV. This guarantees that there is always a dominance relationship between them. This patch removes the sorting by nesting which is a dead code in current usage of this function.

Diff Detail

Repository
rL LLVM

Event Timeline

mkazantsev created this revision.May 15 2017, 11:45 PM
mkazantsev updated this revision to Diff 99115.May 16 2017, 1:33 AM
sanjoy accepted this revision.May 16 2017, 10:42 AM

lgtm!

lib/Analysis/ScalarEvolution.cpp
643 ↗(On Diff #99115)

s/recurrencies/recurrences/

This revision is now accepted and ready to land.May 16 2017, 10:42 AM
This revision was automatically updated to reflect the committed changes.