//=- WholeLoopNestAliasChecks.cpp - Generate Alias check before loop nests  ==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// Optimizations like vectorization can be performed when the loop nests are
// alias free. This pass generates the runtime alias checks before the loop
// covering the iteration space of all the loops in the loop nests.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_SCALAR_WHOLELOOPNESTALIASCHECKS_H
#define LLVM_TRANSFORMS_SCALAR_WHOLELOOPNESTALIASCHECKS_H

#include "llvm/IR/Function.h"
#include "llvm/IR/PassManager.h"

namespace llvm {

/// An optimization pass inserting data prefetches in loops.
class WholeLoopNestAliasChecksPass : public PassInfoMixin<WholeLoopNestAliasChecksPass> {
public:
  WholeLoopNestAliasChecksPass() = default;

  /// Run the pass over the function.
  PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
};

} // end namespace llvm

#endif // LLVM_TRANSFORMS_SCALAR_WHOLELOOPNESTALIASCHECKS_H
