[PATCH] D152358: [CGP] Remove operand of llvm.assume more aggressively.

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 13 06:51:11 PDT 2023


anna added inline comments.


================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:725
+          // Contains only instructions would be trivial dead if no uses.
+          SmallPtrSet<Instruction *, 4> Candidates;
+          // Instructions marked for removal.
----------------
Nit: change the order of declarations so that the comment is clearer?


================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:732
+          // Also removes operands from instruction itself.
+          auto AddToCandidates = [&](Instruction *I) {
+            for (Use &OpU : I->operands()) {
----------------
assert that `I` is already in `ToRemove` set?


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

https://reviews.llvm.org/D152358



More information about the llvm-commits mailing list