summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/CodeGen.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-10-03 16:25:48 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-10-03 16:25:48 +0000
commitc804bf9397895341858d12e4724d7374cc4cd701 (patch)
tree71571850faef98119a02ed8a067367aa7c54ca98 /llvm/lib/CodeGen/CodeGen.cpp
parent6e182fbab46d61ea6bef31719fb4524dac85ae9f (diff)
downloadbcm5719-llvm-c804bf9397895341858d12e4724d7374cc4cd701.tar.gz
bcm5719-llvm-c804bf9397895341858d12e4724d7374cc4cd701.zip
Use sched_getaffinity instead of std::thread::hardware_concurrency.
The issue with std::thread::hardware_concurrency is that it forwards to libc and some implementations (like glibc) don't take thread affinity into consideration. With this change a llvm program that can execute in only 2 cores will use 2 threads, even if the machine has 32 cores. This makes benchmarking a lot easier, but should also help if someone doesn't want to use all cores for compilation for example. llvm-svn: 314810
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud