This is an archive of the discontinued LLVM Phabricator instance.

[LoopVersion] Unify SCEVChecks and alias check handling (NFC).
ClosedPublic

Authored by fhahn on Jul 23 2020, 7:25 AM.

Details

Summary

This is an initial cleanup of the way LoopVersioning interacts with LAA.

Currently LoopVersioning has 2 ways of initializing things:

  1. Passing LAI and passing UseLAIChecks = true
  2. Passing UseLAIChecks = false, followed by calling setSCEVChecks and setAliasChecks.

Both ways of initializing lead to the same result and the duplication
seems more complicated than necessary.

This patch removes the UseLAIChecks flag from the constructor and the
setSCEVChecks & setAliasChecks helpers and move initialization
exclusively to the constructor.

This simplifies things, by providing a single way to initialize
LoopVersioning and reducing duplication.

Diff Detail

Event Timeline

fhahn created this revision.Jul 23 2020, 7:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 23 2020, 7:25 AM

I'm not really familiar with code in question, but ignoring
the question of whether or not this is moving in the right
direction, the code change itself looks like a cleanup to me.

fhahn updated this revision to Diff 292180.Sep 16 2020, 4:17 AM

Rebase & ping

Meinersbur accepted this revision.Oct 14 2020, 2:15 PM
Meinersbur added a subscriber: Meinersbur.

As @lebedev.ri mentioned, the code looks good, and a pure refactoring. LGTM.

This revision is now accepted and ready to land.Oct 14 2020, 2:15 PM
lebedev.ri accepted this revision.Oct 14 2020, 11:25 PM
This revision was landed with ongoing or failed builds.Oct 15 2020, 2:02 PM
This revision was automatically updated to reflect the committed changes.
fhahn added a comment.Oct 15 2020, 2:03 PM

Thank you very much for taking a look!