[PATCH] D91050: [NFC] Add the getConstantPool hook for target to customize it with MachineConstantPoolValue

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 23 18:35:02 PST 2020


steven.zhang added a comment.

In D91050#2469885 <https://reviews.llvm.org/D91050#2469885>, @RKSimon wrote:

> What should we do with SelectionDAG::getConstantPool? At the very least I'd expect better comments explaining when each should be used, but I'm wondering whether we can get away with just the TLI version?

Removing the getConstantPool from SelectionDAG doesn't make sense as we are creating SDNode inside DAG. And yes, it will confuse us if there are two version, no matter how detail the comments have. Maybe, we can use the SelectionDAGTargetInfo and call the hook inside DAG.getConstantPool as what we did for getMcmcpy(). So that, we only have one interface. The challenge is that, there are many places that assume the return value of DAG.getConstantPool is ConstantPoolSDNode which will not be true anymore if there is hook inside it. I will try with this direction to see if there is a better way to handle this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91050



More information about the llvm-commits mailing list