Add range iterators for post order and inverse post order. Use them
[oota-llvm.git] / lib / Transforms / Vectorize / SLPVectorizer.cpp
index 5eae4e278c57cbde73fbe3065ce8d8c7bd996a0a..7267f58d1c9ba9fc9903d08f5d356afb1e130299 100644 (file)
@@ -3101,9 +3101,7 @@ struct SLPVectorizer : public FunctionPass {
     // delete instructions.
 
     // Scan the blocks in the function in post order.
-    for (po_iterator<BasicBlock*> it = po_begin(&F.getEntryBlock()),
-         e = po_end(&F.getEntryBlock()); it != e; ++it) {
-      BasicBlock *BB = *it;
+    for (auto BB : post_order(&F.getEntryBlock())) {
       // Vectorize trees that end at stores.
       if (unsigned count = collectStores(BB, R)) {
         (void)count;