This is an archive of the discontinued LLVM Phabricator instance.

[mips] Split Instruction.Predicates into smaller lists and re-join them with !listconcat
ClosedPublic

Authored by dsanders on Apr 29 2014, 10:31 AM.

Details

Summary

The overall idea is to chop the Predicates list into subsets that are
usually overridden independently. This allows subclasses to partially
override the predicates of their superclasses without having to re-add all
the existing predicates.

This patch starts the process by moving HasStdEnc into a new
EncodingPredicates list and almost everything else into
AdditionalPredicates.

It has revealed a couple likely bugs where 'let Predicates' has removed
the HasStdEnc predicate.

No functional change (confirmed by diffing tablegen-erated files).

Depends on D3549, D3506

Diff Detail

Event Timeline

dsanders updated this revision to Diff 8935.Apr 29 2014, 10:31 AM
dsanders retitled this revision from to [mips] Split Instruction.Predicates into smaller lists and re-join them with !listconcat.
dsanders updated this object.
dsanders edited the test plan for this revision. (Show Details)
dsanders added a reviewer: vmedic.
dsanders updated this revision to Diff 8936.Apr 29 2014, 10:39 AM
  • Do the Requires<> lists as well
dsanders updated this revision to Diff 8937.Apr 29 2014, 10:40 AM

Undo the accidental inclusion of the depends-on patches.

vmedic edited edge metadata.Apr 30 2014, 2:52 AM

The patch looks good to me, and I think the idea to combine predicates is right, I'm surprised this hasn't been done by default. That said, it would probably be the best for PredicateControl class to be in target independent td file, if it is plausible without changing other targets.

I agree that PredicateControl makes sense as a target independent definition used in Instruction, InstAlias, Pat, etc. Would you agree that it's best to try to move it there later?

vmedic added a comment.EditedMay 7 2014, 3:40 AM

I would agree on that since there's no functional difference, but we must keep a reminder to do that.

Ok then. I've put a reminder ticket into our internal bugzilla so we don't forget it.

dsanders accepted this revision.May 7 2014, 7:52 AM
dsanders added a reviewer: dsanders.
This revision is now accepted and ready to land.May 7 2014, 7:52 AM
dsanders closed this revision.May 7 2014, 7:52 AM