[PATCH] D72424: TableGen/GlobalISel: Fix pattern matching of immarg literals
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 9 12:07:33 PST 2020
paquette added inline comments.
================
Comment at: llvm/utils/TableGen/CodeGenInstruction.cpp:520-528
+ if (DagInit *ConstraintList = TheDef->getValueAsDag("InOperandList")) {
+ if (i < ConstraintList->getNumArgs()) {
+ if (DefInit *Constraint = dyn_cast<DefInit>(ConstraintList->getArg(i))) {
+ return Constraint->getDef()->isSubClassOf("TypedOperand") &&
+ Constraint->getDef()->getValueAsBit("IsImmediate");
+ }
+ }
----------------
Can we reduce the nesting here a bit by returning false early?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72424/new/
https://reviews.llvm.org/D72424
More information about the llvm-commits
mailing list