[PATCH] D41029: [JumpTables][PowerPC] Let targets decide which switch instructions are suitable for jump tables
    Nemanja Ivanovic via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jan 31 06:10:44 PST 2018
    
    
  
nemanjai added inline comments.
================
Comment at: lib/Target/PowerPC/PPCISelLowering.h:20
 #include "PPCInstrInfo.h"
+#include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/CodeGen/CallingConvLower.h"
----------------
This isn't used currently but I was asked to use it. In any case, either this or `#include <set>` will be removed depending on which one I end up using.
================
Comment at: lib/Target/PowerPC/PPCISelLowering.h:567
+    mutable std::set<JTCallBack> BlocksKnownToUseCTR;
+    mutable std::set<JTCallBack> BlocksKnownNotToUseCTR;
+    // The threshold for the number of cases a switch should have for jump
----------------
I wasn't able to make `SmallPtrSet` work for my wrapper to `CallbackVH`. I think I would need to specialize pointer type traits in order to do this - if someone can point me to information about this, I'd appreciate it.
Repository:
  rL LLVM
https://reviews.llvm.org/D41029
    
    
More information about the llvm-commits
mailing list