]> granicus.if.org Git - llvm/commit
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)
commitcd091def41f06747fbeb08fe5e6fe3f34cb8eed4
treeffc08dff7a4bf6b5ddd760b587951c2ef1b5d2db
parentfb3e023000c464bf76a51e96798cc52a676f2eed
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371136 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/GCNSchedStrategy.cpp
lib/Target/AMDGPU/GCNSchedStrategy.h