[PATCH] D116103: [VE] CustomDAG builder class

Simon Moll via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 23 00:32:07 PST 2021


simoll added a comment.

In D116103#3206720 <https://reviews.llvm.org/D116103#3206720>, @kaz7 wrote:

> I have several quesions.
>
> 1. What is the purpose of this CustomDAG?  What is the differences from SelectionDAG.getNode()?

CustomDAG provides VE-specific functions for building and legalizing SDNodes.
In this patch, it's just a stub that fowards getNode/getConstant to the underlying DAG, which already needs less parameters.

> 2. Do we really need CustomDAG although all other architectures works well with SelectionDAG.

CustomDAG does not replace SelectionDAG. It wraps around it and provides convenience functions. In the future, there will also be functions for VE-specific SDNodes kinds (`VVP_*` and `VEC_*`).

> 3. Is it possible to extend SelectionDAG for us and probablly other vector architectures?

Yes. CustomDAG functions that were implemented in a VE-specific way in downstream could be generalized to be available for all VP-based backends. For example, `VP_UREM` expansion. Most functions in CustomDAG, however, are tailored to VE and have VE-specific lowering and architecture knowledge built in.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116103/new/

https://reviews.llvm.org/D116103



More information about the llvm-commits mailing list