Skip to content

Commit e999785

Browse files
committed
Use 8 as default value
1 parent 6db0c7d commit e999785

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

clang/lib/Driver/ToolChains/AMDGPU.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include "llvm/Support/LineIterator.h"
2222
#include "llvm/Support/Path.h"
2323
#include "llvm/Support/Process.h"
24-
#include "llvm/Support/Threading.h"
2524
#include "llvm/Support/VirtualFileSystem.h"
2625
#include "llvm/TargetParser/Host.h"
2726
#include <optional>
@@ -714,11 +713,9 @@ void amdgpu::getAMDGPUTargetFeatures(const Driver &D,
714713

715714
static unsigned getFullLTOPartitions(const Driver &D, const ArgList &Args) {
716715
const Arg *A = Args.getLastArg(options::OPT_flto_partitions_EQ);
717-
// In the absence of an option, use the number of available threads with a cap
718-
// at 16 partitions. More than 16 partitions rarely benefits code splitting
719-
// and can lead to more empty/small modules each with their own overhead.
716+
// In the absence of an option, use 8 as the default.
720717
if (!A)
721-
return std::min(16u, llvm::hardware_concurrency().compute_thread_count());
718+
return 8;
722719
int Value = 0;
723720
if (StringRef(A->getValue()).getAsInteger(10, Value) || (Value < 1)) {
724721
D.Diag(diag::err_drv_invalid_int_value)

0 commit comments

Comments
 (0)