[PATCH] [TableGen] Add alternative register matching support to AsmMatcher

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Jun 16 19:21:27 PDT 2015

+Jim, Owen

Don’t we already have a mechanism for register name aliases, or am I mistaken?

> On Jun 16, 2015, at 8:08 AM, Dylan McKay <dylanmckay34 at gmail.com> wrote:
> This commit adds a new flag ShouldEmitMatchRegisterAltName to
> include/Target/Target.td, and generates an alternative register name matching function named MatchRegisterAlias to the generated AsmMatcher if it is enabled.
> Backends can use this to parse alternative register names based on values stored
> in TableGen files. The AVR-LLVM <https://github.com/avr-llvm/llvm> project is using this function to parse special pointer registers, identified by X, Y, and Z, which are alternative names to the GPR pairs r27:r26, r29:r28, and r31:r30.
> Files changed:
> include/Target/Target.td
> utils/TableGen/AsmMatcherEmitter.cpp
> <0001-TableGen-Add-MatchRegisterAltName-to-AsmMatcher.patch>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150616/3dfdf48e/attachment.html>

More information about the llvm-commits mailing list