Page MenuHomePhabricator

[mlir-tblgen] Use fully qualified names in generated code files
ClosedPublic

Authored by Kayjukh on Jun 24 2020, 8:38 AM.

Details

Summary

Using fully qualified names wherever possible avoids ambiguous class and function names. This is a follow-up to D82371.

Diff Detail

Event Timeline

Kayjukh created this revision.Jun 24 2020, 8:38 AM
Herald added a project: Restricted Project. · View Herald Transcript

Not sure why clang-tidy complains about EnumsGenTest.h.inc here.

rriddle requested changes to this revision.Jun 24 2020, 5:25 PM
rriddle added inline comments.
mlir/include/mlir/IR/OpBase.td
220–221

Please go through and make sure everything is wrapped at 80 characters.

This revision now requires changes to proceed.Jun 24 2020, 5:25 PM
Kayjukh updated this revision to Diff 273267.Jun 25 2020, 2:08 AM

Make sure that OpBase.td is wrapped at 80 characters.

Kayjukh marked an inline comment as done.Jun 25 2020, 2:13 AM

I'm wondering how hard it would be to have a linter check for TableGen files that reports whether there are lines longer than 80 characters. This could be useful for such situations: I had to change some locations in OpBase.td that went unnoticed during earlier reviews (e.g. the constBuilderCall for I32EnumAttr).

rriddle accepted this revision.Jun 25 2020, 1:18 PM

LGTM after making sure that LLVM types use the proper llvm namespace.

mlir/tools/mlir-tblgen/PassGen.cpp
45

Please use the proper definition in LLVM for LLVM types.

This revision is now accepted and ready to land.Jun 25 2020, 1:18 PM
Kayjukh marked an inline comment as done.Jun 26 2020, 6:07 AM
This revision was automatically updated to reflect the committed changes.