[PATCH] D68013: [PatternMatch] Make m_Br more flexible, add matchers for BB values.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 04:24:39 PDT 2019


fhahn marked an inline comment as done.
fhahn added inline comments.


================
Comment at: llvm/include/llvm/IR/PatternMatch.h:682-686
+/// Match a specific integer value or vector with all elements equal to
+/// the value.
+inline specific_bbval m_SpecificBB(BasicBlock *BB) {
+  return specific_bbval(BB);
+}
----------------
lebedev.ri wrote:
> Should `m_DeferredBB()` be added at the same time?
Nice, I did not know about `m_Deferred`! 

I've added an overloaded version for BasicBlock, not sure if there's a benefit for including BB in the name, as we also don't include Value in the Value variant name. I've also added a test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68013





More information about the llvm-commits mailing list