[PATCH] D79609: [GlobalISel] Don't add duplicate successors to MBBs when translating indirectbr

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 8 12:20:28 PDT 2020


paquette marked an inline comment as done.
paquette added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:841
   // Link successors.
+  SmallSet<const BasicBlock *, 32> AddedSuccessors;
   MachineBasicBlock &CurBB = MIRBuilder.getMBB();
----------------
arsenm wrote:
> SmallPtrSet, not sure what the differences iss
According to the programmer's manual it sounds like it should basically be the same?

"(and a SmallSet of pointers is transparently implemented with a SmallPtrSet)"

and in SmallSet.h:

```
/// If this set is of pointer values, transparently switch over to using
/// SmallPtrSet for performance.
```

I don't mind switching it to SmallPtrSet for clarity though.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79609/new/

https://reviews.llvm.org/D79609





More information about the llvm-commits mailing list