[llvm] [X86] Change how we treat functions with explicit sections as small/large (PR #88172)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 21:59:12 PDT 2024


================
@@ -43,6 +43,9 @@ bool TargetMachine::isLargeGlobalValue(const GlobalValue *GVal) const {
   if (getTargetTriple().getArch() != Triple::x86_64)
     return false;
 
+  if (!getTargetTriple().isOSBinFormatELF())
----------------
rnk wrote:

Please add a comment about what's going on here. Essentially, all the logic below is ELF-specific. The large code model is supported with other object file formats mainly for the benefit of JIT compilation, and for that we fall back to the global code model option.

https://github.com/llvm/llvm-project/pull/88172


More information about the llvm-commits mailing list