This is an archive of the discontinued LLVM Phabricator instance.

Fix per-processor model scheduler definition completeness check
ClosedPublic

Authored by uweigand on Oct 31 2016, 9:50 AM.

Details

Summary

The CodeGenSchedModels::checkCompleteness routine in TableGen/CodeGenSchedule.cpp is supposed to verify for each processor model that is marked as "complete" that it actually defines a scheduling class for each instruction.

However, we had noticed a while ago (as pointed out in comments to D17260), that this doesn't actually appear to work. I've now identified the reason for this:

if (SC.ItinClassDef != nullptr)
  continue;

This is apparently supposed to skip the processor model verification if the scheduling class defines an itinerary. However, the SC.ItinClassDef pointer never seems to be null; instead, for scheduling classes without itinerary, it points to a special "NoItinerary" record. Other places in the code check for that record instead.

By changing checkCompleteness to do the same, the completeness check now works. (It actually found a couple of problems in the SystemZ back-end, which have now been fixed in commits 288576 and 288577.

Diff Detail

Event Timeline

uweigand updated this revision to Diff 76436.Oct 31 2016, 9:50 AM
uweigand retitled this revision from to Fix per-processor model scheduler definition completeness check.
uweigand updated this object.
uweigand added a reviewer: atrick.
uweigand added a subscriber: jonpa.
atrick accepted this revision.Oct 31 2016, 10:16 AM
atrick edited edge metadata.

Thanks. This is great, as long as you tested all in-tree targets.

This revision is now accepted and ready to land.Oct 31 2016, 10:16 AM

Yes, the in-tree targets all look good.

This revision was automatically updated to reflect the committed changes.