HomePhabricator

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

Authored by fhahn on Oct 15 2020, 1:50 PM.

Description

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

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.

Reviewed By: Meinersbur, lebedev.ri

Differential Revision: https://reviews.llvm.org/D84406