[PATCH] D91053: [PowerPC] Lump the constants to save one addis for each constant access

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 21 02:30:50 PST 2020


steven.zhang added a comment.

In D91053#2459632 <https://reviews.llvm.org/D91053#2459632>, @qiucf wrote:

>> If there is only one constant, we will have one extra load with this patch. But the load could be optimized by linker if it merges the TOC. It is not easy inside compiler to handle it as ISEL is done basing on per BB, and we don't know if there are other constants until other BBs are selected. Any thoughts ?
>
> As discussed, `FunctionLoweringInfo` is 'global' to SelectionDAG. Can we take advantage of it to record some global information? `FunctionLoweringInfo::set` has already scanned over each BB, each instruction.

The FunctionLoweringInfo won't help as we will do the transformation during the DAGCombine and it could remove/add new constants that cause the out of sync.

> Also, test changes in this patch are really huge. Are they all related?

Yes, they are all relative as we are changing the basic of access the constant pool.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91053



More information about the llvm-commits mailing list