summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/XCore
Commit message (Collapse)AuthorAgeFilesLines
...
* [XCore] Add missing l2rus instructions.Richard Osborne2013-01-272-1/+14
| | | | | | | These instructions are not targeted by the compiler but they are needed for the MC layer. llvm-svn: 173634
* [XCore] Add missing l2r instructions.Richard Osborne2013-01-271-1/+12
| | | | | | | These instructions are not targeted by the compiler but they are needed for the MC layer. llvm-svn: 173629
* [XCore] Add missing 1r instructions.Richard Osborne2013-01-271-6/+21
| | | | | | | These instructions are not targeted by the compiler but they are needed for the MC layer. llvm-svn: 173624
* [XCore] Add missing 0r instructions.Richard Osborne2013-01-271-3/+44
| | | | | | | These instructions are not targeted by the compiler but they are needed for the MC layer. llvm-svn: 173623
* Add instruction encodings / disassembly support for l4r instructions.Richard Osborne2013-01-253-18/+83
| | | | llvm-svn: 173501
* Use the correct format in the STW / SETPSC instruction names.Richard Osborne2013-01-253-9/+9
| | | | llvm-svn: 173494
* Fix order of operands for crc8_l4rRichard Osborne2013-01-254-27/+48
| | | | | | | | The order in which operands appear in the encoded instruction is different to order in which they appear in assembly. This changes the XCore backend to use the instruction encoding order. llvm-svn: 173493
* Add instruction encodings / disassembly support for l5r instructions.Richard Osborne2013-01-253-12/+55
| | | | llvm-svn: 173479
* Fix order of operands for l5r instructions.Richard Osborne2013-01-252-18/+22
| | | | | | | With this change the operands order matches the order in which the operands are encoded in the instruction. llvm-svn: 173477
* Use correct mnemonic / instruction name for ldivu.Richard Osborne2013-01-251-4/+3
| | | | llvm-svn: 173476
* Add instruction encodings / disassembly support for l6r instructions.Richard Osborne2013-01-233-6/+34
| | | | llvm-svn: 173288
* Add instruction encodings / disassembly support for u10 / lu10 instructions.Richard Osborne2013-01-222-12/+22
| | | | llvm-svn: 173204
* Fix some incorrectly named u10 / lu10 instructions.Richard Osborne2013-01-211-25/+12
| | | | llvm-svn: 173090
* Remove unused multiclass.Richard Osborne2013-01-211-12/+0
| | | | llvm-svn: 173087
* Add instruction encodings / disassembly support for u6 / lu6 instructions.Richard Osborne2013-01-212-59/+42
| | | | llvm-svn: 173086
* Add instruction encoding / disassembly support for ru6 / lru6 instructions.Richard Osborne2013-01-213-94/+97
| | | | llvm-svn: 173085
* Use correct format for the LDAWCP instruction (u6).Richard Osborne2013-01-211-7/+3
| | | | llvm-svn: 173083
* Add instruction encodings / disassembly support for l2rus instructions.Richard Osborne2013-01-203-23/+81
| | | | llvm-svn: 172987
* Add instruction encodings / disassembly support for l3r instructions.Richard Osborne2013-01-203-56/+172
| | | | llvm-svn: 172986
* Add instruction encodings / disassembler support for 2rus instructions.Richard Osborne2013-01-203-23/+90
| | | | llvm-svn: 172985
* Add instruction encodings / disassembly support 3r instructions.Richard Osborne2013-01-203-85/+167
| | | | | | | | It is not possible to distinguish 3r instructions from 2r / rus instructions using only the fixed bits. Therefore if an instruction doesn't match the 2r / rus format try to decode it as a 3r instruction before returning Fail. llvm-svn: 172984
* Last in the series of removing unnecessary '0' arguments forEric Christopher2013-01-091-1/+1
| | | | | | | address space. Reordered the EmitULEB128IntValue arguments to make this easier. llvm-svn: 171949
* Switch TargetTransformInfo from an immutable analysis pass that requiresChandler Carruth2013-01-072-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a TargetMachine to construct (and thus isn't always available), to an analysis group that supports layered implementations much like AliasAnalysis does. This is a pretty massive change, with a few parts that I was unable to easily separate (sorry), so I'll walk through it. The first step of this conversion was to make TargetTransformInfo an analysis group, and to sink the nonce implementations in ScalarTargetTransformInfo and VectorTargetTranformInfo into a NoTargetTransformInfo pass. This allows other passes to add a hard requirement on TTI, and assume they will always get at least on implementation. The TargetTransformInfo analysis group leverages the delegation chaining trick that AliasAnalysis uses, where the base class for the analysis group delegates to the previous analysis *pass*, allowing all but tho NoFoo analysis passes to only implement the parts of the interfaces they support. It also introduces a new trick where each pass in the group retains a pointer to the top-most pass that has been initialized. This allows passes to implement one API in terms of another API and benefit when some other pass above them in the stack has more precise results for the second API. The second step of this conversion is to create a pass that implements the TargetTransformInfo analysis using the target-independent abstractions in the code generator. This replaces the ScalarTargetTransformImpl and VectorTargetTransformImpl classes in lib/Target with a single pass in lib/CodeGen called BasicTargetTransformInfo. This class actually provides most of the TTI functionality, basing it upon the TargetLowering abstraction and other information in the target independent code generator. The third step of the conversion adds support to all TargetMachines to register custom analysis passes. This allows building those passes with access to TargetLowering or other target-specific classes, and it also allows each target to customize the set of analysis passes desired in the pass manager. The baseline LLVMTargetMachine implements this interface to add the BasicTTI pass to the pass manager, and all of the tools that want to support target-aware TTI passes call this routine on whatever target machine they end up with to add the appropriate passes. The fourth step of the conversion created target-specific TTI analysis passes for the X86 and ARM backends. These passes contain the custom logic that was previously in their extensions of the ScalarTargetTransformInfo and VectorTargetTransformInfo interfaces. I separated them into their own file, as now all of the interface bits are private and they just expose a function to create the pass itself. Then I extended these target machines to set up a custom set of analysis passes, first adding BasicTTI as a fallback, and then adding their customized TTI implementations. The fourth step required logic that was shared between the target independent layer and the specific targets to move to a different interface, as they no longer derive from each other. As a consequence, a helper functions were added to TargetLowering representing the common logic needed both in the target implementation and the codegen implementation of the TTI pass. While technically this is the only change that could have been committed separately, it would have been a nightmare to extract. The final step of the conversion was just to delete all the old boilerplate. This got rid of the ScalarTargetTransformInfo and VectorTargetTransformInfo classes, all of the support in all of the targets for producing instances of them, and all of the support in the tools for manually constructing a pass based around them. Now that TTI is a relatively normal analysis group, two things become straightforward. First, we can sink it into lib/Analysis which is a more natural layer for it to live. Second, clients of this interface can depend on it *always* being available which will simplify their code and behavior. These (and other) simplifications will follow in subsequent commits, this one is clearly big enough. Finally, I'm very aware that much of the comments and documentation needs to be updated. As soon as I had this working, and plausibly well commented, I wanted to get it committed and in front of the build bots. I'll be doing a few passes over documentation later if it sticks. Commits to update DragonEgg and Clang will be made presently. llvm-svn: 171681
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-028-23/+23
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Resort the #include lines in include/... and lib/... with theChandler Carruth2013-01-022-2/+2
| | | | | | | | | | utils/sort_includes.py script. Most of these are updating the new R600 target and fixing up a few regressions that have creeped in since the last time I sorted the includes. llvm-svn: 171362
* Remove the getAttributesAtIndex and getNumAttrs methods in favor of using ↵Bill Wendling2012-12-311-5/+2
| | | | | | the getAttrSomewhere predicate. This prevents the uses of 'Attribute' as a collection of attributes. llvm-svn: 171271
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-1/+1
| | | | | | single attribute in the future. llvm-svn: 170502
* Add instruction encodings / disassembly support for l2r instructions.Richard Osborne2012-12-173-33/+112
| | | | llvm-svn: 170345
* Add instruction encodings for PEEK and ENDIN.Richard Osborne2012-12-171-8/+8
| | | | | | Previously these were marked with the wrong format. llvm-svn: 170334
* Fix parameter name in prototypes in XCoreDisassembler.Richard Osborne2012-12-171-3/+3
| | | | llvm-svn: 170332
* Add instruction encodings / disassembly support for rus instructions.Richard Osborne2012-12-173-19/+104
| | | | llvm-svn: 170330
* Add instruction encodings for ZEXT and SEXT.Richard Osborne2012-12-171-8/+8
| | | | | | Previously these were marked with the wrong format. llvm-svn: 170327
* Add instruction encodings / disassembly support for 2r instructions.Richard Osborne2012-12-173-70/+148
| | | | llvm-svn: 170323
* Add instruction encodings / disassembly support for 0r instructions.Richard Osborne2012-12-172-9/+12
| | | | llvm-svn: 170322
* Simplify assertion in XCoreInstPrinter.Richard Osborne2012-12-171-2/+3
| | | | llvm-svn: 170321
* Update comments to match recommended doxygen style.Richard Osborne2012-12-174-16/+17
| | | | llvm-svn: 170320
* Remove unnecessary include.Richard Osborne2012-12-171-1/+0
| | | | llvm-svn: 170319
* Add instruction encodings and disassembly for 1r instructions.Richard Osborne2012-12-167-42/+113
| | | | llvm-svn: 170293
* Add XCore disassembler.Richard Osborne2012-12-167-2/+113
| | | | | | | | Currently there is no instruction encoding info and XCoreDisassembler::getInstruction() always returns Fail. I intend to add instruction encodings and tests in follow on commits. llvm-svn: 170292
* Remove invalid instruction encodings.Richard Osborne2012-12-161-18/+0
| | | | llvm-svn: 170291
* Mark anything deriving from PseudoInstXCore as a pseudo instruction.Richard Osborne2012-12-161-1/+3
| | | | llvm-svn: 170290
* Set instruction size correctly in XCoreInstrFormats.tdRichard Osborne2012-12-161-20/+21
| | | | llvm-svn: 170289
* Change XCoreAsmPrinter to lower MachineInstrs to MCInsts before emission.Richard Osborne2012-12-1614-27/+401
| | | | | | | This change adds XCoreMCInstLower to do the lowering to MCInst and XCoreInstPrinter to print the MCInsts. llvm-svn: 170288
* Replace ${:comment} with the comment symbol.Richard Osborne2012-12-161-6/+6
| | | | llvm-svn: 170286
* s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling2012-12-071-1/+1
| | | | | | in the near future. llvm-svn: 169651
* Sort includes for all of the .h files under the 'lib' tree. These wereChandler Carruth2012-12-043-5/+5
| | | | | | | | | | missed in the first pass because the script didn't yet handle include guards. Note that the script is now able to handle all of these headers without manual edits. =] llvm-svn: 169224
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-038-44/+44
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Fix handling of aliases to functions.Richard Osborne2012-11-161-13/+9
| | | | | | An alias to a function should use pc relative addressing. llvm-svn: 168199
* Revert the series of commits starting with r166578 which introduced theChandler Carruth2012-11-011-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getIntPtrType support for multiple address spaces via a pointer type, and also introduced a crasher bug in the constant folder reported in PR14233. These commits also contained several problems that should really be addressed before they are re-committed. I have avoided reverting various cleanups to the DataLayout APIs that are reasonable to have moving forward in order to reduce the amount of churn, and minimize the number of commits that were reverted. I've also manually updated merge conflicts and manually arranged for the getIntPtrType function to stay in DataLayout and to be defined in a plausible way after this revert. Thanks to Duncan for working through this exact strategy with me, and Nick Lewycky for tracking down the really annoying crasher this triggered. (Test case to follow in its own commit.) After discussing with Duncan extensively, and based on a note from Micah, I'm going to continue to back out some more of the more problematic patches in this series in order to ensure we go into the LLVM 3.2 branch with a reasonable story here. I'll send a note to llvmdev explaining what's going on and why. Summary of reverted revisions: r166634: Fix a compiler warning with an unused variable. r166607: Add some cleanup to the DataLayout changes requested by Chandler. r166596: Revert "Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this! r166591: Delete a directory that wasn't supposed to be checked in yet. r166578: Add in support for getIntPtrType to get the pointer type based on the address space. llvm-svn: 167221
* Implement a basic VectorTargetTransformInfo interface to be used by the loop ↵Nadav Rotem2012-10-241-1/+1
| | | | | | and bb vectorizers for modeling the cost of instructions. llvm-svn: 166593
OpenPOWER on IntegriCloud