OSDN Git Service

Extend AsmMatcher token literal matching to allow aliasing.
authorJim Grosbach <grosbach@apple.com>
Tue, 6 Dec 2011 23:43:54 +0000 (23:43 +0000)
committerJim Grosbach <grosbach@apple.com>
Tue, 6 Dec 2011 23:43:54 +0000 (23:43 +0000)
commita66512e59142f36ae653460891c058d5e78e07e3
treeed54e25d590eb44242499be11d3bb4d54916573c
parentf8de54f37be57e5d27889bbfb26ecda602700566
Extend AsmMatcher token literal matching to allow aliasing.

For example, ARM allows:
    vmov.u32 s4, #0  -> vmov.i32, #0
'u32' is a more specific designator for the 32-bit integer type specifier
and is legal for any instruction which accepts 'i32' as a datatype suffix.

We want to say,
    def : TokenAlias<".u32", ".i32">;

This works by marking the match class of 'From' as a subclass of the
match class of 'To'.

rdar://10435076

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145992 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/Target.td
utils/TableGen/AsmMatcherEmitter.cpp