[PATCH] D116103: [VE] CustomDAG builder class

Simon Moll via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 23 05:12:16 PST 2021


simoll added a comment.

In D116103#3207866 <https://reviews.llvm.org/D116103#3207866>, @lebedev.ri wrote:

> Please follow the patterns that can be observed in other backends - how do they deal with this problem?

It's custom to have static functions in `<Target>ISelLowering.cpp` with the following pattern:

  static SDValue get|splat|convert|createSTUFF(.. SDValue Op, SelectionDAG &DAG);

Grep for `static SDValue` in the targets isellowerings. This is any function that isn't directly called from `LowerOperation`.
We just put those functions in a class since all of them take a `DAG` and proceed to construct a `DL` from the SDValue that is lowered. I don't see how this pattern is much different from what the other backends are doing.

> If nothing else, the name is wrong, it's a bit too generic.

Fair. Is `VECustomDAG` good?


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