diff options
author | Hal Finkel <hfinkel@anl.gov> | 2014-03-13 07:57:54 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2014-03-13 07:57:54 +0000 |
commit | 79c15b23c9c67f306d4d4514b46b2d006d2049d4 (patch) | |
tree | f2496bdc4bb164657ca45e64a50df49ee2f04a8f /include/llvm/Target/Target.td | |
parent | 72df68895059f778ae2f6b1264fc98415133b66e (diff) | |
download | llvm-79c15b23c9c67f306d4d4514b46b2d006d2049d4.tar.gz llvm-79c15b23c9c67f306d4d4514b46b2d006d2049d4.tar.bz2 llvm-79c15b23c9c67f306d4d4514b46b2d006d2049d4.tar.xz |
[TableGen] Optionally forbid overlap between named and positional operands
There are currently two schemes for mapping instruction operands to
instruction-format variables for generating the instruction encoders and
decoders for the assembler and disassembler respectively: a) to map by name and
b) to map by position.
In the long run, we'd like to remove the position-based scheme and use only
name-based mapping. Unfortunately, the name-based scheme currently cannot deal
with complex operands (those with suboperands), and so we currently must use
the position-based scheme for those. On the other hand, the position-based
scheme cannot deal with (register) variables that are split into multiple
ranges. An upcoming commit to the PowerPC backend (adding VSX support) will
require this capability. While we could teach the position-based scheme to
handle that, since we'd like to move away from the position-based mapping
generally, it seems silly to teach it new tricks now. What makes more sense is
to allow for partial transitioning: use the name-based mapping when possible,
and only use the position-based scheme when necessary.
Now the problem is that mixing the two sensibly was not possible: the
position-based mapping would map based on position, but would not skip those
variables that were mapped by name. Instead, the two sets of assignments would
overlap. However, I cannot currently change the current behavior, because there
are some backends that rely on it [I think mistakenly, but I'll send a message
to llvmdev about that]. So I've added a new TableGen bit variable:
noNamedPositionallyEncodedOperands, that can be used to cause the
position-based mapping to skip variables mapped by name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/Target.td')
-rw-r--r-- | include/llvm/Target/Target.td | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Target/Target.td b/include/llvm/Target/Target.td index 59c0a6abe1..facb89ade6 100644 --- a/include/llvm/Target/Target.td +++ b/include/llvm/Target/Target.td @@ -697,6 +697,15 @@ class InstrInfo { // generator has better support for complex operands and targets have // migrated away from using positionally encoded operands. bit decodePositionallyEncodedOperands = 0; + + // When set, this indicates that there will be no overlap between those + // operands that are matched by ordering (positional operands) and those + // matched by name. + // + // This option is temporary; it will go away once the TableGen decoder + // generator has better support for complex operands and targets have + // migrated away from using positionally encoded operands. + bit noNamedPositionallyEncodedOperands = 0; } // Standard Pseudo Instructions. |