summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2017-03-24 14:11:47 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2017-03-24 14:11:47 +0000
commitc06d672a7a9f7332c8dba7bfca4e792bb2bd3c28 (patch)
tree887dd64d318936d3ce6434939058502019f416ed /llvm/lib/Target/AMDGPU
parent546c4438d57052e97d047c463b69b9e4a5c67001 (diff)
downloadbcm5719-llvm-c06d672a7a9f7332c8dba7bfca4e792bb2bd3c28.tar.gz
bcm5719-llvm-c06d672a7a9f7332c8dba7bfca4e792bb2bd3c28.zip
Don't build up std::vectors with constant sizes when an array suffices.
NFC. llvm-svn: 298701
Diffstat (limited to 'llvm/lib/Target/AMDGPU')
-rw-r--r--llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp b/llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp
index da86bbf9dd2..bd3e46db047 100644
--- a/llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp
+++ b/llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp
@@ -1825,7 +1825,9 @@ void SIScheduleDAGMI::schedule()
// if VGPR usage is extremely high, try other good performing variants
// which could lead to lower VGPR usage
if (Best.MaxVGPRUsage > 180) {
- std::vector<std::pair<SISchedulerBlockCreatorVariant, SISchedulerBlockSchedulerVariant>> Variants = {
+ static constexpr std::pair<SISchedulerBlockCreatorVariant,
+ SISchedulerBlockSchedulerVariant>
+ Variants[] = {
{ LatenciesAlone, BlockRegUsageLatency },
// { LatenciesAlone, BlockRegUsage },
{ LatenciesGrouped, BlockLatencyRegUsage },
@@ -1844,7 +1846,9 @@ void SIScheduleDAGMI::schedule()
// if VGPR usage is still extremely high, we may spill. Try other variants
// which are less performing, but that could lead to lower VGPR usage.
if (Best.MaxVGPRUsage > 200) {
- std::vector<std::pair<SISchedulerBlockCreatorVariant, SISchedulerBlockSchedulerVariant>> Variants = {
+ static constexpr std::pair<SISchedulerBlockCreatorVariant,
+ SISchedulerBlockSchedulerVariant>
+ Variants[] = {
// { LatenciesAlone, BlockRegUsageLatency },
{ LatenciesAlone, BlockRegUsage },
// { LatenciesGrouped, BlockLatencyRegUsage },
OpenPOWER on IntegriCloud