[PATCH] D131003: [TableGen][CodeEmitterGen] Add the capability to match sub-operands by name.
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 2 12:56:48 PDT 2022
nhaehnle added a comment.
Huh, that's an interesting hack. I'd say your change makes it less hacky, but yeah, it's all rather questionable.
How about an approach where the users of these complex patterns look something like:
def : Pat<(sub GPR32:$Rn, (arith_shifted_reg32 GPR32:$src2, imm:$shift)),
(SUBSWrs GPR32:$Rn, $src2, $shift)>;
Having the two operands to the `arith_shifted_reg32` would fall out implicitly from using the ComplexPattern tablegen class.
This seems like a potentially clean way to go in terms of the TableGen DSL. I have no idea how feasible that would be to implement, though...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131003/new/
https://reviews.llvm.org/D131003
More information about the llvm-commits
mailing list