This is an archive of the discontinued LLVM Phabricator instance.

[gicombiner] Add the boring boilerplate for the declarative combiner
ClosedPublic

Authored by dsanders on Oct 1 2019, 11:42 AM.

Details

Summary

This is the first of a series of patches extracted from a much bigger WIP
patch. It merely establishes the tblgen pass and the way empty combiner
helpers are declared and integrated into a combiner info.

The tablegen pass takes a -combiners option to select the combiner helper
that will be generated. This can be given multiple values to generate
multiple combiner helpers at once. Doing so helps to minimize parsing
overhead.

The reason for creating a GlobalISel subdirectory in utils/TableGen is that
there will be quite a lot of non-pass files (~15) by the time the patch
series is done.

Event Timeline

dsanders created this revision.Oct 1 2019, 11:42 AM
volkan accepted this revision.Oct 1 2019, 11:57 AM

LGTM with a nit.

llvm/utils/TableGen/TableGen.cpp
66

Nit: Irrelevant formatting changes in this file.

This revision is now accepted and ready to land.Oct 1 2019, 11:57 AM

Thanks. I ran into a linking issue a few patches later which required me to move GICombinerEmitter.cpp out of the subdirectory so to avoid churn I'm going to postpone creating that subdirectory until the CodeEmitter patch

This revision was automatically updated to reflect the committed changes.

This broke the windows build: http://lab.llvm.org:8011/buildslaves/win-py3-buildbot. There was already a test broken from earlier today, so you might not have gotten an email.

This broke the windows build: http://lab.llvm.org:8011/buildslaves/win-py3-buildbot. There was already a test broken from earlier today, so you might not have gotten an email.

Thanks, I'll take a look. A couple other windows bots also failed and the stack traces are a bit odd

My theory as to what the stack trace was talking about (failure to find the tablegen record) seems to be correct as fixing that changed the failure to:

error: Could not find 'AArch64PreLegalizerCombinerHelper'

but that's really strange because it's definitely defined in AArch64Combiner.td which is included from AArch64.td as shown in the commit https://reviews.llvm.org/rL373527 and many other bots were able to find it. Are you able to view the filesystem for http://lab.llvm.org:8011/buildslaves/win-py3-buildbot and confirm that these files are the same as in the commit?

I believe I've found the problem:

error: Could not find 'AArch64PreLegalizerCombinerHelper'

Those single quotes aren't added by the error message. It seems Windows passed them into llvm-tblgen in argv

Thanks for taking care of this!