AMDGPU: Avoid constructing new std::vector in initCandidate
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 5 Sep 2019 22:44:06 +0000 (22:44 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 5 Sep 2019 22:44:06 +0000 (22:44 +0000)
commitf54daffc2d73866312e6f50b75fe15035e62b4e8
tree828fbb8a0ade62ef05e8c3176ff5ba31bf2efd1e
parent3e144ab7fd0fb516b4819504aa423a70cd6732e9
AMDGPU: Avoid constructing new std::vector in initCandidate

Approximately 30% of the time was spent in the std::vector
constructor. In one testcase this pushes the scheduler to being the
second slowest pass.

I'm not sure I understand why these vector are necessary. The default
scheduler initCandidate seems to use some pre-existing vectors for the
pressure.

llvm-svn: 371136
llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
llvm/lib/Target/AMDGPU/GCNSchedStrategy.h