summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/R600/AMDGPUSubtarget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* R600 -> AMDGPU renameTom Stellard2015-06-131-133/+0
| | | | llvm-svn: 239657
* Replace string GNU Triples with llvm::Triple in MCSubtargetInfo and ↵Daniel Sanders2015-06-101-7/+6
| | | | | | | | | | | | | | | | | | create*MCSubtargetInfo(). NFC. Summary: This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rafael Reviewed By: rafael Subscribers: rafael, ted, jfb, llvm-commits, rengolin, jholewinski Differential Revision: http://reviews.llvm.org/D10311 llvm-svn: 239467
* R600/SI: Fix bug with v_interp_p1_f32 instructions on 16 bank lds chipsTom Stellard2015-05-251-0/+1
| | | | | | The src and dst register cannot be the same on chips with 16 lds banks. llvm-svn: 238147
* R600/SI: Add assembler support for all CI and VI VOP1 instructionsTom Stellard2015-04-231-1/+1
| | | | llvm-svn: 235629
* R600/SI: Initial support for assembler and inline assemblyTom Stellard2015-04-081-0/+1
| | | | | | | | | | | | | This is currently considered experimental, but most of the more commonly used instructions should work. So far only SI has been extensively tested, CI and VI probably work too, but may be buggy. The current set of tests cases do not give complete coverage, but I think it is sufficient for an experimental assembler. See the documentation in R600Usage for more information. llvm-svn: 234381
* R600/SI: Limit SGPRs to 80 on Tonga and IcelandMarek Olsak2015-03-091-1/+1
| | | | | | This is a candidate for stable. llvm-svn: 231659
* 80-column fixups.Eric Christopher2015-02-191-8/+7
| | | | llvm-svn: 229789
* Reuse a bunch of cached subtargets and remove getSubtarget callsEric Christopher2015-01-301-2/+2
| | | | | | without a Function argument. llvm-svn: 227638
* R600/SI: Add subtarget feature for if f32 fma is fastMatt Arsenault2015-01-291-1/+2
| | | | llvm-svn: 227483
* R600/SI: Define a schedule model and enable the generic machine schedulerTom Stellard2015-01-291-0/+19
| | | | | | The schedule model is not complete yet, and could be improved. llvm-svn: 227461
* R600: Move DataLayout to AMDGPUTargetMachineTom Stellard2015-01-281-15/+3
| | | | | | | | This is a follow up to r227113. It is now required to use the amdgcn target for SI and newer GPUs. llvm-svn: 227316
* R600: Use a Southern Islands GPU as the default for the amdgcn targetTom Stellard2015-01-281-2/+5
| | | | llvm-svn: 227314
* Move DataLayout back to the TargetMachine from TargetSubtargetInfoEric Christopher2015-01-261-14/+14
| | | | | | | | | | | | | | | | | | | derived classes. Since global data alignment, layout, and mangling is often based on the DataLayout, move it to the TargetMachine. This ensures that global data is going to be layed out and mangled consistently if the subtarget changes on a per function basis. Prior to this all targets(*) have had subtarget dependent code moved out and onto the TargetMachine. *One target hasn't been migrated as part of this change: R600. The R600 port has, as a subtarget feature, the size of pointers and this affects global data layout. I've currently hacked in a FIXME to enable progress, but the port needs to be updated to either pass the 64-bitness to the TargetMachine, or fix the DataLayout to avoid subtarget dependent features. llvm-svn: 227113
* R600/SI: Add subtarget feature to enable VGPR spilling for all shader typesTom Stellard2015-01-201-0/+7
| | | | | | | This is disabled by default, but can be enabled with the subtarget feature: 'vgpr-spilling' llvm-svn: 226597
* [cleanup] Re-sort all the #include lines in LLVM usingChandler Carruth2015-01-141-3/+1
| | | | | | | | | | | utils/sort_includes.py. I clearly haven't done this in a while, so more changed than usual. This even uncovered a missing include from the InstrProf library that I've added. No functionality changed here, just mechanical cleanup of the include order. llvm-svn: 225974
* R600/SI: Emit amd_kernel_code_t header for AMDGPU environmentTom Stellard2014-12-021-0/+7
| | | | llvm-svn: 223160
* R600/SI: Set the ATC bit on all resource descriptors for the HSA runtimeTom Stellard2014-12-021-1/+2
| | | | llvm-svn: 223125
* R600/SI: Add load / store machine optimizer pass.Matt Arsenault2014-10-101-1/+1
| | | | | | | | | | | | | Currently this only functions to match simple cases where ds_read2_* / ds_write2_* instructions can be used. In the future it might match some of the other weird load patterns, such as direct to LDS loads. Currently enabled only with a subtarget feature to enable easier testing. llvm-svn: 219533
* R600/SI: Add preliminary support for flat address spaceMatt Arsenault2014-09-151-2/+2
| | | | llvm-svn: 217777
* Correct commentMatt Arsenault2014-08-061-1/+1
| | | | llvm-svn: 214945
* Move the R600 intrinsic support back to the target machine - there'sEric Christopher2014-08-041-1/+1
| | | | | | | nothing subtarget dependent about the intrinsic support in any backend as far as I can tell. llvm-svn: 214738
* Move R600 subtarget dependent variables onto the subtarget.Eric Christopher2014-07-251-25/+45
| | | | | | No functional change. llvm-svn: 213982
* R600: Add denormal handling subtarget features.Matt Arsenault2014-07-141-1/+17
| | | | llvm-svn: 213018
* R600: Add option to disable promote allocaMatt Arsenault2014-07-131-1/+8
| | | | | | | This can make writing some tests harder, so add a flag to disable it. llvm-svn: 212893
* R600: Move trivial getters into header, use initializer listMatt Arsenault2014-06-271-78/+19
| | | | llvm-svn: 211917
* R600: Use LDS and vectors for private memoryTom Stellard2014-06-171-0/+5
| | | | llvm-svn: 211110
* R600: Move AMDGPUInstrInfo from AMDGPUTargetMachine into AMDGPUSubtargetTom Stellard2014-06-131-0/+8
| | | | llvm-svn: 210869
* R600: Remove unused function AMDGPUSubtarget::getDefaultSize()Tom Stellard2014-04-301-11/+0
| | | | llvm-svn: 207654
* [Modules] Make Support/Debug.h modular. This requires it to not changeChandler Carruth2014-04-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | behavior based on other files defining DEBUG_TYPE, which means it cannot define DEBUG_TYPE at all. This is actually better IMO as it forces folks to define relevant DEBUG_TYPEs for their files. However, it requires all files that currently use DEBUG(...) to define a DEBUG_TYPE if they don't already. I've updated all such files in LLVM and will do the same for other upstream projects. This still leaves one important change in how LLVM uses the DEBUG_TYPE macro going forward: we need to only define the macro *after* header files have been #include-ed. Previously, this wasn't possible because Debug.h required the macro to be pre-defined. This commit removes that. By defining DEBUG_TYPE after the includes two things are fixed: - Header files that need to provide a DEBUG_TYPE for some inline code can do so by defining the macro before their inline code and undef-ing it afterward so the macro does not escape. - We no longer have rampant ODR violations due to including headers with different DEBUG_TYPE definitions. This may be mostly an academic violation today, but with modules these types of violations are easy to check for and potentially very relevant. Where necessary to suppor headers with DEBUG_TYPE, I have moved the definitions below the includes in this commit. I plan to move the rest of the DEBUG_TYPE macros in LLVM in subsequent commits; this one is big enough. The comments in Debug.h, which were hilariously out of date already, have been updated to reflect the recommended practice going forward. llvm-svn: 206822
* R600: Recommit 199842: Add work-around for the CF stack entry HW bugTom Stellard2014-01-231-0/+6
| | | | | | | | | | | | | | | | | | The unit test is now disabled on non-asserts builds. The CF stack can be corrupted if you use CF_ALU_PUSH_BEFORE, CF_ALU_ELSE_AFTER, CF_ALU_BREAK, or CF_ALU_CONTINUE when the number of sub-entries on the stack is greater than or equal to the stack entry size and sub-entries modulo 4 is either 0 or 3 (on cedar the bug is present when number of sub-entries module 8 is either 7 or 0) We choose to be conservative and always apply the work-around when the number of sub-enries is greater than or equal to the stack entry size, so that we can safely over-allocate the stack when we are unsure of the stack allocation rules. reviewed-by: Vincent Lejeune <vljn at ovi.com> llvm-svn: 199905
* Revert "R600: Add work-around for the CF stack entry HW bug"Tom Stellard2014-01-221-6/+0
| | | | | | | | | This reverts commit 35b8331cad6eb512a2506adbc394201181da94ba. The -debug-only flag for llc doesn't appear to be available in all build configurations. llvm-svn: 199845
* R600: Add work-around for the CF stack entry HW bugTom Stellard2014-01-221-0/+6
| | | | | | | | | | | | | | | | The CF stack can be corrupted if you use CF_ALU_PUSH_BEFORE, CF_ALU_ELSE_AFTER, CF_ALU_BREAK, or CF_ALU_CONTINUE when the number of sub-entries on the stack is greater than or equal to the stack entry size and sub-entries modulo 4 is either 0 or 3 (on cedar the bug is present when number of sub-entries module 8 is either 7 or 0) We choose to be conservative and always apply the work-around when the number of sub-enries is greater than or equal to the stack entry size, so that we can safely over-allocate the stack when we are unsure of the stack allocation rules. reviewed-by: Vincent Lejeune <vljn at ovi.com> llvm-svn: 199842
* R600: Refactor stack size calculationTom Stellard2014-01-221-0/+17
| | | | | reviewed-by: Vincent Lejeune <vljn at ovi.com> llvm-svn: 199840
* R600: Add wavefront size property to the subtargets v2Tom Stellard2014-01-221-0/+5
| | | | | | | | v2: - Initialize wavefront size to 0 reviewed-by: Vincent Lejeune <vljn at ovi.com> llvm-svn: 199838
* Turn AMDGPUSubtarget::getDataLayout into a static function.Rafael Espindola2013-12-141-27/+0
| | | | | | No functionality change. llvm-svn: 197310
* Fix an index array check.Eric Christopher2013-12-061-1/+1
| | | | | | Patch by Marius Wachtler. llvm-svn: 196561
* R600: Enable the IR structurizer by defaultTom Stellard2013-11-181-1/+1
| | | | llvm-svn: 195031
* R600: Add a SubtargetFeatture for disabling the ifcvt pass.Tom Stellard2013-11-181-0/+5
| | | | | | This is useful when writing test cases for the AMDIL structurizer. llvm-svn: 195029
* R600: Use StructurizeCFGPass for non SI targetsTom Stellard2013-10-101-0/+5
| | | | | | | | | | | | | | StructurizeCFG pass allows to make complex cfg reducible ; it allows a lot of shader from shadertoy (which exhibits complex control flow constructs) to works correctly with respect to CFG handling (and allow us to detect potential bug in other part of the backend). We provide a cmd line argument to disable the pass for debug purpose. Patch by: Vincent Lejeune Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 192363
* SelectionDAG: Use correct pointer size when lowering function arguments v2Tom Stellard2013-08-261-0/+4
| | | | | | | | | | | | | | | | This adds minimal support to the SelectionDAG for handling address spaces with different pointer sizes. The SelectionDAG should now correctly lower pointer function arguments to the correct size as well as generate the correct code when lowering getelementptr. This patch also updates the R600 DataLayout to use 32-bit pointers for the local address space. v2: - Add more helper functions to TargetLoweringBase - Use CHECK-LABEL for tests llvm-svn: 189221
* Remove unused stdio.h includesDmitri Gribenko2013-08-181-1/+0
| | | | llvm-svn: 188626
* R600: Rework subtarget info and remove AMDILDevice classesTom Stellard2013-06-071-25/+35
| | | | | | | | This should simplify the subtarget definitions and make it easier to add new ones. Reviewed-by: Vincent Lejeune <vljn@ovi.com> llvm-svn: 183566
* R600: Fix the fetch limits for R600 generation GPUsTom Stellard2013-06-071-10/+1
| | | | | | | | Reviewed-by: Vincent Lejeune <vljn@ovi.com> https://bugs.freedesktop.org/show_bug.cgi?id=64257 llvm-svn: 183560
* Temporary fix to get rid of gcc warning.Patrik Hagglund2013-05-291-1/+10
| | | | llvm-svn: 182832
* R600: Factorize Fetch size limit inside AMDGPUSubTargetVincent Lejeune2013-05-171-0/+5
| | | | llvm-svn: 182122
* R600: Add FetchInst bit to instruction defs to denote vertex/tex instructionsVincent Lejeune2013-04-301-0/+5
| | | | | | v2[Vincent Lejeune]: Split FetchInst into usesTextureCache/usesVertexCache llvm-svn: 180755
* Add R600 backendTom Stellard2012-12-111-0/+87
A new backend supporting AMD GPUs: Radeon HD2XXX - HD7XXX llvm-svn: 169915
OpenPOWER on IntegriCloud