[PATCH] D57493: [RISCV] Put data smaller than eight bytes to small data section

Shiva Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 29 02:34:14 PDT 2019


shiva0217 marked 2 inline comments as done.
shiva0217 added inline comments.


================
Comment at: lib/Target/RISCV/RISCVTargetObjectFile.cpp:17
 
+static unsigned SSThreshold = 8;
+
----------------
apazos wrote:
> efriedma wrote:
> > This isn't thread-safe.
> We can put it in RISCVELFTargetObjectFile just like SmallDataSection and SmallBSSSection
> 
Hi Eli and Ana, thanks for the guidance, I'll put SSThreshold in RISCVELFTargetObjectFile.


================
Comment at: lib/Target/RISCV/RISCVTargetObjectFile.cpp:63
+  if (GVA->hasLocalLinkage())
+    return false;
+
----------------
efriedma wrote:
> We never put variables with internal linkage into a small data section? That seems a little weird.
We should handle internal linkage as well, thanks for the catch.


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