DependenceAnalysis.h - reduce AliasAnalysis.h include to forward declaration. NFC.

This requires the replacement of legacy class AliasAnalysis usages with AAResults (which it typedefs to anyhow)
This commit is contained in:
Simon Pilgrim 2020-06-07 12:47:37 +01:00
parent b296fd2024
commit 3642d38823
3 changed files with 7 additions and 5 deletions

View File

@ -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;
@ -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) {}
@ -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;

View File

@ -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) {

View File

@ -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"