[PATCH] D57497: [RISCV] Passing small data limitation value to RISCV backend
Sam Elliott via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 10 04:30:24 PDT 2020
lenary added a comment.
Two nits, then I'd be happy for this to land.
It would be useful if @jrtc27 would also re-review, as he has blocking comments (which I believe are now addressed).
================
Comment at: clang/docs/ClangCommandLineReference.rst:2958
+
+Put global and static data smaller than the limitation into a special section (RISCV only)
+
----------------
"(RISC-V only)" please
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:688
+ case llvm::Triple::riscv64:
+ getModule().addModuleFlag(llvm::Module::ModFlagBehaviorFirstVal,
+ "SmallDataLimit", CodeGenOpts.SmallDataLimit);
----------------
You should not be using `ModFlagBehaviourFirstVal` here - use `Error` if that is what you intend for conflicting values. The other possible option is `Max` but that could be confusing (I think we'd prefer `Min`, which doesn't yet exist)
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