[Legalizer] Only allocate the SetVectors once per function.
authorQuentin Colombet <qcolombet@apple.com>
Fri, 13 Oct 2017 21:16:05 +0000 (21:16 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Fri, 13 Oct 2017 21:16:05 +0000 (21:16 +0000)
commit35a6ebd9c8138e7c12134afacc19b622ffc52133
tree2d408d4c5e4945e5480ceb774e6fd6651730e037
parent93f0e0c1d118ec2f7fb84050c9810e9e6846d438
[Legalizer] Only allocate the SetVectors once per function.

Prior to this patch we used to create SetVectors in temporaries that
were created and destroyed for each instruction. Now, instead we create
and destroyed them only once, but clear the content for each
instruction.
This speeds up the pass by ~25%.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315756 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/GlobalISel/Legalizer.cpp