Add PPC instruction record forms and associated query functions
authorHal Finkel <hfinkel@anl.gov>
Fri, 12 Apr 2013 02:18:09 +0000 (02:18 +0000)
committerHal Finkel <hfinkel@anl.gov>
Fri, 12 Apr 2013 02:18:09 +0000 (02:18 +0000)
commit171a8adf3168aee2f739f91c1800e9025892c7b5
treebcc99908b0c724e7d723e950db919cc1850524da
parent33a47d66e9f9126017d051bfba35cb9be6609b3e
Add PPC instruction record forms and associated query functions

This is prep. work for the implementation of optimizeCompare. Many PPC
instructions have 'record' forms (in almost all cases, this means that the RC
bit is set) that cause the result of the instruction to be compared with zero,
and the result of that comparison saved in a predefined condition register. In
order to add the record forms of the instructions without too much
copy-and-paste, the relevant functions have been refactored into multiclasses
which define both the record and normal forms.

Also, two TableGen-generated mapping functions have been added which allow
querying the instruction code for the record form given the normal form (and
vice versa).

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179356 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPC.td
lib/Target/PowerPC/PPCInstr64Bit.td
lib/Target/PowerPC/PPCInstrFormats.td
lib/Target/PowerPC/PPCInstrInfo.cpp
lib/Target/PowerPC/PPCInstrInfo.td