[llvm] 3642d38 - DependenceAnalysis.h - reduce AliasAnalysis.h include to forward declaration. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 7 04:49:01 PDT 2020
Author: Simon Pilgrim
Date: 2020-06-07T12:47:37+01:00
New Revision: 3642d38823ee9b6d03c9e20f260345e4ddf6f999
URL: https://github.com/llvm/llvm-project/commit/3642d38823ee9b6d03c9e20f260345e4ddf6f999
DIFF: https://github.com/llvm/llvm-project/commit/3642d38823ee9b6d03c9e20f260345e4ddf6f999.diff
LOG: 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)
Added:
Modified:
llvm/include/llvm/Analysis/DependenceAnalysis.h
llvm/lib/Analysis/DependenceAnalysis.cpp
llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/DependenceAnalysis.h b/llvm/include/llvm/Analysis/DependenceAnalysis.h
index ba1153dbba28..305c9b1d88f2 100644
--- a/llvm/include/llvm/Analysis/DependenceAnalysis.h
+++ b/llvm/include/llvm/Analysis/DependenceAnalysis.h
@@ -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;
diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp
index 96c7bc7365a2..bcfeef7fb8ab 100644
--- a/llvm/lib/Analysis/DependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/DependenceAnalysis.cpp
@@ -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
//
diff erent identifiable objects.
-static AliasResult underlyingObjectsAlias(AliasAnalysis *AA,
+static AliasResult underlyingObjectsAlias(AAResults *AA,
const DataLayout &DL,
const MemoryLocation &LocA,
const MemoryLocation &LocB) {
diff --git a/llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp b/llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp
index ceeb4071ab7d..27e140d81a98 100644
--- a/llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp
+++ b/llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp
@@ -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"
More information about the llvm-commits
mailing list