summaryrefslogtreecommitdiffstats
path: root/polly/lib/Analysis
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2011-11-17 14:52:36 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2011-11-17 14:52:36 +0000
commit29ee0b14d5b6872d1e06fbbd24734c75983d9ffd (patch)
treec83aa85f3af13d1064eb45ca4f9c98620cb6083e /polly/lib/Analysis
parent135c9c653444e9790bae5ac9e84786e67e5f6f31 (diff)
downloadbcm5719-llvm-29ee0b14d5b6872d1e06fbbd24734c75983d9ffd.tar.gz
bcm5719-llvm-29ee0b14d5b6872d1e06fbbd24734c75983d9ffd.zip
Do not use getNameStr() anymore.
Instead we switch to the recommended getName(). This fixes compilation with recent versions of LLVM. llvm-svn: 144909
Diffstat (limited to 'polly/lib/Analysis')
-rw-r--r--polly/lib/Analysis/ScopDetection.cpp18
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp5
2 files changed, 12 insertions, 11 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp
index a2dd85645e1..0b092c9d280 100644
--- a/polly/lib/Analysis/ScopDetection.cpp
+++ b/polly/lib/Analysis/ScopDetection.cpp
@@ -154,7 +154,7 @@ bool ScopDetection::isValidCFG(BasicBlock &BB, DetectionContext &Context) const
BranchInst *Br = dyn_cast<BranchInst>(TI);
if (!Br)
- INVALID(CFG, "Non branch instruction terminates BB: " + BB.getNameStr());
+ INVALID(CFG, "Non branch instruction terminates BB: " + BB.getName());
if (Br->isUnconditional()) return true;
@@ -163,11 +163,11 @@ bool ScopDetection::isValidCFG(BasicBlock &BB, DetectionContext &Context) const
// UndefValue is not allowed as condition.
if (isa<UndefValue>(Condition))
INVALID(AffFunc, "Condition based on 'undef' value in BB: "
- + BB.getNameStr());
+ + BB.getName());
// Only Constant and ICmpInst are allowed as condition.
if (!(isa<Constant>(Condition) || isa<ICmpInst>(Condition)))
- INVALID(AffFunc, "Condition in BB '" + BB.getNameStr() + "' neither "
+ INVALID(AffFunc, "Condition in BB '" + BB.getName() + "' neither "
"constant nor an icmp instruction");
// Allow perfectly nested conditions.
@@ -185,14 +185,14 @@ bool ScopDetection::isValidCFG(BasicBlock &BB, DetectionContext &Context) const
// Are both operands of the ICmp affine?
if (isa<UndefValue>(ICmp->getOperand(0))
|| isa<UndefValue>(ICmp->getOperand(1)))
- INVALID(AffFunc, "undef operand in branch at BB: " + BB.getNameStr());
+ INVALID(AffFunc, "undef operand in branch at BB: " + BB.getName());
const SCEV *LHS = SE->getSCEV(ICmp->getOperand(0));
const SCEV *RHS = SE->getSCEV(ICmp->getOperand(1));
if (!isAffineExpr(&Context.CurRegion, LHS, *SE) ||
!isAffineExpr(&Context.CurRegion, RHS, *SE))
- INVALID(AffFunc, "Non affine branch in BB '" << BB.getNameStr()
+ INVALID(AffFunc, "Non affine branch in BB '" << BB.getName()
<< "' with LHS: " << *LHS << " and RHS: " << *RHS);
}
@@ -204,7 +204,7 @@ bool ScopDetection::isValidCFG(BasicBlock &BB, DetectionContext &Context) const
// Allow perfectly nested conditions.
Region *R = RI->getRegionFor(&BB);
if (R->getEntry() != &BB)
- INVALID(CFG, "Not well structured condition at BB: " + BB.getNameStr());
+ INVALID(CFG, "Not well structured condition at BB: " + BB.getName());
return true;
}
@@ -358,13 +358,13 @@ bool ScopDetection::isValidLoop(Loop *L, DetectionContext &Context) const {
// No canonical induction variable.
if (!IndVar)
INVALID(IndVar, "No canonical IV at loop header: "
- << L->getHeader()->getNameStr());
+ << L->getHeader()->getName());
// Is the loop count affine?
const SCEV *LoopCount = SE->getBackedgeTakenCount(L);
if (!isAffineExpr(&Context.CurRegion, LoopCount, *SE))
INVALID(LoopBound, "Non affine loop bound '" << *LoopCount << "' in loop: "
- << L->getHeader()->getNameStr());
+ << L->getHeader()->getName());
return true;
}
@@ -525,7 +525,7 @@ bool ScopDetection::runOnFunction(llvm::Function &F) {
releaseMemory();
- if (OnlyFunction != "" && F.getNameStr() != OnlyFunction)
+ if (OnlyFunction != "" && F.getName() != OnlyFunction)
return false;
if(!isValidFunction(F))
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index f17bcb6a4ce..0ddd75294db 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -237,7 +237,8 @@ public:
isl_space *Space;
- isl_id *ID = isl_id_alloc(ctx, Value->getNameStr().c_str(), Value);
+ std::string ValueName = Value->getName();
+ isl_id *ID = isl_id_alloc(ctx, ValueName.c_str(), Value);
Space = isl_space_set_alloc(ctx, 1, NbLoopSpaces);
Space = isl_space_set_dim_id(Space, isl_dim_param, 0, ID);
@@ -874,7 +875,7 @@ __isl_give isl_id *Scop::getIdForParam(const SCEV *Parameter) const {
if (const SCEVUnknown *ValueParameter = dyn_cast<SCEVUnknown>(Parameter)) {
Value *Val = ValueParameter->getValue();
- ParameterName = Val->getNameStr();
+ ParameterName = Val->getName();
}
if (ParameterName == "" || ParameterName.substr(0, 2) == "p_")
OpenPOWER on IntegriCloud