diff options
author | Sebastian Pop <spop@codeaurora.org> | 2012-10-25 15:54:06 +0000 |
---|---|---|
committer | Sebastian Pop <spop@codeaurora.org> | 2012-10-25 15:54:06 +0000 |
commit | becdf4d7cd0d5a3079339b6e177066b143d2f84c (patch) | |
tree | 5a847ef4568ea6aa317758c4c4c59c5a014101dd /docs/WritingAnLLVMBackend.html | |
parent | 18560fae0bb122857a61bb36f22628901cdc3dde (diff) |
add TableGen support to create relationship maps between instructions
Relationship maps are represented as InstrMapping records which are parsed by
TableGen and the information is used to construct mapping tables to represent
appropriate relations between instructions. These tables are emitted into
XXXGenInstrInfo.inc file along with the functions to query them.
Patch by Jyotsna Verma <jverma@codeaurora.org>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/WritingAnLLVMBackend.html')
-rw-r--r-- | docs/WritingAnLLVMBackend.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/WritingAnLLVMBackend.html b/docs/WritingAnLLVMBackend.html index 7576d490d7..0ad472cb92 100644 --- a/docs/WritingAnLLVMBackend.html +++ b/docs/WritingAnLLVMBackend.html @@ -32,6 +32,7 @@ <li><a href="#InstructionSet">Instruction Set</a> <ul> <li><a href="#operandMapping">Instruction Operand Mapping</a></li> + <li><a href="#relationMapping">Instruction Relation Mapping</a></li> <li><a href="#implementInstr">Implement a subclass of TargetInstrInfo</a></li> <li><a href="#branchFolding">Branch Folding and If Conversion</a></li> </ul></li> @@ -1259,6 +1260,29 @@ the <tt>rd</tt>, <tt>rs1</tt>, and <tt>rs2</tt> fields respectively. <!-- ======================================================================= --> <h3> + <a name="relationMapping">Instruction Relation Mapping</a> +</h3> + +<div> + +<p> +This TableGen feature is used to relate instructions with each other. It is +particularly useful when you have multiple instruction formats and need to +switch between them after instruction selection. This entire feature is driven +by relation models which can be defined in <tt>XXXInstrInfo.td</tt> files +according to the target-specific instruction set. Relation models are defined +using <tt>InstrMapping</tt> class as a base. TableGen parses all the models +and generates instruction relation maps using the specified information. +Relation maps are emitted as tables in the <tt>XXXGenInstrInfo.inc</tt> file +along with the functions to query them. For the detailed information on how to +use this feature, please refer to +<a href="HowToUseInstrMappings.html">How to add Instruction Mappings</a> +document. +</p> +</div> + +<!-- ======================================================================= --> +<h3> <a name="implementInstr">Implement a subclass of </a> <a href="CodeGenerator.html#targetinstrinfo">TargetInstrInfo</a> </h3> |