This is an archive of the discontinued LLVM Phabricator instance.

[SCEV][NFC] Sink initialization of SymbolicMaxNotTaken from ExitLimit constructor to its callers
ClosedPublic

Authored by mkazantsev on Dec 6 2022, 1:25 AM.

Details

Summary

Preserves current behavior (always select Exact if known, otherwise select Constant Max).
This is the final preparation step before letting each particular computation way to decide
how exactly it should be computed. Functional improvement is coming shortly as follow-up.

Diff Detail

Event Timeline

mkazantsev created this revision.Dec 6 2022, 1:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2022, 1:25 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
mkazantsev requested review of this revision.Dec 6 2022, 1:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2022, 1:25 AM
nikic accepted this revision.Dec 6 2022, 1:38 AM

LGTM

llvm/include/llvm/Analysis/ScalarEvolution.h
1345

Stray bool in the param name.

This revision is now accepted and ready to land.Dec 6 2022, 1:38 AM
nikic added a comment.Dec 6 2022, 1:41 AM

After this patch, can be you please update BECountUsers handling to also cover SymbolicMaxNotTaken? I think it's still fine at this point, but when you actually start using it, this may lead to invalidation issues.

fhahn accepted this revision.Dec 6 2022, 2:08 AM

LGTM, thanks!

mkazantsev added inline comments.Dec 7 2022, 12:05 AM
llvm/include/llvm/Analysis/ScalarEvolution.h
1345

Oops :)

This revision was landed with ongoing or failed builds.Dec 7 2022, 12:33 AM
This revision was automatically updated to reflect the committed changes.