summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/XCore
Commit message (Collapse)AuthorAgeFilesLines
...
* XCore target: Refactor LR handlingRobert Lytton2014-01-063-48/+72
| | | | | | | | | We also narrow the liveness of FP & LR during the prologue to reflect the actual usage of the registers. I have been unable to construct a test to prove the previous live range was too large. llvm-svn: 198611
* XCore target: Refactor the loading of constants into a registerRobert Lytton2014-01-063-32/+49
| | | | | | This common functionality will be used to lower FRAME_TO_ARGS_OFFSET. llvm-svn: 198610
* XCore target: fix handling of unsized global arrays in large code modelRobert Lytton2014-01-061-4/+13
| | | | llvm-svn: 198609
* Make the llvm mangler depend only on DataLayout.Rafael Espindola2014-01-032-2/+3
| | | | | | | | | | | | | | Before this patch any program that wanted to know the final symbol name of a GlobalValue had to link with Target. This patch implements a compromise solution where the mangler uses DataLayout. This way, any tool that already links with Target (llc, clang) gets the exact behavior as before and new IR files can be mangled without linking with Target. With this patch the mangler is constructed with just a DataLayout and DataLayout is extended to include the information the Mangler needs. llvm-svn: 198438
* [stackprotector] Use analysis from the StackProtector pass for stack layout ↵Josh Magee2013-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | in PEI a nd LocalStackSlot passes. This changes the MachineFrameInfo API to use the new SSPLayoutKind information produced by the StackProtector pass (instead of a boolean flag) and updates a few pass dependencies (to preserve the SSP analysis). The stack layout follows the same approach used prior to this change - i.e., only LargeArray stack objects will be placed near the canary and everything else will be laid out normally. After this change, structures containing large arrays will also be placed near the canary - a case previously missed by the old implementation. Out of tree targets will need to update their usage of MachineFrameInfo::CreateStackObject to remove the MayNeedSP argument. The next patch will implement the rules for sspstrong and sspreq. The end goal is to support ssp-strong stack layout rules. WIP. Differential Revision: http://llvm-reviews.chandlerc.com/D2158 llvm-svn: 197653
* One last cleanup of LLVM's DataLayout strings.Rafael Espindola2013-12-161-1/+1
| | | | | | | Produce them in the same order on every target. The order is that of getStringRepresentation: e|E-i*-f*-v*-a*-s*-n*-S*. llvm-svn: 197411
* The preferred alignment defaults to the abi alignment. Omit if it is the same.Rafael Espindola2013-12-161-1/+1
| | | | llvm-svn: 197400
* Assume defaults to produce smaller datalayout strings.Rafael Espindola2013-12-131-2/+1
| | | | llvm-svn: 197249
* Use "a" instead of "a0" in DataLayout.Rafael Espindola2013-12-121-1/+1
| | | | | | It means exactly the same and is just a bit shorter. llvm-svn: 197169
* Prune redundant dependencies in LLVMBuild.txt.NAKAMURA Takumi2013-12-111-1/+1
| | | | llvm-svn: 196988
* Add proper dependencies to LLVMBuild.txt in llvm/lib.NAKAMURA Takumi2013-12-102-2/+2
| | | | | | I'll prune redundant deps in LLVMBuild.txt, later. llvm-svn: 196881
* Refactor the setting of PrivateGlobalPrefix.Rafael Espindola2013-12-021-2/+1
| | | | | | No functionality change. llvm-svn: 196170
* Remove dead code.Rafael Espindola2013-12-021-7/+0
| | | | | | | | | MO_JumpTableIndex and MO_ExternalSymbol don't show up on inline asm. Keeping parts of the old asm printer just to print inline asm to a string that we then parse back looks like a hack. llvm-svn: 196111
* XCoreFrameLowering.cpp: Use [in,out] instead of [in] [out]. [-Wdocumentation]NAKAMURA Takumi2013-12-021-2/+2
| | | | llvm-svn: 196094
* XCore target: Make handling of large frames not dependent upon an FP.Robert Lytton2013-12-026-151/+237
| | | | | | | | | | | | eliminateFrameIndex() has been reworked to handle both small & large frames with either a FP or SP. An additional Slot is required for Scavenging spills when not using FP for large frames. Reworked the handling of Register Scavenging. Whether we are using an FP or not, whether it is a large frame or not, and whether we are using a large code model or not are now independent. llvm-svn: 196091
* XCore: Unbreak C++11 build.Benjamin Kramer2013-12-021-3/+3
| | | | llvm-svn: 196089
* XCore target: fix large code model 'select' indirect address handling.Robert Lytton2013-12-021-0/+3
| | | | llvm-svn: 196088
* XCore target: Add large code modelRobert Lytton2013-12-025-28/+175
| | | | | | | | | | | | | | | | When using large code model: Global objects larger than 'CodeModelLargeSize' bytes are placed in sections named with a trailing ".large" The folded global address of such objects are lowered into the const pool. During inspection it was noted that LowerConstantPool() was using a default offset of zero. A fix was made, but due to only offsets of zero being generated, testing only verifies the change is not detrimental. Correct the flags emitted for explicitly specified sections. We assume the size of the object queried by getSectionForConstant() is never greater than CodeModelLargeSize. To handle greater than CodeModelLargeSize, changes to AsmPrinter would be required. llvm-svn: 196087
* XCore target: Fix eliminateFrameIndex() to handle large framesRobert Lytton2013-12-021-7/+18
| | | | | | | | Large frame offsets are loaded from the ConstantPool. Where possible, offsets are encoded using the smaller MKMSK instruction. Large frame offsets can only be used when there is a frame-pointer. llvm-svn: 196085
* XCore target: Enable frames larger than 65535 to be loweredRobert Lytton2013-12-021-138/+177
| | | | llvm-svn: 196084
* Change the default of AsmWriterClassName and isMCAsmWriter.Rafael Espindola2013-12-021-6/+0
| | | | llvm-svn: 196065
* [CMake] Let add_public_tablegen_target() provide intrinsics_gen, too.NAKAMURA Takumi2013-11-281-2/+0
| | | | | | | | | | I think, in principle, intrinsics_gen may be added explicitly. That said, it can be added incidentally, since each target already has dependencies to llvm-tblgen. Almost all source files depend on both CommonTaleGen and intrinsics_gen. Explicit add_dependencies() have been pruned under lib/Target. llvm-svn: 195929
* [CMake] Let add_public_tablegen_target responsible to provide dependency to ↵NAKAMURA Takumi2013-11-285-9/+1
| | | | | | | | | CommonTableGen. add_public_tablegen_target adds *CommonTableGen to LLVM_COMMON_DEPENDS. LLVM_COMMON_DEPENDS affects add_llvm_library (and other add_target stuff) within its scope. llvm-svn: 195927
* [CMake] Prune include_directories() in llvm/lib/Target, take #2.NAKAMURA Takumi2013-11-283-7/+0
| | | | | | I forgot to commit them. They were staging in my local repo. llvm-svn: 195924
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-192-1/+6
| | | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. The memory leaks in this version have been fixed. Thanks Alexey for pointing them out. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 195064
* Revert r194865 and r194874.Alexey Samsonov2013-11-182-6/+1
| | | | | | | | | | | | This change is incorrect. If you delete virtual destructor of both a base class and a subclass, then the following code: Base *foo = new Child(); delete foo; will not cause the destructor for members of Child class. As a result, I observe plently of memory leaks. Notable examples I investigated are: ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl. llvm-svn: 194997
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-152-1/+6
| | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 194865
* XCore target: implement exception handlingRobert Lytton2013-11-133-3/+39
| | | | llvm-svn: 194564
* XCore target: fix bug in aligning 'byval i8*' on the stackRobert Lytton2013-11-121-1/+1
| | | | llvm-svn: 194466
* Add XCore support for ATOMIC_FENCE.Robert Lytton2013-11-123-1/+25
| | | | | | | | | | ATOMIC_FENCE is lowered to a compiler barrier which is codegen only. There is no need to emit an instructions since the XCore provides sequential consistency. Original patch by Richard Osborne llvm-svn: 194464
* XCore target: return error for unsupported alignmentRobert Lytton2013-11-121-0/+4
| | | | llvm-svn: 194463
* Add a helper getSymbol to AsmPrinter.Rafael Espindola2013-10-292-3/+3
| | | | llvm-svn: 193627
* Add a MCAsmInfoELF class and factor some code into it.Rafael Espindola2013-10-162-3/+2
| | | | | | We had a MCAsmInfoCOFF, but no common class for all the ELF MCAsmInfos before. llvm-svn: 192760
* XCore target fix bug in emitArrayBound() causing segmentation faultRobert Lytton2013-10-111-6/+5
| | | | llvm-svn: 192434
* XCore target does not emit '.hidden' or '.protected' attributesRobert Lytton2013-10-111-0/+4
| | | | llvm-svn: 192433
* XCore target: fix bug in XCoreLowerThreadLocal.cppRobert Lytton2013-10-111-10/+21
| | | | | | | | | When a ConstantExpr which uses a thread local is part of a PHI node instruction, the insruction that replaces the ConstantExpr must be inserted in the predecessor block, in front of the terminator instruction. If the predecessor block has multiple successors, the edge is first split. llvm-svn: 192432
* XCore target: add XCoreTargetLowering::isZExtFree()Robert Lytton2013-10-112-0/+22
| | | | llvm-svn: 192431
* More XCore TTI cleanup -- remove an unused private field flagged byChandler Carruth2013-09-181-4/+2
| | | | | | -Wunused-private-field with Clang. llvm-svn: 190941
* Target/XCore/CMakeLists.txt: Add XCoreTargetTransformInfo.cpp.NAKAMURA Takumi2013-09-181-0/+1
| | | | llvm-svn: 190937
* Prevent LoopVectorizer and SLPVectorizer running if the target has no vector ↵Robert Lytton2013-09-184-0/+97
| | | | | | | | | | registers. XCore target: Add XCoreTargetTransformInfo This is where getNumberOfRegisters() resides, which in turn returns the number of vector registers (=0). llvm-svn: 190936
* Remove unused functions.Eli Friedman2013-09-102-9/+0
| | | | llvm-svn: 190442
* A better way to silence the warning in MSVC (replaces r190304).Aaron Ballman2013-09-091-2/+1
| | | | llvm-svn: 190308
* Silencing a warning about control flow reaching the end of a non-void function.Aaron Ballman2013-09-091-0/+1
| | | | llvm-svn: 190304
* XCore handling of thread local loweringRobert Lytton2013-09-091-9/+94
| | | | | | | | | | | Fix XCoreLowerThreadLocal trying to initialise globals which have no initializer. Add handling of const expressions containing thread local variables. These need to be replaced with instructions, as the thread ID is used to access the thread local variable. llvm-svn: 190300
* XCore target: change to Sched::SourceRobert Lytton2013-09-091-1/+1
| | | | | | | This sidesteps a bug in PrescheduleNodesWithMultipleUses() which does not check if callResources will be affected by the transformation. llvm-svn: 190299
* XCore target: fix weak linkage attribute handlingRobert Lytton2013-09-091-1/+0
| | | | llvm-svn: 190298
* Target/*/CMakeLists.txt: Add the dependency to CommonTableGen explicitly for ↵NAKAMURA Takumi2013-08-061-1/+1
| | | | | | | | | each corresponding CodeGen. Without explicit dependencies, both per-file action and in-CommonTableGen action could run in parallel. It races to emit *.inc files simultaneously. llvm-svn: 187780
* Stop leaking register infos in the disassemblers.Benjamin Kramer2013-08-031-2/+2
| | | | llvm-svn: 187695
* XCore target: Fix Vararg handlingRobert Lytton2013-08-011-12/+14
| | | | llvm-svn: 187565
* XCore target: Add byval handlingRobert Lytton2013-08-011-11/+63
| | | | llvm-svn: 187563
OpenPOWER on IntegriCloud