There is no way to pass function as a value in TableGen, but we can
treat DAGs as S-expression and evaluate them.
In this patch, a new bang operator is added:
type value = !apply<type>(dag[, param]);
We can treat dag as function and evaluate it on params.
To not increase complexity, we map DAGs to subset of existed bang
operators. But we may support more bang operator or even user-definded
subroutines.
The need of !apply has been discussed in D146198.
How about mul, div, and mod ?