This is an archive of the discontinued LLVM Phabricator instance.

Add way to test for builtin TargetOpcode
ClosedPublic

Authored by arsenm on Aug 28 2015, 6:20 PM.

Details

Reviewers
ab
Summary

The alternative would be to add a bit to the target's InstrFlags but that seems like a waste of a bit.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 33505.Aug 28 2015, 6:20 PM
arsenm retitled this revision from to Add way to test for builtin TargetOpcode.
arsenm updated this object.
arsenm added a subscriber: llvm-commits.
ab accepted this revision.Oct 1 2015, 5:35 PM
ab added a reviewer: ab.
ab added a subscriber: ab.

With '<' -> '<=', seems reasonable.

Can you add a comment? I'm not sure we refer to these as "builtins" anywhere else (not that I have a better name though).

include/llvm/Target/TargetInstrInfo.h
65

<= ?

This revision is now accepted and ready to land.Oct 1 2015, 5:35 PM
MatzeB added a subscriber: MatzeB.Oct 1 2015, 6:29 PM

Maybe talk about shared opcodes or generic opcodes to indicate they are not target-specific.

In D12464#258300, @ab wrote:

With '<' -> '<=', seems reasonable.

Can you add a comment? I'm not sure we refer to these as "builtins" anywhere else (not that I have a better name though).

I got this from the BUILTIN_OP_END. The comment at the start of the enum calls these "Invariant opcodes" but that doesn't sound good. How about isGenericOpcode()?

arsenm closed this revision.Oct 2 2015, 12:00 PM

r249169 as isGenericOpcode