This is an archive of the discontinued LLVM Phabricator instance.

[tablegen] Resolve complex def identifiers when instanciating multiclass
ClosedPublic

Authored by deadalnix on May 3 2015, 7:47 PM.

Details

Summary

Complex name paterns are not handled properly in multiclass delcarations. This diff makes it work.

I have no idea what Chris Lattner or Daved Greene phab account are :/

Diff Detail

Event Timeline

deadalnix updated this revision to Diff 24868.May 3 2015, 7:47 PM
deadalnix retitled this revision from to [tablegen] Resolve complex def identifiers when instanciating multiclass.
deadalnix updated this object.
deadalnix edited the test plan for this revision. (Show Details)
deadalnix added a reviewer: chandlerc.
deadalnix added a subscriber: Unknown Object (MLST).
hfinkel added a subscriber: hfinkel.May 5 2015, 3:26 PM
hfinkel added inline comments.
lib/TableGen/TGParser.cpp
2391

If so, resolve it.

2398

Line is too long.

2407

option -> options

test/TableGen/MultiClassDefName.td
47

Can you please add a test with both a strong concatenation and also a concatenation with NAME?

silvas added a subscriber: silvas.May 6 2015, 2:16 PM

What do you need this for?

test/TableGen/MultiClassDefName.td
47

Also, the case where the template argument is a complex type. E.g.:

multiclass MC3<Foo f> {
  def ZFizz#f.s : C<f.s>;
}
deadalnix updated this revision to Diff 25122.May 6 2015, 8:49 PM

Style change as per @hfinkel request.
Added requested test cases.

deadalnix added inline comments.
lib/TableGen/TGParser.cpp
2391

Well that why we have plenty of green code below.

test/TableGen/MultiClassDefName.td
47

What do you mean by strong concatenation ?

hfinkel added inline comments.May 7 2015, 7:03 AM
lib/TableGen/TGParser.cpp
2391

No, I meant please reword the comment from

// If yes, resolve !

to

// If so, resolve it.
test/TableGen/MultiClassDefName.td
47

Was a typo. I meant string concatenation.

def NAME#ZFizz#f.s
hfinkel accepted this revision.May 14 2015, 12:20 PM
hfinkel edited edge metadata.

LGTM.

This revision is now accepted and ready to land.May 14 2015, 12:20 PM
deadalnix updated this revision to Diff 25919.May 16 2015, 12:47 PM
deadalnix edited edge metadata.

Rebase, also, can someone with merge right can emrge this ?

Ping, can we get this merged ?

hfinkel closed this revision.May 20 2015, 9:37 PM

r237877