[PATCH] D50800: [ARM] Use correct jump table sizes

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 30 11:54:09 PDT 2018


efriedma added a comment.

Test missing?



================
Comment at: lib/Target/ARM/ARMConstantIslandPass.cpp:1658
+  if (!isThumb1)
+    llvm_unreachable("fixupFarBr is Thumb1 only!");
+
----------------
Better to just use assert() here.


================
Comment at: lib/Target/ARM/ARMConstantIslandPass.cpp:2372
+  for (unsigned i = 0, e = ShrunkTables.size(); i < e; ++i)
+    T2JumpTables.erase(&T2JumpTables[ShrunkTables[i]]);
 
----------------
Can you rewrite this loop to use remove_if, so it isn't quadratic?  Probably not a big deal in practice, but still. :)


https://reviews.llvm.org/D50800





More information about the llvm-commits mailing list