[PATCH] D97848: [CodeGenPrepare] Eliminate llvm.expect before removing empty blocks

Benjamin Kramer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 3 05:36:13 PST 2021


bkramer accepted this revision.
bkramer added a comment.
This revision is now accepted and ready to land.

This makes sense to me.



================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:627-628
+    CurInstIterator = BB.begin();
+    while (CurInstIterator != BB.end()) {
+      Instruction *I = &*(CurInstIterator++);
+      if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
----------------
We now have a `make_early_inc_range` thing to make this pattern less ugly. It can be used in a for range loop.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97848



More information about the llvm-commits mailing list