[PATCH] D84327: [SCEVExpander] Add helper to clean up instrs inserted while expanding.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 24 14:14:06 PDT 2020


lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp:2543-2544
+  auto InsertedInstructions = Expander.getAllInsertedInstructions();
+  SmallPtrSet<Instruction *, 8> InsertedSet(InsertedInstructions.begin(),
+                                            InsertedInstructions.end());
+  (void)InsertedSet;
----------------
lebedev.ri wrote:
> You need to wrap this into `#ifndef NDEBUG`, we won't manage to optimize this out
> https://godbolt.org/z/Mhq5P1
Correction: it looks slightly less ugly -RTTI -EH, but still: https://godbolt.org/z/sjr1dd


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84327





More information about the llvm-commits mailing list