[polly] r174368 - TempScopInfo: clang-format
Tobias Grosser
grosser at fim.uni-passau.de
Tue Feb 5 04:27:24 PST 2013
Author: grosser
Date: Tue Feb 5 06:27:23 2013
New Revision: 174368
URL: http://llvm.org/viewvc/llvm-project?rev=174368&view=rev
Log:
TempScopInfo: clang-format
Modified:
polly/trunk/lib/Analysis/TempScopInfo.cpp
Modified: polly/trunk/lib/Analysis/TempScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/TempScopInfo.cpp?rev=174368&r1=174367&r2=174368&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/TempScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/TempScopInfo.cpp Tue Feb 5 06:27:23 2013
@@ -60,12 +60,13 @@ inline raw_ostream &operator<<(raw_ostre
//===----------------------------------------------------------------------===//
// TempScop implementation
TempScop::~TempScop() {
- if (MayASInfo) delete MayASInfo;
+ if (MayASInfo)
+ delete MayASInfo;
}
void TempScop::print(raw_ostream &OS, ScalarEvolution *SE, LoopInfo *LI) const {
- OS << "Scop: " << R.getNameStr() << ", Max Loop Depth: "<< MaxLoopDepth
- << "\n";
+ OS << "Scop: " << R.getNameStr() << ", Max Loop Depth: " << MaxLoopDepth
+ << "\n";
printDetail(OS, SE, LI, &R, 0);
}
@@ -95,19 +96,17 @@ void TempScopInfo::buildAccessFunctions(
const SCEV *AccessFunction = SE->getSCEV(getPointerOperand(Inst));
const SCEVUnknown *BasePointer =
- dyn_cast<SCEVUnknown>(SE->getPointerBase(AccessFunction));
+ dyn_cast<SCEVUnknown>(SE->getPointerBase(AccessFunction));
assert(BasePointer && "Could not find base pointer");
AccessFunction = SE->getMinusSCEV(AccessFunction, BasePointer);
- bool IsAffine = isAffineExpr(&R, AccessFunction, *SE,
- BasePointer->getValue());
+ bool IsAffine =
+ isAffineExpr(&R, AccessFunction, *SE, BasePointer->getValue());
- Functions.push_back(std::make_pair(IRAccess(Type,
- BasePointer->getValue(),
- AccessFunction, Size,
- IsAffine),
- &Inst));
+ Functions.push_back(
+ std::make_pair(IRAccess(Type, BasePointer->getValue(), AccessFunction,
+ Size, IsAffine), &Inst));
}
}
@@ -122,8 +121,8 @@ void TempScopInfo::buildLoopBounds(TempS
Region &R = Scop.getMaxRegion();
unsigned MaxLoopDepth = 0;
- for (Region::block_iterator I = R.block_begin(), E = R.block_end();
- I != E; ++I) {
+ for (Region::block_iterator I = R.block_begin(), E = R.block_end(); I != E;
+ ++I) {
Loop *L = LI->getLoopFor(*I);
if (!L || !R.contains(L))
@@ -228,8 +227,8 @@ void TempScopInfo::buildCondition(BasicB
TempScop *TempScopInfo::buildTempScop(Region &R) {
TempScop *TScop = new TempScop(R, LoopBounds, BBConds, AccFuncMap);
- for (Region::block_iterator I = R.block_begin(), E = R.block_end();
- I != E; ++I) {
+ for (Region::block_iterator I = R.block_begin(), E = R.block_end(); I != E;
+ ++I) {
buildAccessFunctions(R, **I);
buildCondition(*I, R.getEntry());
}
@@ -246,9 +245,10 @@ TempScop *TempScopInfo::getTempScop(cons
return at == TempScops.end() ? 0 : at->second;
}
-void TempScopInfo::print(raw_ostream &OS, const Module *) const {
+void TempScopInfo::print(raw_ostream &OS, const Module *)const {
for (TempScopMapType::const_iterator I = TempScops.begin(),
- E = TempScops.end(); I != E; ++I)
+ E = TempScops.end();
+ I != E; ++I)
I->second->print(OS, SE, LI);
}
@@ -262,7 +262,7 @@ bool TempScopInfo::runOnFunction(Functio
TD = &getAnalysis<DataLayout>();
for (ScopDetection::iterator I = SD->begin(), E = SD->end(); I != E; ++I) {
- Region *R = const_cast<Region*>(*I);
+ Region *R = const_cast<Region *>(*I);
TempScops.insert(std::make_pair(R, buildTempScop(*R)));
}
@@ -281,9 +281,7 @@ void TempScopInfo::getAnalysisUsage(Anal
AU.setPreservesAll();
}
-TempScopInfo::~TempScopInfo() {
- clear();
-}
+TempScopInfo::~TempScopInfo() { clear(); }
void TempScopInfo::clear() {
BBConds.clear();
More information about the llvm-commits
mailing list