diff options
| author | Arthur Eubanks <aeubanks@google.com> | 2024-01-12 13:23:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-12 12:23:42 -0800 |
| commit | f05b0812145897ba34bc2d7fda436a54f9fbca22 (patch) | |
| tree | fd5c82b3eba0d34953a2d473574f60405ab81260 /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | 1048b5999b4b1c970f3b454040d4352770e5cf5c (diff) | |
[clang] Adjust -mlarge-data-threshold handling (#77958)
Make it apply to x86-64 medium and large code models since that's what
the backend does.
Limit logic to exclude x86-32.
Default to 0, let the driver set it to 65536 for the medium code model
if one is not passed. Set it to 0 for the large code model by default to
match gcc and since some users make assumptions about the large code
model that any small data will break.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index ad6fc71c1e50..0cfe7a0133b7 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1201,7 +1201,7 @@ void CodeGenModule::Release() { llvm::CodeModel::Model codeModel = static_cast<llvm::CodeModel::Model>(CM); getModule().setCodeModel(codeModel); - if (CM == llvm::CodeModel::Medium && + if ((CM == llvm::CodeModel::Medium || CM == llvm::CodeModel::Large) && Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86_64) { getModule().setLargeDataThreshold(getCodeGenOpts().LargeDataThreshold); |
