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

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 13:40:06 PDT 2023


aeubanks created this revision.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently clang's medium code model treats all data as large, putting them in a large data section and using more expensive instruction sequences to access them.

Following gcc's -mlarge-data-threshold, which allows putting data under a certain size in a normal data section as opposed to a large data section. This allows using cheaper code sequences to access some portion of data in the binary (which will be implemented in LLVM in a future patch).

And under the medium codel mode, only put data above the large data threshold into large data sections, not all data.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149288

Files:
  llvm/include/llvm/CodeGen/CommandFlags.h
  llvm/include/llvm/Target/TargetMachine.h
  llvm/lib/CodeGen/CommandFlags.cpp
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/lib/Target/TargetMachine.cpp
  llvm/test/CodeGen/X86/code-model-elf-sections.ll
  llvm/tools/llc/llc.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149288.517301.patch
Type: text/x-patch
Size: 6062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230426/613b423f/attachment-0001.bin>


More information about the llvm-commits mailing list