diff options
author | Tobias Grosser <tobias@grosser.es> | 2016-02-01 01:55:08 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2016-02-01 01:55:08 +0000 |
commit | 0dd4a9a9f44975d6f9ad301925dc89552a78eb0c (patch) | |
tree | 1b8911a7073111fa4e27c138769d6dcb38e7c8bd | |
parent | 28851b62cc64c9c48fcb22c182a66a9489900bd7 (diff) | |
download | bcm5719-llvm-0dd4a9a9f44975d6f9ad301925dc89552a78eb0c.tar.gz bcm5719-llvm-0dd4a9a9f44975d6f9ad301925dc89552a78eb0c.zip |
ScopInfo: use std::distance to shorten code [NFC]
llvm-svn: 259337
-rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 908dea3df5e..9ee586ae699 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -1987,13 +1987,8 @@ static inline unsigned getNumBlocksInRegionNode(RegionNode *RN) { 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, |