[PATCH] D114950: [RISCV] Use constant pool for large integers

Wang Pengcheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 19 19:16:13 PST 2021


pcwang-thead added a comment.

In D114950#3201509 <https://reviews.llvm.org/D114950#3201509>, @craig.topper wrote:

> In D114950#3199143 <https://reviews.llvm.org/D114950#3199143>, @pcwang-thead wrote:
>
>> GCC will merge constant pool entries with the same value in the whole compilation unit, can LLVM do this too?
>> It seems that `ConstantPool` is owned by `MachineFunction` and can't be shared with other `MachineFunction`s.
>> Are there something I missed? Is it possible for LLVM to create module-scoped constant pool that can be used by all functions?
>
> I found this related bug https://bugs.llvm.org/show_bug.cgi?id=16711

Thanks.
So it is a legacy problem and linker may do the optimization (however I found current GNU ld can't do this).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114950



More information about the llvm-commits mailing list