[PATCH] D50754: Implementation of a vtable interleaving algorithm

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 13 21:24:10 PDT 2018


pcc added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/InterleaveVTables.cpp:701
+  for (auto I = M.global_begin(); I != M.global_end();) {
+    GlobalVariable &GV = *I;
+    if (GV.isDeclarationForLinker()) {
----------------
You could write this as `GlobalVariable &GV = *I++;` and save needing to increment the iterator in several places below.


================
Comment at: llvm/lib/Transforms/IPO/InterleaveVTables.cpp:741
+        GV.eraseFromParent();
+        continue;
+      } else {
----------------
You don't need the continue on this line or the one below.


https://reviews.llvm.org/D50754





More information about the llvm-commits mailing list