[PATCH] D71910: [Attributor] Add helper to change an instruction to `unreachable` inst

Stefanos Baziotis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 26 09:56:51 PST 2019


baziotis added inline comments.


================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:1040-1041
 
+  /// Instructions we replace with `unreachable` insts after manifest is done.
+  SmallPtrSet<Instruction *, 8> ToBeChangedToUnreachableInsts;
+
----------------
baziotis wrote:
> How about a `SmallVector` here? I think it makes sense since we never lookup values on this set (which is I guess the primary reason to make a set), it should have amortized O(1) and it is easier to loop over.
Oh my bad, I just saw it was committed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71910





More information about the llvm-commits mailing list