OSDN Git Service

[TableGen] Hoist the code for copying InstRWs from an old scheduling class to a new...
authorCraig Topper <craig.topper@intel.com>
Wed, 21 Mar 2018 19:52:13 +0000 (19:52 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 21 Mar 2018 19:52:13 +0000 (19:52 +0000)
commit6790638696e8730c36392104f96c4fbfad5120e0
treed8236a5709edd12c79e77befee02e42e87eab21b
parentdbce663d7fcd2852656e85365349d800b7655834
[TableGen] Hoist the code for copying InstRWs from an old scheduling class to a new one out of the loop that assigns instructions to the new class. NFCI

We already know all the of instructions we're processing in the instruction loop belong to no class or all to the same class. So we only have to worry about remapping one class. So hoist it all out and remove the SmallPtrSet that tracked which class we'd already remapped.

I had to introduce new instruction loop inside this code to print an error message, but that only occurs on the error path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328142 91177308-0d34-0410-b5e6-96231b3b80d8
utils/TableGen/CodeGenSchedule.cpp