[PATCH] D57497: [RISCV] Passing small data limitation value to RISCV backend

Shiva Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 11 22:33:47 PDT 2020


shiva0217 added a comment.

In D57497#1917835 <https://reviews.llvm.org/D57497#1917835>, @apazos wrote:

> Shiva, I see a warning always  being printed:
>
>   '+small-data-limit=' is not a recognized feature for this target (ignoring feature)
>   
>
> This is because it is being passed down as a target feature.
>
> Might be good to add a test case to make sure the SmallDataLimit module flag is created, no target feature is passed, and that no warnings are printed.


Hi Ana,
Thanks for catching this, I'll fix it and add testing lines for it.

In D57497#1918483 <https://reviews.llvm.org/D57497#1918483>, @apazos wrote:

> Shiva, I am not sure how the SDataLimit is being honored in LTO mode. 
>  Where does getModuleMetadata get called?
>  If the SelectSectionForGlobal api is called without getModuleMetadata being called first, it will use the default 8 instead of honoring the SDataLimit.


It seems that SDataLimit will be honored in LTO mode because getModuleMetadata will be called in AsmPrinter::doInitialization and SelectSectionForGlobal will be called from AsmPrinter::doFinalization->emitGlobalVariable->SectionForGLobal->SelectSecfionForGlobal.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D57497





More information about the cfe-commits mailing list