Manipulating DAGs in TableGen

I was wondering today whether the TableGen DAG support would be more useful if you could manipulate DAGs a little more easily. Right now, you can:

* Specify a DAG with (...)

* Catenate DAGs with !con().

* Construct a DAG with !dag().

* Iterate over a DAG with !foreach().

* Get and set the DAG operator with !getop() and !setop().

What if you could also get and set a DAG's operands individually, by position or by $xxx name? Would that add enough power/convenience that you would build more interesting DAGs in TableGen, or is it just easier to do such building in the backends?

Yeah, this is definitely useful in my experience. I had the same idea a few days ago but it sidetracked in my ToDos.

IMHO, it is considerable effort though.

It is some work, for sure.

Let me post a modest proposal here in the next few days. I'd appreciate comments and suggestions. The idea is to make it easier to manipulate complex DAGs in TableGen.