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

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 29 17:49:26 PDT 2021


steven.zhang added a comment.

In D91050#2905380 <https://reviews.llvm.org/D91050#2905380>, @efriedma wrote:

> Passing an alignment in and returning an alignment out at the same time seems unlikely to be useful.  DAGCombine can refine the alignment later anyway, if it turns out to be relevant. Maybe rename the version that returns the alignment out?
>
> Also, if the point is literally just "glue a bunch of ConstantPools together", can we teach target-independent code to do that? It doesn't actually require anything target-specific, I think, and it should be useful on any target where computing the address of a constant pool isn't cheap.

Passing a constant in,which has the alignment of the constant,return a constantpool,which need to specify the alignment of constantpool. We cannot query the alignment of constantpool now as the result could be cp + offset.


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