This is an archive of the discontinued LLVM Phabricator instance.

[TableGen] Make sure !if() is propagated across class inheritance.
ClosedPublic

Authored by tra on Jan 30 2018, 10:07 AM.

Details

Summary

Without the patch !if() is only evaluated if it's used directly. If it's passed through more than one level of class inheritance, we end up with a reference to an anonymous record with unresolved references to the original arguments !if may have used.

The root cause of the problem is that TernOpInit::isComplete() was always returning false and that prevented use of the folded value of !if() as an initializer for the record at the next level of inheritance.

Diff Detail

Repository
rL LLVM

Event Timeline

tra created this revision.Jan 30 2018, 10:07 AM
tra updated this revision to Diff 131996.Jan 30 2018, 10:10 AM

edited a comment.

arsenm accepted this revision.Jan 30 2018, 10:16 AM
arsenm added a subscriber: arsenm.

LGTM

This revision is now accepted and ready to land.Jan 30 2018, 10:16 AM
This revision was automatically updated to reflect the committed changes.