[llvm] [X86] Place data in large sections for large code model (PR #70265)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 17 15:47:00 PST 2023
================
@@ -42,9 +42,8 @@ TargetMachine::~TargetMachine() = default;
bool TargetMachine::isLargeData(const GlobalVariable *GV) const {
if (getTargetTriple().getArch() != Triple::x86_64 || GV->isThreadLocal())
return false;
- // Large data under the large code model still needs to be thought about, so
- // restrict this to medium.
- if (getCodeModel() != CodeModel::Medium)
+
+ if (getCodeModel() != CodeModel::Medium && getCodeModel() != CodeModel::Large)
----------------
aeubanks wrote:
we're relying on the frontend to set the large data threshold in `TargetMachine`, otherwise it's just 0
gcc currently defaults to 65536 as the large data threshold for the large code model
https://github.com/llvm/llvm-project/pull/70265
More information about the llvm-commits
mailing list