This is an archive of the discontinued LLVM Phabricator instance.

[SCEV][NFC] Share value cache between SCEVs in GroupByComplexity
ClosedPublic

Authored by mkazantsev on Nov 29 2017, 4:13 AM.

Details

Summary

Current implementation of compareSCEVComplexity is being unreasonable with SCEVUnknowns:
every time it sees one, it creates a new value cache and tries to prove equality of two values using it.
This cache reallocates and gets lost from SCEV to SCEV.

This patch changes this behavior: now we create one cache for all values and shares it between SCEVs.

Diff Detail

Repository
rL LLVM

Event Timeline

mkazantsev created this revision.Nov 29 2017, 4:13 AM
sanjoy accepted this revision.Dec 5 2017, 8:44 PM

lgtm

This revision is now accepted and ready to land.Dec 5 2017, 8:44 PM
This revision was automatically updated to reflect the committed changes.