[PATCH] D149288: [X86] Introduce a large data threshold for the medium code model

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 13:49:08 PDT 2023


MaskRay added inline comments.


================
Comment at: llvm/lib/CodeGen/CommandFlags.cpp:168
+      cl::desc("Choose large data threshold for x86_64 medium code model"),
+      cl::init(0));
+  CGBINDOPT(LargeDataThreshold);
----------------
aeubanks wrote:
> MaskRay wrote:
> > To match GCC, we can use 65536
> > 
> > Consider applying this to large code model as well.
> > 
> > https://gcc.gnu.org/pipermail/gcc-patches/2023-May/619695.html
> changes to this value will come in a later patch, and same for making the large code model respect this value
This seems strange. Introducing this variable and setting it to an appropriate should come in the same patch, no ?

I don't want `clang -mcmodel=medium` emitted data sections for small objects to change from `.data` to `.ldata`, then to `.data` again.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149288



More information about the llvm-commits mailing list