[PATCH] D41029: [JumpTables][PowerPC] Let targets decide which switch instructions are suitable for jump tables

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 14:23:48 PST 2017


efriedma added a comment.

Generally looks fine, but probably needs a pass from a PPC reviewer.



================
Comment at: lib/Target/PowerPC/PPCISelLowering.h:539
+    mutable std::set<const BasicBlock*> BlocksKnownToUseCTR;
+    mutable std::set<const BasicBlock*> BlocksKnownNotToUseCTR;
 
----------------
We generally prefer SmallPtrSet for sets of pointers.  And for long-lived pointers to LLVM values, it's generally a good idea to use AssertingVH (so something like `SmallPtrSet<AssertingVH<SwitchInst>>`).

We share the same PPCTargetLowering for multiple functions, so you'll build up a set for the entire module in most cases.  But I guess that isn't really a problem.


Repository:
  rL LLVM

https://reviews.llvm.org/D41029





More information about the llvm-commits mailing list