Skip to content

Commit

Permalink
[Transforms] Fix some Clang-tidy modernize and Include What You Use w…
Browse files Browse the repository at this point in the history
…arnings; other minor fixes (NFC).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315940 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
EugeneZelenko committed Oct 16, 2017
1 parent aeedd11 commit b35ed0f
Show file tree
Hide file tree
Showing 11 changed files with 310 additions and 151 deletions.
9 changes: 6 additions & 3 deletions include/llvm/Transforms/Scalar/IndVarSimplify.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@
#ifndef LLVM_TRANSFORMS_SCALAR_INDVARSIMPLIFY_H
#define LLVM_TRANSFORMS_SCALAR_INDVARSIMPLIFY_H

#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/LoopAnalysisManager.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Transforms/Scalar/LoopPassManager.h"

namespace llvm {

class Loop;
class LPMUpdater;

class IndVarSimplifyPass : public PassInfoMixin<IndVarSimplifyPass> {
public:
PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM,
LoopStandardAnalysisResults &AR, LPMUpdater &U);
};
}

} // end namespace llvm

#endif // LLVM_TRANSFORMS_SCALAR_INDVARSIMPLIFY_H
3 changes: 3 additions & 0 deletions include/llvm/Transforms/Scalar/LoopDistribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@

namespace llvm {

class Function;

class LoopDistributePass : public PassInfoMixin<LoopDistributePass> {
public:
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
};

} // end namespace llvm

#endif // LLVM_TRANSFORMS_SCALAR_LOOPDISTRIBUTE_H
9 changes: 6 additions & 3 deletions include/llvm/Transforms/Scalar/LoopIdiomRecognize.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===- LoopIdiomRecognize.h - Loop Idiom Recognize Pass -------*- C++ -*-===//
//===- LoopIdiomRecognize.h - Loop Idiom Recognize Pass ---------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
Expand All @@ -16,18 +16,21 @@
#ifndef LLVM_TRANSFORMS_SCALAR_LOOPIDIOMRECOGNIZE_H
#define LLVM_TRANSFORMS_SCALAR_LOOPIDIOMRECOGNIZE_H

#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/LoopAnalysisManager.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Transforms/Scalar/LoopPassManager.h"

namespace llvm {

class Loop;
class LPMUpdater;

/// Performs Loop Idiom Recognize Pass.
class LoopIdiomRecognizePass : public PassInfoMixin<LoopIdiomRecognizePass> {
public:
PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM,
LoopStandardAnalysisResults &AR, LPMUpdater &U);
};

} // end namespace llvm

#endif // LLVM_TRANSFORMS_SCALAR_LOOPIDIOMRECOGNIZE_H
9 changes: 6 additions & 3 deletions include/llvm/Transforms/Scalar/LoopInstSimplify.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===- LoopInstSimplify.h - Loop Inst Simplify Pass -------*- C++ -*-===//
//===- LoopInstSimplify.h - Loop Inst Simplify Pass -------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
Expand All @@ -14,18 +14,21 @@
#ifndef LLVM_TRANSFORMS_SCALAR_LOOPINSTSIMPLIFY_H
#define LLVM_TRANSFORMS_SCALAR_LOOPINSTSIMPLIFY_H

#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/LoopAnalysisManager.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Transforms/Scalar/LoopPassManager.h"

namespace llvm {

class Loop;
class LPMUpdater;

/// Performs Loop Inst Simplify Pass.
class LoopInstSimplifyPass : public PassInfoMixin<LoopInstSimplifyPass> {
public:
PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM,
LoopStandardAnalysisResults &AR, LPMUpdater &U);
};

} // end namespace llvm

#endif // LLVM_TRANSFORMS_SCALAR_LOOPINSTSIMPLIFY_H
10 changes: 7 additions & 3 deletions include/llvm/Transforms/Scalar/LoopLoadElimination.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
//===---- LoopLoadElimination.h ---------------------------------*- C++ -*-===//
//===- LoopLoadElimination.h ------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
/// \file
/// This header defines the LoopLoadEliminationPass object. This pass forwards
/// loaded values around loop backedges to allow their use in subsequent
/// iterations.
///
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_TRANSFORMS_SCALAR_LOOPLOADELIMINATION_H
Expand All @@ -20,11 +21,14 @@

namespace llvm {

class Function;

/// Pass to forward loads in a loop around the backedge to subsequent
/// iterations.
struct LoopLoadEliminationPass : public PassInfoMixin<LoopLoadEliminationPass> {
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
};
}

} // end namespace llvm

#endif // LLVM_TRANSFORMS_SCALAR_LOOPLOADELIMINATION_H
Loading

0 comments on commit b35ed0f

Please sign in to comment.