Paul C. Anagnostopoulos via llvm-dev
2020-Oct-09 18:04 UTC
[llvm-dev] 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?
Madhur Amilkanthwar via llvm-dev
2020-Oct-09 18:22 UTC
[llvm-dev] Manipulating DAGs in TableGen
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. On Fri, Oct 9, 2020, 11:38 PM Paul C. Anagnostopoulos via llvm-dev < llvm-dev at lists.llvm.org> wrote:> 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? > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201009/2cc17006/attachment.html>
Paul C. Anagnostopoulos via llvm-dev
2020-Oct-09 19:33 UTC
[llvm-dev] Manipulating DAGs in TableGen
At 10/9/2020 02:22 PM, Madhur Amilkanthwar wrote:>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.