[llvm-dev] Manipulating DAGs in TableGen

Paul C. Anagnostopoulos via llvm-dev
Sat, 17 Oct 2020 12:04:44 -0000

Now I'm second-guessing myself about the indexes used to access the operator
and operands. All the C++ functions used to access the operands index them from
0, as expected. It seems foolish and confusing to index them from 1 in these
bang operators.

One option is to index the operator as -1 and the operands from 0.

A second option is to remove the ability to index the operator and retain the
!getop and !setop bangs for that purpose, possibly renamed to !getdagop and
!setdagop.

Opinions, please.