This is an archive of the discontinued LLVM Phabricator instance.

[globalisel][tablegen] Import rules containing intrinsic_wo_chain.
ClosedPublic

Authored by dsanders on Apr 20 2017, 2:03 AM.

Event Timeline

dsanders created this revision.Apr 20 2017, 2:03 AM
ab added inline comments.Apr 20 2017, 10:31 AM
utils/TableGen/GlobalISelEmitter.cpp
1365

This seems very lax:

  • it's not only accepting intrinsic IDs, but also any oddly-typed immediate
  • it accepts the oddly-typed immediate in any position, not just the first

right?

Maybe special-case this in createAndImportSelDAGMatcher instead?

dsanders added inline comments.Apr 20 2017, 11:06 AM
utils/TableGen/GlobalISelEmitter.cpp
1365

My thinking was that it also covered oddly typed integers that were manually written in a pattern (I don't have a particular pattern in mind though). From that perspective, the comment is badly worded since it suggests it's only for intrinsics.

I'm happy to hoist it out and make it more precise or to fix the comment. Do you have a preference?

ab added inline comments.Apr 20 2017, 11:29 AM
utils/TableGen/GlobalISelEmitter.cpp
1365

I can't think of any such patterns either, so I'd err on the side of caution and hoist it out?

dsanders added inline comments.Apr 20 2017, 11:47 AM
utils/TableGen/GlobalISelEmitter.cpp
1365

Ok

dsanders updated this revision to Diff 97843.May 4 2017, 10:03 AM

Refresh patch

dsanders updated this revision to Diff 97845.May 4 2017, 10:09 AM

Hoist out the checks for intrinsic id's so that they are only importable when
found in the place we expect them to be.

dsanders marked 4 inline comments as done.May 4 2017, 10:10 AM
This revision is now accepted and ready to land.May 12 2017, 2:06 PM
dsanders closed this revision.May 17 2017, 6:53 AM
dsanders reopened this revision.Jun 1 2017, 3:22 AM

This was reverted due to compile-time regressions so re-open it and add it to the end of the patch series that fixes that.

This revision is now accepted and ready to land.Jun 1 2017, 3:22 AM
dsanders closed this revision.Jul 6 2017, 1:12 AM