[llvm-dev] Manipulating DAGs in TableGen

Nicolai Hähnle via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 14 08:47:48 PDT 2020


On Wed, Oct 14, 2020 at 4:12 PM Paul C. Anagnostopoulos
<paul at windfall.com> wrote:
> Beautiful.
>
> Should there be !getdagvalue and !getdagname, or should !getdag produce a pair?

I don't have a strong opinion, but would lean slightly towards
!getdagvalue / !getdagname because of how things tend to fit together
in TableGen in general.

Cheers,
Nicolai


>
> At 10/14/2020 09:44 AM, Nicolai Hähnle wrote:
> >On Tue, Oct 13, 2020 at 4:37 PM Paul C. Anagnostopoulos
> ><paul at windfall.com> wrote:
> >> Nicolai:
> >>
> >> If we have two operators to get and set DAG operator/operands, does it make sense to add to more operators to get/set the $names of operands? They would still specify the operand by integer index.
> >
> >Yes, I do think that would be helpful. For setting, I think you'd want
> >to set the child and name at the same time, i.e. something like
> >!setdag(dag_to_modify, index1, value1, name1, index2, value2, name2,
> >...). Either valueN or nameN can be `?` (unset).
>


-- 
Lerne, wie die Welt wirklich ist,
aber vergiss niemals, wie sie sein sollte.


More information about the llvm-dev mailing list