Skip to content

Commit

Permalink
DependenceAnalysis.h - reduce AliasAnalysis.h include to forward decl…
Browse files Browse the repository at this point in the history
…aration. NFC.

This requires the replacement of legacy class AliasAnalysis usages with AAResults (which it typedefs to anyhow)
  • Loading branch information
RKSimon committed Jun 7, 2020
1 parent b296fd2 commit 3642d38
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions llvm/include/llvm/Analysis/DependenceAnalysis.h
Expand Up @@ -40,12 +40,13 @@
#define LLVM_ANALYSIS_DEPENDENCEANALYSIS_H

#include "llvm/ADT/SmallBitVector.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Pass.h"

namespace llvm {
template <typename T> class ArrayRef;
class AAResults;
template <typename T> class ArrayRef;
class Loop;
class LoopInfo;
class ScalarEvolution;
Expand Down Expand Up @@ -270,7 +271,7 @@ template <typename T> class ArrayRef;
///
class DependenceInfo {
public:
DependenceInfo(Function *F, AliasAnalysis *AA, ScalarEvolution *SE,
DependenceInfo(Function *F, AAResults *AA, ScalarEvolution *SE,
LoopInfo *LI)
: AA(AA), SE(SE), LI(LI), F(F) {}

Expand Down Expand Up @@ -333,7 +334,7 @@ template <typename T> class ArrayRef;
Function *getFunction() const { return F; }

private:
AliasAnalysis *AA;
AAResults *AA;
ScalarEvolution *SE;
LoopInfo *LI;
Function *F;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Analysis/DependenceAnalysis.cpp
Expand Up @@ -647,7 +647,7 @@ void Dependence::dump(raw_ostream &OS) const {
// tbaa, non-overlapping regions etc), then it is known there is no dependecy.
// Otherwise the underlying objects are checked to see if they point to
// different identifiable objects.
static AliasResult underlyingObjectsAlias(AliasAnalysis *AA,
static AliasResult underlyingObjectsAlias(AAResults *AA,
const DataLayout &DL,
const MemoryLocation &LocA,
const MemoryLocation &LocB) {
Expand Down
1 change: 1 addition & 0 deletions llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp
Expand Up @@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//

#include "llvm/Transforms/Utils/CodeMoverUtils.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/DependenceAnalysis.h"
#include "llvm/Analysis/LoopInfo.h"
Expand Down

0 comments on commit 3642d38

Please sign in to comment.