This is an archive of the discontinued LLVM Phabricator instance.

[LSR] Create SCEVExpander earlier, use member isSafeToExpand() (NFC)
ClosedPublic

Authored by nikic on Jul 14 2022, 6:29 AM.

Details

Summary

This is a followup to D129630, which switches LSR to the member isSafeToExpand() variant, and removes the freestanding function.

This is done by creating the SCEVExpander early (already during the analysis phase). Because the SCEVExpander is now available for the whole lifetime of LSRInstance, I've also made it into a member variable, rather than passing it around in even more places.

Diff Detail

Event Timeline

nikic created this revision.Jul 14 2022, 6:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2022, 6:29 AM
nikic requested review of this revision.Jul 14 2022, 6:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2022, 6:29 AM
reames accepted this revision.Jul 14 2022, 8:59 AM

LGTM

This revision is now accepted and ready to land.Jul 14 2022, 8:59 AM
fhahn accepted this revision.Jul 14 2022, 9:01 AM

LGTM, thanks for the cleanup!

This revision was landed with ongoing or failed builds.Jul 15 2022, 12:41 AM
This revision was automatically updated to reflect the committed changes.