[llvm-branch-commits] [polly] r259707 - Merged: https://llvm.org/svn/llvm-project/polly/trunk at 259337
Tobias Grosser via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Feb 3 13:42:59 PST 2016
Author: grosser
Date: Wed Feb 3 15:42:58 2016
New Revision: 259707
URL: http://llvm.org/viewvc/llvm-project?rev=259707&view=rev
Log:
Merged: https://llvm.org/svn/llvm-project/polly/trunk@259337
ScopInfo: use std::distance to shorten code [NFC]
Modified:
polly/branches/release_38/lib/Analysis/ScopInfo.cpp
Modified: polly/branches/release_38/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/branches/release_38/lib/Analysis/ScopInfo.cpp?rev=259707&r1=259706&r2=259707&view=diff
==============================================================================
--- polly/branches/release_38/lib/Analysis/ScopInfo.cpp (original)
+++ polly/branches/release_38/lib/Analysis/ScopInfo.cpp Wed Feb 3 15:42:58 2016
@@ -1966,13 +1966,8 @@ static inline unsigned getNumBlocksInReg
if (!RN->isSubRegion())
return 1;
- unsigned NumBlocks = 0;
Region *R = RN->getNodeAs<Region>();
- for (auto BB : R->blocks()) {
- (void)BB;
- NumBlocks++;
- }
- return NumBlocks;
+ return std::distance(R->block_begin(), R->block_end());
}
static bool containsErrorBlock(RegionNode *RN, const Region &R, LoopInfo &LI,
More information about the llvm-branch-commits
mailing list