summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/NVPTX
Commit message (Collapse)AuthorAgeFilesLines
...
* [NVPTX] Fix bug in stack code generation causes by MC conversionJustin Holewinski2013-08-064-53/+68
| | | | | | | We do use a very small set of physical registers, so account for them in the virtual register encoding between MachineInstr and MC llvm-svn: 187799
* [NVPTX] Start conversion to MC infrastructureJustin Holewinski2013-08-0610-317/+593
| | | | | | | | | This change converts the NVPTX target to use the MC infrastructure instead of directly emitting MachineInstr instances. This brings the target more up-to-date with LLVM TOT, and should fix PR15175 and PR15958 (libNVPTXInstPrinter is empty) as a side-effect. llvm-svn: 187798
* 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
* [NVPTX] Remove unused prototypesJustin Holewinski2013-07-221-3/+0
| | | | llvm-svn: 186844
* [NVPTX] Use approximate FP ops when unsafe-fp-math is used, and appendJustin Holewinski2013-07-223-56/+61
| | | | | | .ftz to instructions if the nvptx-f32ftz attribute is set to "true" llvm-svn: 186820
* ARM: implement ldrex, strex and clrex intrinsicsTim Northover2013-07-161-1/+1
| | | | | | | Intrinsics already existed for the 64-bit variants, so these support operations of size at most 32-bits. llvm-svn: 186392
* Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector ↵Craig Topper2013-07-141-3/+3
| | | | | | size. llvm-svn: 186274
* Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid ↵Craig Topper2013-07-042-2/+2
| | | | | | specifying the vector size. llvm-svn: 185606
* [NVPTX] Add support for module-scope inline asmJustin Holewinski2013-07-011-0/+10
| | | | | | | Since we were explicitly not calling AsmPrinter::doInitialization, any module-scope inline asm was not being printed. llvm-svn: 185336
* [NVPTX] We dont use NVBuiltin anymoreJustin Holewinski2013-07-012-3/+0
| | | | llvm-svn: 185335
* [NVPTX] Cut down on physical register defsJustin Holewinski2013-07-013-28/+13
| | | | | | | | We are using virtual registers throughout now, but we still need to keep a few physical registers per class around to keep the infrastructure happy. llvm-svn: 185334
* [NVPTX] 64-bit ADDC/ADDE are not legalJustin Holewinski2013-07-011-0/+3
| | | | llvm-svn: 185333
* [NVPTX] Fix vector loads from parameters that span multiple loads, and fix ↵Justin Holewinski2013-07-012-156/+9
| | | | | | some typos llvm-svn: 185332
* [NVPTX] Handle signext/zeroext attributes properlyJustin Holewinski2013-07-011-19/+25
| | | | | | | | Fix a case where we were incorrectly sign-extending a value when we should have been zero-extending the value. Also change some SIGN_EXTEND to ANY_EXTEND because we really dont care and may have more opportunity to fold subexpressions llvm-svn: 185331
* [NVPTX] Add support for native SIGN_EXTEND_INREG where availableJustin Holewinski2013-07-012-4/+32
| | | | llvm-svn: 185330
* [NVPTX] Add isel patterns for [reg+offset] form of ldg/ldu.Justin Holewinski2013-07-012-112/+430
| | | | llvm-svn: 185329
* [NVPTX] Make sure we zero out high-order 24 bits for 8-bit load into 32-bit ↵Justin Holewinski2013-07-011-1/+2
| | | | | | value llvm-svn: 185328
* NVPTX: Fold otherwise unused variable into assert.Benjamin Kramer2013-06-291-2/+2
| | | | | | Avoids unused variable warnings in release builds. llvm-svn: 185271
* [NVPTX] Select -1 instead of 1 when anyextend'ing i1 typesJustin Holewinski2013-06-281-3/+3
| | | | | | This makes it more consistent with the ZeroOrNegativeOneBooleanContent flag llvm-svn: 185179
* [NVPTX] Add (1.0 / sqrt(x)) => rsqrt(x) generation when allowable by FP flagsJustin Holewinski2013-06-281-1/+12
| | | | llvm-svn: 185178
* [NVPTX] Calling conventions fixJustin Holewinski2013-06-281-24/+40
| | | | | | | | Fix ABI handling for function returning bool -- use st.param.b32 to return the value and use ld.param.b32 in caller to load the return value. llvm-svn: 185177
* [NVPTX] Add support for cttz/ctlz/ctpopJustin Holewinski2013-06-282-0/+74
| | | | llvm-svn: 185176
* [NVPTX] Clean up comparison/select/convert patterns and factor out PTX ↵Justin Holewinski2013-06-288-949/+1129
| | | | | | | | instructions from their patterns Test case is no breakage llvm-svn: 185175
* [NVPTX] Remove i8 register class. PTX support for i8 (.b8, .u8, .s8) is ↵Justin Holewinski2013-06-2810-859/+1243
| | | | | | rather poor and we're better off just ignoring it and letting LLVM expand all i8 ops out to i16. llvm-svn: 185174
* [NVPTX] Add support for vectorized function return valuesJustin Holewinski2013-06-281-27/+137
| | | | llvm-svn: 185173
* [NVPTX] Clean up handling of formal arguments and enable generation of ↵Justin Holewinski2013-06-281-114/+202
| | | | | | vector parameter loads llvm-svn: 185172
* [NVPTX] Add infrastructure for vector loads/stores of parametersJustin Holewinski2013-06-283-0/+155
| | | | llvm-svn: 185171
* Debug Info: clean up usage of Verify.Manman Ren2013-06-281-2/+4
| | | | | | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. For cases where we know the type of a DI metadata, use assert. Also update testing cases to make them conform to the format of DI classes. llvm-svn: 185135
* Revert "Debug Info: clean up usage of Verify." as it's breaking bots.Eric Christopher2013-06-261-1/+1
| | | | | | This reverts commit r185020 llvm-svn: 185032
* Debug Info: clean up usage of Verify.Manman Ren2013-06-261-1/+1
| | | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. llvm-svn: 185020
* [NVPTX] Default pointer type doesn't make sense for getParamSymbol()Justin Holewinski2013-06-252-2/+2
| | | | llvm-svn: 184831
* NVPTXTargetObjectFile.h: Initialize some pointers as NULL in the constructor ↵NAKAMURA Takumi2013-06-241-1/+23
| | | | | | | | of NVPTXTargetObjectFile. ~NVPTXTargetObjectFile() tries to delete them. It caused crash on some hosts since r184595. llvm-svn: 184728
* The getRegForInlineAsmConstraint function should only accept MVT value types.Chad Rosier2013-06-222-2/+2
| | | | llvm-svn: 184642
* [NVPTX] Add support for selecting CUDA vs OCL mode based on tripleJustin Holewinski2013-06-212-13/+7
| | | | | | IR for CUDA should use "nvptx[64]-nvidia-cuda", and IR for NV OpenCL should use "nvptx[64]-nvidia-nvcl" llvm-svn: 184579
* Don't pass in the TargetInstrInfo into the register info object. It doesn't ↵Bill Wendling2013-06-193-4/+3
| | | | | | use it. llvm-svn: 184369
* [NVPTX] Remove old CONST_NOT_GEN address space that is not being used ↵Justin Holewinski2013-06-103-39/+11
| | | | | | anymore and causes constants to be emitted in the global address space llvm-svn: 183652
* NVPTX: Don't even create a regalloc if we're not going to use it.Benjamin Kramer2013-05-311-2/+7
| | | | | | Fixes a leak found by valgrind. llvm-svn: 183031
* [NVPTX] Re-enable support for virtual registers in the final outputJustin Holewinski2013-05-318-66/+307
| | | | | | | | | | | | Now that 3.3 is branched, we are re-enabling virtual registers to help iron out bugs before the next release. Some of the post-RA passes do not play well with virtual registers, so we disable them for now. The needed functionality of the PrologEpilogInserter pass is copied to a new backend-specific NVPTXPrologEpilog pass. The test for this commit is not breaking the existing tests. llvm-svn: 182998
* [NVPTX] Fix case where a sext load of an i1 type may produce anJustin Holewinski2013-05-301-2/+4
| | | | | | ld.u1 instead of an ld.u8. llvm-svn: 182924
* Order CALLSEQ_START and CALLSEQ_END nodes.Andrew Trick2013-05-291-3/+4
| | | | | | | | | | | | Fixes PR16146: gdb.base__call-ar-st.exp fails after pre-RA-sched=source fixes. Patch by Xiaoyi Guo! This also fixes an unsupported dbg.value test case. Codegen was previously incorrect but the test was passing by luck. llvm-svn: 182885
* Don't reach into the middle of TargetMachine and cache one of its ivars.Bill Wendling2013-05-291-1/+1
| | | | | | Not only does this break encapsulation, it's gross. llvm-svn: 182876
* Track IR ordering of SelectionDAG nodes 3/4.Andrew Trick2013-05-251-3/+3
| | | | | | | Remove the old IR ordering mechanism and switch to new one. Fix unit test failures. llvm-svn: 182704
* Track IR ordering of SelectionDAG nodes 2/4.Andrew Trick2013-05-253-17/+17
| | | | | | | Change SelectionDAG::getXXXNode() interfaces as well as call sites of these functions to pass in SDLoc instead of DebugLoc. llvm-svn: 182703
* Move passes from namespace llvm into anonymous namespaces. Sort includes ↵Benjamin Kramer2013-05-231-2/+2
| | | | | | while there. llvm-svn: 182594
* More symbols that should be static.Benjamin Kramer2013-05-231-5/+3
| | | | llvm-svn: 182590
* [NVPTX] Add @llvm.nvvm.sqrt.f() intrinsicJustin Holewinski2013-05-214-0/+24
| | | | llvm-svn: 182394
* [NVPTX] Fix mis-use of CurrentFnSym in NVPTXAsmPrinter. This was causing a ↵Justin Holewinski2013-05-201-9/+7
| | | | | | symbol name error in the output PTX. llvm-svn: 182298
* [NVPTX] Add programmatic interface to NVVMReflect passJustin Holewinski2013-05-202-3/+24
| | | | llvm-svn: 182297
* [NVPTX] Add GenericToNVVM IR converter to better handle idiomatic LLVM IR inputsJustin Holewinski2013-05-207-80/+525
| | | | | | | | | | | | | | | This converter currently only handles global variables in address space 0. For these variables, they are promoted to address space 1 (global memory), and all uses are updated to point to the result of a cvta.global instruction on the new variable. The motivation for this is address space 0 global variables are illegal since we cannot declare variables in the generic address space. Instead, we place the variables in address space 1 and explicitly convert the pointer to address space 0. This is primarily intended to help new users who expect to be able to place global variables in the default address space. llvm-svn: 182254
* [NVPTX] Fix i1 kernel parameters and global variables. ABI rules say we ↵Justin Holewinski2013-05-201-2/+12
| | | | | | need to use .u8 for i1 parameters for kernels. llvm-svn: 182253
OpenPOWER on IntegriCloud