[PATCH] D57497: [RISCV] Passing small data limitation value to RISCV backend
Ana Pazos via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 5 15:34:09 PST 2019
apazos added a comment.
So Eli is concerned we might end up with many globals in the small data section or not picking the best candidates if we pass -G to all files in LTO.
I don’t know if anyone has experimented with a heuristic to selectively pick which globals and of which size will be allowed to go into the small data section.
Simon, do you have any insight?
Shiva, maybe for now we don’t pass the flag to LTO. But I think you got the correct mechanism. The only other suggestion I have is to add a RISC-V specific function to avoid too much RISC-V specific code in gnutools::Linker::constructJob. You just check the triple and call something like toolchains::RISCVToolChain::AddGoldPluginAdditionalFlags.
CHANGES SINCE LAST ACTION
More information about the cfe-commits