aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2014-03-03 13:00:39 +0000
committerTobias Grosser <tobias@grosser.es>2014-03-03 13:00:39 +0000
commit4abf9d3a5451474889e6cfaf0c53e05f4cb8c42b (patch)
tree6a0e857c273df179655664a21a7f1b1a86fadda5 /llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
parent0df3a5688cfa18e7ec69bd70803e39773215a4fa (diff)
downloadllvm-4abf9d3a5451474889e6cfaf0c53e05f4cb8c42b.zip
llvm-4abf9d3a5451474889e6cfaf0c53e05f4cb8c42b.tar.gz
llvm-4abf9d3a5451474889e6cfaf0c53e05f4cb8c42b.tar.bz2
[C++11] Add a basic block range view for RegionInfo
This also switches the users in LLVM to ensure this functionality is tested. llvm-svn: 202705
Diffstat (limited to 'llvm/lib/Transforms/Scalar/StructurizeCFG.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/StructurizeCFG.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp b/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
index 6038288..6066727 100644
--- a/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
+++ b/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
@@ -829,11 +829,7 @@ void StructurizeCFG::createFlow() {
/// no longer dominate all their uses. Not sure if this is really nessasary
void StructurizeCFG::rebuildSSA() {
SSAUpdater Updater;
- for (Region::block_iterator I = ParentRegion->block_begin(),
- E = ParentRegion->block_end();
- I != E; ++I) {
-
- BasicBlock *BB = *I;
+ for (const auto &BB : ParentRegion->blocks())
for (BasicBlock::iterator II = BB->begin(), IE = BB->end();
II != IE; ++II) {
@@ -864,7 +860,6 @@ void StructurizeCFG::rebuildSSA() {
Updater.RewriteUseAfterInsertions(*I);
}
}
- }
}
/// \brief Run the transformation for each region found