[PATCH] D113897: [GVNSink] Make GVNSink resistant against self referencing instructions (PR36954)

Dawid Jurczak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 7 03:05:07 PDT 2022


yurai007 added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/GVNSink.cpp:393
   uint32_t nextValueNumber = 1;
+  Optional<BasicBlocksSet> ReachableBBs;
 
----------------
nikic wrote:
> Is the optional here needed? Don't we expect this to always be set before it gets used?
Technically it's possible to use ValueTable without ReachableBBs being set. But for now we always set it before sinking so yes - Optional can be simply removed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113897



More information about the llvm-commits mailing list