[PATCH] D125212: [GlobalISel] Implement the Has{No}Use builtin predicates

Abinav Puthan Purayil via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 21:54:30 PDT 2022


abinavpp marked 3 inline comments as done.
abinavpp added inline comments.


================
Comment at: llvm/utils/TableGen/GlobalISelEmitter.cpp:4037-4042
+    // FIXME: This should be part of addBuiltinPredicates(). If we add this at
+    // the start of addBuiltinPredicates() without returning, then there might
+    // be cases where we hit the last return before which the
+    // HasAddedBuiltinMatcher will be set to false. The predicate could be
+    // missed if we add it in the middle or at the end due to return statements
+    // after the addPredicate<>() calls.
----------------
arsenm wrote:
> It's very not obvious but the code is structured in such a way that assumes each level of PatFrag you define only defines one predicate. We need verification (like the DAG path has) that this is the case
I'm interested in reworking this, but probably in a different patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125212



More information about the llvm-commits mailing list