[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)
commit989d94ddde604503b29098e7e9430bfe7baa588a
tree52ef24b825a41c132f02e4d0278db4c4e21172f5
parent4d7bde068f54129e0064ddf63ae9fa39c23f269c
[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.

llvm-svn: 328142
llvm/utils/TableGen/CodeGenSchedule.cpp