summaryrefslogtreecommitdiff
path: root/docs/CodeGenerator.rst
AgeCommit message (Collapse)Author
2017-11-30[MC] Function stack size section.Sean Eveson
Re applying after fixing issues in the diff, sorry for any painful conflicts/merges! Original RFC: http://lists.llvm.org/pipermail/llvm-dev/2017-August/117028.html This change adds a '.stack-size' section containing metadata on function stack sizes to output ELF files behind the new -stack-size-section flag. The section contains pairs of function symbol references (8 byte) and stack sizes (unsigned LEB128). The contents of this section can be used to measure changes to stack sizes between different versions of the compiler or a source base. The advantage of having a section is that we can extract this information when examining binaries that we didn't build, and it allows users and tools easy access to that information just by referencing the binary. There is a follow up change to add an option to clang. Thanks. Reviewers: hfinkel, MatzeB Reviewed By: MatzeB Subscribers: thegameg, asb, llvm-commits Differential Revision: https://reviews.llvm.org/D39788 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319430 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-30Revert r319423: [MC] Function stack size section.Sean Eveson
I messed up the diff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319429 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-30[MC] Function stack size section.Sean Eveson
Summary: Original RFC: http://lists.llvm.org/pipermail/llvm-dev/2017-August/117028.html I wasn't sure who to put as reviewers, so please add/remove people as appropriate. This change adds a '.stack-size' section containing metadata on function stack sizes to output ELF files behind the new -stack-size-section flag. The section contains pairs of function symbol references (8 byte) and stack sizes (unsigned LEB128). The contents of this section can be used to measure changes to stack sizes between different versions of the compiler or a source base. The advantage of having a section is that we can extract this information when examining binaries that we didn't build, and it allows users and tools easy access to that information just by referencing the binary. There is a follow up change to add an option to clang. Thanks. Reviewers: hfinkel, MatzeB Reviewed By: MatzeB Subscribers: thegameg, asb, llvm-commits Differential Revision: https://reviews.llvm.org/D39788 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319423 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06Add documentation for various aspects of the AMDGPU backend.Tony Tye
Differential Revision: https://reviews.llvm.org/D33736 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304831 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-09[docs] Fix typoJonathan Roelofs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294645 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-14[Support/ELF/AMDGPU] Add 32-bit lo/hi got and pc relative relocationsKonstantin Zhuravlyov
Added relocation names: - R_AMDGPU_GOTPCREL32_LO - R_AMDGPU_GOTPCREL32_HI - R_AMDGPU_REL32_LO - R_AMDGPU_REL32_HI AMDGPU isa only supports 32-bit immediates. In order to access 64-bit address we need to generate 32-bit lo/hi relocations, and do the right math (separate patch). Currently we only generate one 32 bit relocation for lower bits for each access, losing higher bits. Hence we need relocations listed above. Differential Revision: https://reviews.llvm.org/D25546 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284191 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-28Fix some typos in the docSylvestre Ledru
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279943 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-20[docs] Fixing Sphinx warnings to unclog the buildbotRenato Golin
Lots of blocks had "llvm" or "nasm" syntax types but either weren't following the syntax, or the syntax has changed (and sphinx hasn't keep up) or the type doesn't even exist (nasm?). Other documents had :options: what were invalid. I only removed those that had warnings, and left the ones that didn't, in order to follow the principle of least surprise. This is like this for ages, but the buildbot is now failing on errors. It may take a while to upgrade the buildbot's sphinx, if that's even possible, but that shouldn't stop us from getting docs updates (which seem down for quite a while). Also, we're not losing any syntax highlight, since when it doesn't parse, it doesn't colour. Ie. those blocks are not being highlighted anyway. I'm trying to get all docs in one go, so that it's easy to revert later if we do fix, or at least easy to know what's to fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276109 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-29[Docs][CodeGenerator] Don't specify the number of operands in BuildMIKrzysztof Parzyszek
Patch by Visoiu Mistrih Francis. Differential Revision: http://reviews.llvm.org/D21819 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274128 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23Support/ELF: Add R_AMDGPU_GOTPCREL relocationTom Stellard
Summary: We will start generating this in a future patch. Reviewers: arsenm, kzhuravl, rafael, ruiu, tony-tye Subscribers: arsenm, llvm-commits, kzhuravl Differential Revision: http://reviews.llvm.org/D21482 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273628 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14[docs] Update AMDGPU relocation informationKonstantin Zhuravlyov
- Added new notation for specifying relocation calculation - Renamed: - R_AMDGPU_32_LOW -> R_AMDGPU_ABS32_LO - R_AMDGPU_32_HIGH -> R_AMDGPU_ABS32_HI - R_AMDGPU_64 -> R_AMDGPU_ABS64 - Added: - R_AMDGPU_REL32 - R_AMDGPU_REL64 - R_AMDGPU_ABS32 - Updated calculations for relative relocations Differential Revision: http://reviews.llvm.org/D21215 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272684 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-10docs: Add AMDGPU relocation informationTom Stellard
Summary: This documents the various relocation types that are supported by the Radeon Open Compute (ROC) runtime (which is essentially the dynamic linker for AMDGPU). Only R_AMDGPU_32 is not currently supported by the ROC runtime, but it will usually be resolved at link time by lld. Patch by: Konstantin Zhuravlyov Reviewers: kzhuravl, rafael Subscribers: rafael, arsenm, llvm-commits, kzhuravl Differential Revision: http://reviews.llvm.org/D20952 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272352 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-05Remove bit-rotten CppBackend.James Y Knight
This backend was supposed to generate C++ code which will re-construct the LLVM IR passed as input. This seems to me to have very marginal usefulness in the first place. However, the code has never been updated to use IRBuilder, which makes its current value negative -- people who look at the output may be steered to use the *wrong* C++ APIs to construct IR. Furthermore, it's generated code that doesn't compile since at least 2013. Differential Revision: http://reviews.llvm.org/D19942 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268631 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-03Add an address space for the X86 SS segment.David L Kreitzer
Patch by Michael LeMay (michael.lemay@intel.com) Differential Revision: http://reviews.llvm.org/D17093 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268431 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-14[docs] "Straightforward" is one word.Justin Lebar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263480 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-14[docs] Fix typo in docs/CodeGenerator.rst.Justin Lebar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263479 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13Fixing a typo in docs/CodeGenerator.rstArtyom Skrobov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253045 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-14[bpf] add documentation and instruction set descriptionAlexei Starovoitov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245105 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-02[NFC] Minor editorial fixes to the CodeGen docs.Charlie Turner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241249 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-19Fix grammar in documentation.Eric Christopher
Patch by Ralph Campbell! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229884 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-14SelectionDAG: add a -filter-view-dags option to llcMehdi Amini
This option takes the name of the basic block you want to visualize with -view-*-dags Differential Revision: http://reviews.llvm.org/D6948 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225953 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-10[sphinx cleanup]Dan Liew
Fix sphinx warning introduced by r217537 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217541 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-10Fix docs reference to inexistent class.Nico Weber
Patch sent via telegraph by TNorthover. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217537 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02Add note to documentation about machine node chains.Matt Arsenault
I've been assuming chain operands were always the first operand, since the documentation says this. I was confused about why they were missing after instruction selection. Apparently the convention changes to using the last operand for MachineSDNodes and I've never noticed before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216934 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-01[docs] Fix a mangled sentence.Sean Silva
Fixes PR20169 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212116 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-01[docs] Remove stray HTML tag.Sean Silva
Fixes PR20167 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212115 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-30Fix 'platform-specific' hyphenationsAlp Toker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212056 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-14Fix strange typo in markup.Jay Foad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208759 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-09Revert "[ms-cxxabi] Add a new calling convention that swaps 'this' and 'sret'"Reid Kleckner
This reverts commit r200561. This calling convention was an attempt to match the MSVC C++ ABI for methods that return structures by value. This solution didn't scale, because it would have required splitting every CC available on Windows into two: one for methods and one for free functions. Now that we can put sret on the second arg (r208453), and Clang does that (r208458), revert this hack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208459 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-08[docs] Fix up some links to the preferred style.Sean Silva
:doc:`...` and :ref:`...` links help Sphinx keep track the dependencies between documents and ensure that they are not pointing to nowhere. Raw HTML links work just fine and are easier for people less familiar with reST/Sphinx. They are easy to change over to the :doc:/:ref: style after the fact so this is not a problem. This commit doesn't fix all of them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205792 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-07[docs] Fix some linksSean Silva
The TableGen docs have changed structure Patch by Tay Ray Chuan! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205744 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-31[ms-cxxabi] Add a new calling convention that swaps 'this' and 'sret'Reid Kleckner
MSVC always places the 'this' parameter for a method first. The implicit 'sret' pointer for methods always comes second. We already implement this for __thiscall by putting sret parameters on the stack, but __cdecl methods require putting both parameters on the stack in opposite order. Using a special calling convention allows frontends to keep the sret parameter first, which avoids breaking lots of assumptions in LLVM and Clang. Fixes PR15768 with the corresponding change in Clang. Reviewers: ributzka, majnemer Differential Revision: http://llvm-reviews.chandlerc.com/D2663 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200561 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-13Docs: fix sign of division and increase equivocation on code generated.Tim Northover
I should have been a politician. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199092 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-16Add more documentation about the TargetStreamer interface.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192796 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-09Add a paragraph about MCTargetStreamer.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192265 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-01Fix a typo in the documentation. Thanks to Diana Vasile for the patchSylvestre Ledru
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191752 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25Remove the mblaze backend from llvm.Rafael Espindola
Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187145 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-14[SystemZ] Add disassembler supportRichard Sandiford
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181777 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-08Add SystemZ feats to CodeGenerator.rstRichard Sandiford
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181431 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05[docs] Update Target Feature Matrix for the XCore backend.Richard Osborne
Disassembler support has recently been added. Fill in some other unknowns at the same time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181156 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19Extend TableGen instruction selection matcher to improve handlingUlrich Weigand
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-01-30Remove a mention of TargetInstrDescriptor, which no longer exists in the codeEli Bendersky
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173971 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11Remove PTX->NVPTX in CodeGenerator document and update its text.Justin Holewinski
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172235 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11Update CodeGenerator document to add a "Not Applicable" category to theJustin Holewinski
Target Feature Matrix, and update the PTX column with this new category. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172234 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11docs: Fix long standing linking antipattern.Sean Silva
Before we learned about :doc:, we used :ref: and put a dummy link at the top of each page. Don't do that anymore. This fixes PR14891 as a special case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172162 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-09Documentation: convert ReleaseNotes.html to reST.Dmitri Gribenko
Patch by Anthony Mykhailenko with small fixes by me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169714 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-01Documentation: convert WritingAnLLVMBackend.html to reSTDmitri Gribenko
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169087 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29Documentation: formatting improvementsDmitri Gribenko
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168897 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-19docs: Fix reference to "bold" part of code example.Sean Silva
Fixes PR14380. The prose was referring to a "bold" part of the code example, where the boldness was lost in the transition from HTML. Unlike HTML, where one can easily have a <b> inside a <pre>, reStructuredText is generally unable to represent such nested markup. Hack around it with the :emphasise-lines: option to the code-block directive to single out the regions instead. Thankfully the regions are close-enough to being full lines for this to work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168329 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-16Add the Erlang/HiPE calling convention, patch by Yiannis Tsiouris.Duncan Sands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168166 91177308-0d34-0410-b5e6-96231b3b80d8