Page MenuHomePhabricator

[TableGen] Resolve concrete but not complete field access initializers
ClosedPublic

Authored by dsanders on Apr 10 2021, 8:03 PM.

Details

Summary

This fixes the resolution of Rec10.Zero in ListSlices.td.

As part of this, correct the definition of complete for ListInit such that
it's complete iff all the elements in the list are complete rather than
always being complete regardless of the elements. This is the reason
Rec10.TwoFive from ListSlices.td previously resolved despite being
incomplete like Rec10.Zero was

Depends on D100247

Diff Detail

Event Timeline

dsanders created this revision.Apr 10 2021, 8:03 PM
dsanders requested review of this revision.Apr 10 2021, 8:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 10 2021, 8:03 PM
dsanders added inline comments.Apr 10 2021, 8:08 PM
llvm/lib/TableGen/Record.cpp
658

One thing to mention about this function. Downstream, our test for this uses our !iscomplete() predicate but I'm not aware of a good way to test this upstream as the FieldInit::Fold change means it no longer controls whether FieldInit's successfully resolve.

I presume you ran all the TableGen tests and they pass?

Yep, ./bin/llvm-lit -svv ../llvm-project/llvm/test/TableGen and ninja check passes

I just pushed my bug fix. Let's wait a day until I know it doesn't bust the build, then push this one.

This revision is now accepted and ready to land.Apr 12 2021, 6:47 AM

I just pushed my bug fix. Let's wait a day until I know it doesn't bust the build, then push this one.

Sounds good to me, thanks. I've also unreverted the original downstream and applied your fix there too.