[polly] r218878 - [Refactor] Rename LoopAnnotator to ScopAnnotator
Johannes Doerfert
doerfert at cs.uni-saarland.de
Thu Oct 2 08:32:17 PDT 2014
Author: jdoerfert
Date: Thu Oct 2 10:32:17 2014
New Revision: 218878
URL: http://llvm.org/viewvc/llvm-project?rev=218878&view=rev
Log:
[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.
Modified:
polly/trunk/include/polly/CodeGen/IRBuilder.h
polly/trunk/include/polly/CodeGen/LoopGenerators.h
polly/trunk/lib/CodeGen/IRBuilder.cpp
polly/trunk/lib/CodeGen/IslCodeGeneration.cpp
polly/trunk/lib/CodeGen/LoopGenerators.cpp
Modified: polly/trunk/include/polly/CodeGen/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/CodeGen/IRBuilder.h?rev=218878&r1=218877&r2=218878&view=diff
==============================================================================
--- polly/trunk/include/polly/CodeGen/IRBuilder.h (original)
+++ polly/trunk/include/polly/CodeGen/IRBuilder.h Thu Oct 2 10:32:17 2014
@@ -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::Cons
/// @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());
Modified: polly/trunk/include/polly/CodeGen/LoopGenerators.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/CodeGen/LoopGenerators.h?rev=218878&r1=218877&r2=218878&view=diff
==============================================================================
--- polly/trunk/include/polly/CodeGen/LoopGenerators.h (original)
+++ polly/trunk/include/polly/CodeGen/LoopGenerators.h Thu Oct 2 10:32:17 2014
@@ -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, Val
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 {
Modified: polly/trunk/lib/CodeGen/IRBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IRBuilder.cpp?rev=218878&r1=218877&r2=218878&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IRBuilder.cpp (original)
+++ polly/trunk/lib/CodeGen/IRBuilder.cpp Thu Oct 2 10:32:17 2014
@@ -46,9 +46,9 @@ static MDNode *getID(LLVMContext &Ctx, V
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(Sco
}
}
-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
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
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::annotateLoopL
B->setMetadata("llvm.loop", Id);
}
-void polly::LoopAnnotator::annotate(Instruction *Inst) {
+void ScopAnnotator::annotate(Instruction *Inst) {
if (!Inst->mayReadOrWriteMemory())
return;
Modified: polly/trunk/lib/CodeGen/IslCodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslCodeGeneration.cpp?rev=218878&r1=218877&r2=218878&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslCodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/IslCodeGeneration.cpp Thu Oct 2 10:32:17 2014
@@ -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.
///
Modified: polly/trunk/lib/CodeGen/LoopGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/LoopGenerators.cpp?rev=218878&r1=218877&r2=218878&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/LoopGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/LoopGenerators.cpp Thu Oct 2 10:32:17 2014
@@ -48,7 +48,7 @@ Value *polly::createLoop(Value *LB, Valu
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();
More information about the llvm-commits
mailing list