[PATCH] D57493: [RISCV] Put data smaller than eight bytes to small data section
Alex Bradbury via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 10 10:51:00 PDT 2019
asb accepted this revision.
asb added a comment.
This revision is now accepted and ready to land.
Many thanks for this. I've added some minor formatting and comment phrasing nits, but otherwise this is looking good to me.
================
Comment at: lib/CodeGen/AsmPrinter/AsmPrinter.cpp:260
+ const_cast<TargetLoweringObjectFile&>(getObjFileLowering())
+ .getModuleMetadata(M);
----------------
clang-format prefers `const_cast<TargetLoweringObjectFile &>`
================
Comment at: lib/Target/RISCV/RISCVTargetObjectFile.cpp:91
+
+ for (const auto &MFE: ModuleFlags) {
+ StringRef Key = MFE.Key->getString();
----------------
Style: should be `auto &MFE : ModuleFlags`
================
Comment at: test/CodeGen/RISCV/sdata-limit-0.ll:7
+
+; SmallDataLimit set to 0, so we expect not data will put in sbss and sdata.
+!llvm.module.flags = !{!0}
----------------
"so we expect no data will be put in sbss or sdata."
================
Comment at: test/CodeGen/RISCV/sdata-limit-4.ll:7
+
+; SmallDataLimit set to 4, so we expect @v will put in sbss,
+; but @r won't put in sdata
----------------
"`@v will be put in sbss, but @r won't be put in sdata`"
================
Comment at: test/CodeGen/RISCV/sdata-limit-8.ll:7
+
+; SmallDataLimit set to 8, so we expect @v will put in sbss
+; and @r will put in sdata,
----------------
"`@v will be put in sbss and @r will be put in sdata`"
================
Comment at: test/CodeGen/RISCV/sdata-local-sym.ll:8
+; @v and @r are local symbols.
+; SmallDataLimit set to 8, so we expect @v will put in sbss
+; and @r will put in sdata,
----------------
"`@v will b put in sbss and @r will be put in sdata`"
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57493/new/
https://reviews.llvm.org/D57493
More information about the llvm-commits
mailing list