llvm-6502/docs
Ulrich Weigand ec8d1a5b72 Extend TableGen instruction selection matcher to improve handling
of complex instruction operands (e.g. address modes).

Currently, if a Pat pattern creates an instruction that has a complex
operand (i.e. one that consists of multiple sub-operands at the MI
level), this operand must match a ComplexPattern DAG pattern with the
correct number of output operands.

This commit extends TableGen to alternatively allow match a complex
operands against multiple separate operands at the DAG level.

This allows using Pat patterns to match pre-increment nodes like
pre_store (which must have separate operands at the DAG level) onto
an instruction pattern that uses a multi-operand memory operand,
like the following example on PowerPC (will be committed as a
follow-on patch):

  def STWU  : DForm_1<37, (outs ptr_rc:$ea_res), (ins GPRC:$rS, memri:$dst),
                    "stwu $rS, $dst", LdStStoreUpd, []>,
                    RegConstraint<"$dst.reg = $ea_res">, NoEncode<"$ea_res">;

  def : Pat<(pre_store GPRC:$rS, ptr_rc:$ptrreg, iaddroff:$ptroff),
            (STWU GPRC:$rS, iaddroff:$ptroff, ptr_rc:$ptrreg)>;

Here, the pair of "ptroff" and "ptrreg" operands is matched onto the
complex operand "dst" of class "memri" in the "STWU" instruction.

Approved by Jakob Stoklund Olesen.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177428 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19 19:51:09 +00:00
..
_static
_templates
_themes/llvm-theme
CommandGuide Update documentation of llvm-link to reflect recent cleanups. 2013-03-19 16:04:19 +00:00
HistoricalNotes
TableGen
tutorial [docs] Remove explicit authorship. 2013-03-11 16:25:16 +00:00
AliasAnalysis.rst
Atomics.rst
BitCodeFormat.rst
BranchWeightMetadata.rst
Bugpoint.rst
CMake.rst
CodeGenerator.rst Extend TableGen instruction selection matcher to improve handling 2013-03-19 19:51:09 +00:00
CodingStandards.rst
CommandLine.rst
CompilerWriterInfo.rst [docs] Remove explicit authorship. 2013-03-11 16:25:16 +00:00
conf.py
DebuggingJITedCode.rst
DeveloperPolicy.rst
doxygen.cfg.in
doxygen.css
doxygen.footer
doxygen.header
doxygen.intro
Dummy.html
ExceptionHandling.rst
ExtendedIntegerResults.txt
ExtendingLLVM.rst
FAQ.rst
GarbageCollection.rst
gcc-loops.png
GetElementPtr.rst
GettingStarted.rst Adding ARM as supported architecture 2013-02-26 17:23:13 +00:00
GettingStartedVS.rst
GoldPlugin.rst
HowToAddABuilder.rst
HowToBuildOnARM.rst ARM build docs easier for copy&paste 2013-02-25 18:25:58 +00:00
HowToReleaseLLVM.rst
HowToSetUpLLVMStyleRTTI.rst [docs] Discuss a potential bug to be aware of. 2013-03-16 16:58:20 +00:00
HowToSubmitABug.rst
HowToUseAttributes.rst
HowToUseInstrMappings.rst
index.rst
LangRef.rst Missing period in doc 2013-03-11 16:51:15 +00:00
Lexicon.rst [docs] PR15254: Add "AST" to the lexicon. 2013-02-13 21:17:20 +00:00
LinkTimeOptimization.rst
linpack-pc.png
LLVMBuild.rst
LLVMBuild.txt
make.bat
Makefile
Makefile.sphinx
MakefileGuide.rst
MarkedUpDisassembly.rst
Packaging.rst
Passes.rst [docs] Remove explicit authorship. 2013-03-11 16:25:16 +00:00
Phabricator.rst Update phab docs to clarify how to accept a change. 2013-02-13 09:07:18 +00:00
ProgrammersManual.rst
Projects.rst
re_format.7
README.txt [docs] Discuss manpage output. 2013-02-27 18:48:42 +00:00
ReleaseNotes.rst ReleaseNotes: Tweak hexagonv2/hexagonv3 removal note. 2013-03-18 13:08:24 +00:00
SegmentedStacks.rst
SourceLevelDebugging.rst Make the fields in the diagram match the descriptive text above them. 2013-03-18 20:21:47 +00:00
SphinxQuickstartTemplate.rst [docs] Provide pointer for building Sphinx docs. 2013-02-27 18:33:21 +00:00
SystemLibrary.rst
TableGenFundamentals.rst
TestingGuide.rst [docs] Remove incorrect information about lit. 2013-03-19 15:22:02 +00:00
TestSuiteMakefileGuide.rst
Vectorizers.rst Brag about function call vectorization in the docs. 2013-02-28 19:33:46 +00:00
WritingAnLLVMBackend.rst
WritingAnLLVMPass.rst
yaml2obj.rst
YamlIO.rst Spelling corrections 2013-02-18 02:44:09 +00:00

LLVM Documentation
==================

LLVM's documentation is written in reStructuredText, a lightweight
plaintext markup language (file extension `.rst`). While the
reStructuredText documentation should be quite readable in source form, it
is mostly meant to be processed by the Sphinx documentation generation
system to create HTML pages which are hosted on <http://llvm.org/docs/> and
updated after every commit. Manpage output is also supported, see below.

If you instead would like to generate and view the HTML locally, install
Sphinx <http://sphinx-doc.org/> and then do:

    cd docs/
    make -f Makefile.sphinx
    $BROWSER _build/html/index.html

The mapping between reStructuredText files and generated documentation is
`docs/Foo.rst` <-> `_build/html/Foo.html` <-> `http://llvm.org/docs/Foo.html`.

If you are interested in writing new documentation, you will want to read
`SphinxQuickstartTemplate.rst` which will get you writing documentation
very fast and includes examples of the most important reStructuredText
markup syntax.

Manpage Output
===============

Building the manpages is similar to building the HTML documentation. The
primary difference is to use the `man` makefile target, instead of the
default (which is `html`). Sphinx then produces the man pages in the
directory `_build/man/`.

    cd docs/
    make -f Makefile.sphinx man
    man -l _build/man/FileCheck.1

The correspondence between .rst files and man pages is
`docs/CommandGuide/Foo.rst` <-> `_build/man/Foo.1`.
These .rst files are also included during HTML generation so they are also
viewable online (as noted above) at e.g.
`http://llvm.org/docs/CommandGuide/Foo.html`.