[PATCH] D84598: [JumpThreading] Add a basic support for freeze instruction

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 26 06:22:58 PDT 2020


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:708
+      }
+    }
+
----------------
You can probably write this loop a bit more elegantly using something along these lines:
```
erase_if(Result, [](std::pair<Constant *, BasicBlock *> &Pair) {
  return !isGuaranteedNotToBeUndefOrPoison(Pair.first);
});
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84598





More information about the llvm-commits mailing list