summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/NVPTX
Commit message (Collapse)AuthorAgeFilesLines
...
* [cleanup] Move the Dominators.h and Verifier.h headers into the IRChandler Carruth2014-01-131-1/+1
| | | | | | | | | | | | | | | | | | directory. These passes are already defined in the IR library, and it doesn't make any sense to have the headers in Analysis. Long term, I think there is going to be a much better way to divide these matters. The dominators code should be fully separated into the abstract graph algorithm and have that put in Support where it becomes obvious that evn Clang's CFGBlock's can use it. Then the verifier can manually construct dominance information from the Support-driven interface while the Analysis library can provide a pass which both caches, reconstructs, and supports a nice update API. But those are very long term, and so I don't want to leave the really confusing structure until that day arrives. llvm-svn: 199082
* [PM] Rename the IR printing pass header to a more generic and correctChandler Carruth2014-01-121-1/+1
| | | | | | | | name to match the source file which I got earlier. Update the include sites. Also modernize the comments in the header to use the more recommended doxygen style. llvm-svn: 199041
* Put the functionality for printing a value to a raw_ostream as anChandler Carruth2014-01-091-2/+1
| | | | | | | | | | | | operand into the Value interface just like the core print method is. That gives a more conistent organization to the IR printing interfaces -- they are all attached to the IR objects themselves. Also, update all the users. This removes the 'Writer.h' header which contained only a single function declaration. llvm-svn: 198836
* Move the llvm mangler to lib/IR.Rafael Espindola2014-01-072-2/+1
| | | | | | This makes it available to tools that don't link with target (like llvm-ar). llvm-svn: 198708
* Move the LLVM IR asm writer header files into the IR directory, as theyChandler Carruth2014-01-072-2/+2
| | | | | | | | | | | | | | | | | are part of the core IR library in order to support dumping and other basic functionality. Rename the 'Assembly' include directory to 'AsmParser' to match the library name and the only functionality left their -- printing has been in the core IR library for quite some time. Update all of the #includes to match. All of this started because I wanted to have the layering in good shape before I started adding support for printing LLVM IR using the new pass infrastructure, and commandline support for the new pass infrastructure. llvm-svn: 198688
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-076-18/+17
| | | | | | | | | | subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
* Make the llvm mangler depend only on DataLayout.Rafael Espindola2014-01-031-1/+1
| | | | | | | | | | | | | | 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-193-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* The preferred alignment defaults to the abi alignment. Omit if it is the same.Rafael Espindola2013-12-161-2/+2
| | | | llvm-svn: 197400
* Don't duplicate the DataLayout defaults for integer, floats and vectors.Rafael Espindola2013-12-161-3/+1
| | | | llvm-svn: 197398
* On DataLayout, omit the default of p:64:64:64.Rafael Espindola2013-12-161-3/+1
| | | | llvm-svn: 197397
* Refactor NVPTX's computeDataLayout.Rafael Espindola2013-12-141-4/+9
| | | | | | No functionality change. llvm-svn: 197312
* Turn NVPTXSubtarget::getDataLayout into a static function.Rafael Espindola2013-12-142-16/+11
| | | | | | No functionality change. llvm-svn: 197311
* Prune redundant dependencies in LLVMBuild.txt.NAKAMURA Takumi2013-12-112-2/+2
| | | | llvm-svn: 196988
* Add proper dependencies to LLVMBuild.txt in llvm/lib.NAKAMURA Takumi2013-12-101-1/+1
| | | | | | I'll prune redundant deps in LLVMBuild.txt, later. llvm-svn: 196881
* Remove the notion of primitive types.Rafael Espindola2013-12-072-7/+6
| | | | | | | | | | They were out of place since the introduction of arbitrary precision integer types. This also synchronizes the documentation to Types.h, so it refers to first class types and single value types. llvm-svn: 196661
* [NVPTX] Fix off-by-one error when creating the VT list for an SDNodeJustin Holewinski2013-12-051-1/+1
| | | | llvm-svn: 196503
* Correct word hyphenationsAlp Toker2013-12-051-1/+1
| | | | | | | This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities and contractions in nearby lines. llvm-svn: 196471
* Don't set PrivateGlobalPrefix for NVPTX and R600.Rafael Espindola2013-12-031-1/+0
| | | | | | These targets have special asm printers that don't use these. llvm-svn: 196187
* Don't set PrivateGlobalPrefix twice in the same function.Rafael Espindola2013-12-021-2/+0
| | | | llvm-svn: 196169
* Remove dead code.Rafael Espindola2013-12-021-15/+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
* Change the default of AsmWriterClassName and isMCAsmWriter.Rafael Espindola2013-12-021-6/+0
| | | | llvm-svn: 196065
* Remove dead declarations.Rafael Espindola2013-12-021-2/+0
| | | | llvm-svn: 196063
* [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-284-7/+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. add_llvm_target() ↵NAKAMURA Takumi2013-11-283-7/+0
| | | | | | sets them. llvm-svn: 195921
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-197-26/+38
| | | | | | | | | | | | 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-187-39/+25
| | | | | | | | | | | | 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-157-25/+39
| | | | | | | | | | | 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
* [NVPTX] Fix handling of indirect callsJustin Holewinski2013-11-156-12/+46
| | | | | | Using a special machine node is cleaner than an InlineAsm node, and fixes an assertion failure in InstrEmitter llvm-svn: 194810
* Add addrspacecast instruction.Matt Arsenault2013-11-151-1/+1
| | | | | | Patch by Michele Scandale! llvm-svn: 194760
* Remove AllowQuotesInName and friends from MCAsmInfo.Rafael Espindola2013-11-131-2/+0
| | | | | | | | | | | Accepting quotes is a property of an assembler, not of an object file. For example, ELF can support any names for sections and symbols, but the gnu assembler only accepts quotes in some contexts and llvm-mc in a few more. LLVM should not produce different symbols based on a guess about which assembler will be reading the code it is printing. llvm-svn: 194575
* [NVPTX] Properly handle bitcast ConstantExpr when checking for the alignment ↵Justin Holewinski2013-11-111-13/+38
| | | | | | of function parameters llvm-svn: 194410
* [NVPTX] Fix logic error in loading vector parameters of more than 4 componentsJustin Holewinski2013-11-111-1/+1
| | | | llvm-svn: 194409
* [NVPTX] Blacklist TailDuplicate passJustin Holewinski2013-11-111-0/+1
| | | | | | | | This causes issues with virtual registers. We will likely need to fix TailDuplicate in the future, or introduce a new version that plays nicely with vregs. llvm-svn: 194373
* Move getSymbol to TargetLoweringObjectFile.Rafael Espindola2013-10-292-1/+2
| | | | | | This allows constructing a Mangler with just a TargetMachine. llvm-svn: 193630
* Add a helper getSymbol to AsmPrinter.Rafael Espindola2013-10-292-19/+19
| | | | llvm-svn: 193627
* NVPTX: Remove unused globals.Benjamin Kramer2013-10-271-7/+3
| | | | llvm-svn: 193500
* Mark some command line flags as hiddenNadav Rotem2013-10-183-8/+8
| | | | llvm-svn: 193013
* Assert on duplicate registration. Don't depend on function pointer equality.Rafael Espindola2013-10-161-3/+0
| | | | | | | | | | | | | | | | | | | | Before this patch we would assert when building llvm as multiple shared libraries (cmake's BUILD_SHARED_LIBS). The problem was the line if (T.AsmStreamerCtorFn == Target::createDefaultAsmStreamer) which returns false because of -fvisibility-inlines-hidden. It is easy to fix just this one case, but I decided to try to also make the registration more strict. It looks like the old logic for ignoring followup registration was just a temporary hack that outlived its usefulness. This patch converts the ifs to asserts, fixes the few cases that were registering twice and makes sure all the asserts compare with null. Thanks for Joerg for reporting the problem and reviewing the patch. llvm-svn: 192803
* [NVPTX] Switch from StrongPHIElimination to PHIElimination in ↵Justin Holewinski2013-10-111-2/+22
| | | | | | | | NVPTXTargetMachine, and add some missing optimization passes to addOptimizedRegAlloc Fixes PR17529 llvm-svn: 192445
* Make AsmPrinter::emitImplicitDef a virtual method so targets can emit custom ↵Justin Holewinski2013-10-112-15/+36
| | | | | | | | | | | | | comments for implicit defs For NVPTX, this fixes a crash where the emitImplicitDef implementation was expecting physical registers, while NVPTX uses virtual registers (with a couple of exceptions). Now, the implicit def comment will be emitted as a true PTX register name. Other targets can use this to customize the output of implicit def comments. Fixes PR17519 llvm-svn: 192444
* Fix spelling intruction -> instruction.Robert Wilhelm2013-09-281-1/+1
| | | | llvm-svn: 191610
* ISelDAG: spot chain cycles involving MachineNodesTim Northover2013-09-221-1/+3
| | | | | | | | | | | | | | | | | Previously, the DAGISel function WalkChainUsers was spotting that it had entered already-selected territory by whether a node was a MachineNode (amongst other things). Since it's fairly common practice to insert MachineNodes during ISelLowering, this was not the correct check. Looking around, it seems that other nodes get their NodeId set to -1 upon selection, so this makes sure the same thing happens to all MachineNodes and uses that characteristic to determine whether we should stop looking for a loop during selection. This should fix PR15840. llvm-svn: 191165
* [NVPTX] Support constant vector globalsJustin Holewinski2013-09-191-1/+1
| | | | llvm-svn: 190997
* [NVPTX] Re-enable assembly printing support for inline assemblyJustin Holewinski2013-08-242-1/+119
| | | | | | This support was removed by accident during the MC conversion llvm-svn: 189160
* Remove unused stdio.h includesDmitri Gribenko2013-08-181-1/+0
| | | | llvm-svn: 188626
* Replace getValueType().getSimpleVT() with getSimpleValueType().Craig Topper2013-08-151-3/+2
| | | | llvm-svn: 188442
* [NVPTX] We dont have any target specific flags yet for generating symbol ↵Justin Holewinski2013-08-061-7/+2
| | | | | | references, so get rid of the default-only switch statement. Fixes an MSVC warning. llvm-svn: 187829
* [NVPTX] Add missing patterns for i1 [s,u]int_to_fpJustin Holewinski2013-08-061-11/+19
| | | | llvm-svn: 187800
OpenPOWER on IntegriCloud