[PATCH] D99846: [GlobalOpt] Replace recursion with extended worklist

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 3 13:46:23 PDT 2021


lebedev.ri requested changes to this revision.
lebedev.ri added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:336-339
       if (CE->use_empty()) {
         CE->destroyConstant();
         Changed = true;
       }
----------------
We need to track hopefully-dead-in-the-end instrs in some vector, and delete them if they are unused.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99846



More information about the llvm-commits mailing list