This is an archive of the discontinued LLVM Phabricator instance.

[globalisel] Prevent infinite recursion in register bank emitter.
ClosedPublic

Authored by dsanders on Jan 26 2017, 6:51 AM.

Details

Reviewers
rovka

Event Timeline

dsanders created this revision.Jan 26 2017, 6:51 AM
rovka accepted this revision.Jan 27 2017, 3:58 AM

Ugh, hasSubClass looks a lot less friendly now, but it's probably too late to change terminology. I think it would be wise to add a comment to hasSubClass's documentation saying that it's not necessarily anti-symmetric, to avoid this kind of issue in the future.
/end rant

LGTM.

test/TableGen/RegisterBankEmitter.td
11

Nitpick: were you going to use Size instead of 32 here? :)

This revision is now accepted and ready to land.Jan 27 2017, 3:58 AM

I haven't posted this to the list yet since I created it to illustrate an alternative solution to D29049 and I've taken bits of Tom's patch without asking. If it solves his problem then he can either update his patch or he can give me permission to use the bit I took from his patch in which case I'll re-post to the list.

test/TableGen/RegisterBankEmitter.td
11

It's setting RegisterClass.Size on both ClassA and ClassB which isn't available from the parameter list (the third argument is the alignment).

rovka added a comment.Jan 27 2017, 4:24 AM

Ah, sorry, didn't see that one. I'll let you 2 sort it out then.

No worries. Thanks for the review

dsanders closed this revision.Jan 30 2017, 3:34 AM