summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>2014-10-02 15:32:17 +0000
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>2014-10-02 15:32:17 +0000
commit51d1c74d78913adc409fb0727341d1f7637428bf (patch)
tree1a6967c59fad53cfc1dc265b94cb4eed73fec93a
parentecdf263c070297ca24eeaf892cda8fa843a05889 (diff)
downloadbcm5719-llvm-51d1c74d78913adc409fb0727341d1f7637428bf.tar.gz
bcm5719-llvm-51d1c74d78913adc409fb0727341d1f7637428bf.zip
[Refactor] Rename LoopAnnotator to ScopAnnotator
The LoopAnnotator doesn't annotate only loops any more, thus it is called ScopAnnotator from now on. This also removes unnecessary polly:: namespace tags. llvm-svn: 218878
-rw-r--r--polly/include/polly/CodeGen/IRBuilder.h10
-rw-r--r--polly/include/polly/CodeGen/LoopGenerators.h6
-rw-r--r--polly/lib/CodeGen/IRBuilder.cpp14
-rw-r--r--polly/lib/CodeGen/IslCodeGeneration.cpp6
-rw-r--r--polly/lib/CodeGen/LoopGenerators.cpp2
5 files changed, 19 insertions, 19 deletions
diff --git a/polly/include/polly/CodeGen/IRBuilder.h b/polly/include/polly/CodeGen/IRBuilder.h
index 3c9218f3f3d..fb56d8a1d18 100644
--- a/polly/include/polly/CodeGen/IRBuilder.h
+++ b/polly/include/polly/CodeGen/IRBuilder.h
@@ -39,9 +39,9 @@ class Scop;
/// These alias scopes live in a new alias domain only used in this SCoP.
/// Each base pointer has its own alias scope and is annotated to not
/// alias with any access to different base pointers.
-class LoopAnnotator {
+class ScopAnnotator {
public:
- LoopAnnotator();
+ ScopAnnotator();
/// @brief Build all alias scopes for the given SCoP.
void buildAliasScopes(Scop &S);
@@ -88,7 +88,7 @@ class PollyBuilderInserter
: protected llvm::IRBuilderDefaultInserter<PreserveNames> {
public:
PollyBuilderInserter() : Annotator(0) {}
- PollyBuilderInserter(class LoopAnnotator &A) : Annotator(&A) {}
+ PollyBuilderInserter(class ScopAnnotator &A) : Annotator(&A) {}
protected:
void InsertHelper(llvm::Instruction *I, const llvm::Twine &Name,
@@ -101,7 +101,7 @@ protected:
}
private:
- class LoopAnnotator *Annotator;
+ class ScopAnnotator *Annotator;
};
// TODO: We should not name instructions in NDEBUG builds.
@@ -113,7 +113,7 @@ typedef llvm::IRBuilder<true, llvm::ConstantFolder, IRInserter> PollyIRBuilder;
/// @brief Return an IR builder pointed before the @p BB terminator.
static inline PollyIRBuilder createPollyIRBuilder(llvm::BasicBlock *BB,
- LoopAnnotator &LA) {
+ ScopAnnotator &LA) {
PollyIRBuilder Builder(BB->getContext(), llvm::ConstantFolder(),
polly::IRInserter(LA));
Builder.SetInsertPoint(BB->getTerminator());
diff --git a/polly/include/polly/CodeGen/LoopGenerators.h b/polly/include/polly/CodeGen/LoopGenerators.h
index 6f766e4d88c..9786678fedd 100644
--- a/polly/include/polly/CodeGen/LoopGenerators.h
+++ b/polly/include/polly/CodeGen/LoopGenerators.h
@@ -40,8 +40,8 @@ using namespace llvm;
/// @param DT The dominator tree we need to update
/// @param ExitBlock The block the loop will exit to.
/// @param Predicate The predicate used to generate the upper loop bound.
-/// @param Annotator This function can (optionally) take a LoopAnnotator which
-/// tracks the loop structure.
+/// @param Annotator This function can (optionally) take a ScopAnnotator which
+/// annotates loops and alias information in the SCoP.
/// @param Parallel If this loop should be marked parallel in the Annotator.
/// @param UseGuard Create a guard in front of the header to check if the
/// loop is executed at least once, otherwise just assume it.
@@ -51,7 +51,7 @@ Value *createLoop(Value *LowerBound, Value *UpperBound, Value *Stride,
PollyIRBuilder &Builder, Pass *P, LoopInfo &LI,
DominatorTree &DT, BasicBlock *&ExitBlock,
ICmpInst::Predicate Predicate,
- LoopAnnotator *Annotator = NULL, bool Parallel = false,
+ ScopAnnotator *Annotator = NULL, bool Parallel = false,
bool UseGuard = true);
class OMPGenerator {
diff --git a/polly/lib/CodeGen/IRBuilder.cpp b/polly/lib/CodeGen/IRBuilder.cpp
index d01dca0df0a..b7e03decf3f 100644
--- a/polly/lib/CodeGen/IRBuilder.cpp
+++ b/polly/lib/CodeGen/IRBuilder.cpp
@@ -46,9 +46,9 @@ static MDNode *getID(LLVMContext &Ctx, Value *arg0 = nullptr,
return ID;
}
-LoopAnnotator::LoopAnnotator() : SE(nullptr), AliasScopeDomain(nullptr) {}
+ScopAnnotator::ScopAnnotator() : SE(nullptr), AliasScopeDomain(nullptr) {}
-void LoopAnnotator::buildAliasScopes(Scop &S) {
+void ScopAnnotator::buildAliasScopes(Scop &S) {
SE = S.getSE();
LLVMContext &Ctx = SE->getContext();
@@ -83,7 +83,7 @@ void LoopAnnotator::buildAliasScopes(Scop &S) {
}
}
-void polly::LoopAnnotator::pushLoop(Loop *L, bool IsParallel) {
+void ScopAnnotator::pushLoop(Loop *L, bool IsParallel) {
ActiveLoops.push_back(L);
if (!IsParallel)
@@ -98,7 +98,7 @@ void polly::LoopAnnotator::pushLoop(Loop *L, bool IsParallel) {
ParallelLoops.push_back(Ids);
}
-void polly::LoopAnnotator::popLoop(bool IsParallel) {
+void ScopAnnotator::popLoop(bool IsParallel) {
ActiveLoops.pop_back();
if (!IsParallel)
return;
@@ -107,8 +107,8 @@ void polly::LoopAnnotator::popLoop(bool IsParallel) {
ParallelLoops.pop_back();
}
-void polly::LoopAnnotator::annotateLoopLatch(BranchInst *B, Loop *L,
- bool IsParallel) const {
+void ScopAnnotator::annotateLoopLatch(BranchInst *B, Loop *L,
+ bool IsParallel) const {
if (!IsParallel)
return;
@@ -118,7 +118,7 @@ void polly::LoopAnnotator::annotateLoopLatch(BranchInst *B, Loop *L,
B->setMetadata("llvm.loop", Id);
}
-void polly::LoopAnnotator::annotate(Instruction *Inst) {
+void ScopAnnotator::annotate(Instruction *Inst) {
if (!Inst->mayReadOrWriteMemory())
return;
diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp
index 68ed9434462..ed8b0d683b8 100644
--- a/polly/lib/CodeGen/IslCodeGeneration.cpp
+++ b/polly/lib/CodeGen/IslCodeGeneration.cpp
@@ -56,7 +56,7 @@ using namespace llvm;
class IslNodeBuilder {
public:
- IslNodeBuilder(PollyIRBuilder &Builder, LoopAnnotator &Annotator, Pass *P,
+ IslNodeBuilder(PollyIRBuilder &Builder, ScopAnnotator &Annotator, Pass *P,
LoopInfo &LI, ScalarEvolution &SE, DominatorTree &DT)
: Builder(Builder), Annotator(Annotator), ExprBuilder(Builder, IDToValue),
P(P), LI(LI), SE(SE), DT(DT) {}
@@ -69,7 +69,7 @@ public:
private:
PollyIRBuilder &Builder;
- LoopAnnotator &Annotator;
+ ScopAnnotator &Annotator;
IslExprBuilder ExprBuilder;
Pass *P;
LoopInfo &LI;
@@ -580,7 +580,7 @@ public:
///}
/// @brief The loop annotator to generate llvm.loop metadata.
- LoopAnnotator Annotator;
+ ScopAnnotator Annotator;
/// @brief Build the runtime condition.
///
diff --git a/polly/lib/CodeGen/LoopGenerators.cpp b/polly/lib/CodeGen/LoopGenerators.cpp
index 1ec9fb85026..efdbeeeca77 100644
--- a/polly/lib/CodeGen/LoopGenerators.cpp
+++ b/polly/lib/CodeGen/LoopGenerators.cpp
@@ -48,7 +48,7 @@ Value *polly::createLoop(Value *LB, Value *UB, Value *Stride,
PollyIRBuilder &Builder, Pass *P, LoopInfo &LI,
DominatorTree &DT, BasicBlock *&ExitBB,
ICmpInst::Predicate Predicate,
- LoopAnnotator *Annotator, bool Parallel,
+ ScopAnnotator *Annotator, bool Parallel,
bool UseGuard) {
Function *F = Builder.GetInsertBlock()->getParent();
LLVMContext &Context = F->getContext();
OpenPOWER on IntegriCloud