[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:12:13 PDT 2023


MaskRay added inline comments.


================
Comment at: llvm/tools/llc/llc.cpp:599
       Target->setCodeModel(*CM_IR);
+    if (auto LDT = codegen::getExplicitLargeDataThreshold())
+      Target->setLargeDataThreshold(*LDT);
----------------
tkoeppe wrote:
> Can we avoid the implicit check for 0 here and spell out `; LDT > 0`? Does LLVM require C++17?
Building llvm-project requires c++17 (libomptarget may be an exception).

We can use `if (auto LDT = ...; LDT && LDT > 0)` only if the default is 0.


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