summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/R600/SILowerControlFlow.cpp
Commit message (Collapse)AuthorAgeFilesLines
* R600/SI: Add preliminary support for flat address spaceMatt Arsenault2014-09-151-1/+45
| | | | llvm-svn: 217777
* Have MachineFunction cache a pointer to the subtarget to make lookupsEric Christopher2014-08-051-4/+3
| | | | | | | | | | | shorter/easier and have the DAG use that to do the same lookup. This can be used in the future for TargetMachine based caching lookups from the MachineFunction easily. Update the MIPS subtarget switching machinery to update this pointer at the same time it runs. llvm-svn: 214838
* Remove the TargetMachine forwards for TargetSubtargetInfo basedEric Christopher2014-08-041-2/+5
| | | | | | information and update all callers. No functional change. llvm-svn: 214781
* R600: Make ShaderType privateMatt Arsenault2014-07-131-7/+9
| | | | llvm-svn: 212896
* R600/SI: Re-initialize the m0 register after using it for indirect addressingTom Stellard2014-06-171-37/+50
| | | | | | | | | | | | We need to store a value greater than or equal to the number of LDS bytes allocated by the shader in the m0 register in order for LDS instructions to work correctly. We always initialize m0 at the beginning of a shader, but this register is also used for indirect addressing offsets, so we need to re-initialize it any time we use indirect addressing. llvm-svn: 211107
* R600/SI: Use VALU instructions for copying i1 valuesTom Stellard2014-04-301-2/+2
| | | | | | | | | We can't use SALU instructions for this since they ignore the EXEC mask and are always executed. This fixes several OpenCV tests. llvm-svn: 207661
* [C++11] Add 'override' keywords and remove 'virtual'. Additionally add ↵Craig Topper2014-04-291-2/+2
| | | | | | 'final' and leave 'virtual' on some methods that are marked virtual without overriding anything and have no obvious overrides themselves. R600 edition llvm-svn: 207503
* [C++] Use 'nullptr'. Target edition.Craig Topper2014-04-251-1/+1
| | | | llvm-svn: 207197
* R600: avoid calling std::next on an iterator that might be end()Tim Northover2014-03-281-3/+3
| | | | | | | | This was causing my llc to go into an infinite loop on CodeGen/R600/address-space.ll (just triggered recently by some allocator changes). llvm-svn: 205005
* R600/SI: Use correct dest register class for V_READFIRSTLANE_B32Tom Stellard2014-03-171-2/+3
| | | | | | | | | | | | This instructions writes to an 32-bit SGPR. This change required adding the 32-bit VCC_LO and VCC_HI registers, because the full VCC register is 64 bits. This fixes verifier errors on several of the indirect addressing piglit tests. Tested-by: Michel Dänzer <michel.daenzer@amd.com> llvm-svn: 204055
* [C++11] Replace llvm::next and llvm::prior with std::next and std::prev.Benjamin Kramer2014-03-021-2/+2
| | | | | | Remove the old functions. llvm-svn: 202636
* R600/SI: Optimize SI_KILL for constant operandsMichel Danzer2014-02-271-4/+15
| | | | | | | | If the SI_KILL operand is constant, we can either clear the exec mask if the operand is negative, or do nothing otherwise. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 202337
* R600/SI: Allow SI_KILL for geometry shadersMichel Danzer2014-02-271-3/+7
| | | | | Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 202336
* R600/SI: Fix assertion on infinite loops.Matt Arsenault2014-02-111-2/+4
| | | | | | | This isn't the most useful case to fix in the real world, but bugpoint runs into this. llvm-svn: 201177
* R600/SI: Initialize M0 and emit S_WQM_B64 whenever DS instructions are usedTom Stellard2014-02-101-10/+7
| | | | | | | | | | | DS instructions that access local memory can only uses addresses that are less than or equal to the value of M0. When M0 is uninitialized, then we experience undefined behavior. This patch also changes the behavior to emit S_WQM_B64 on pixel shaders no matter what kind of DS instruction is used. llvm-svn: 201097
* R600/SI: Only use S_WQM_B64 in pixel shadersTom Stellard2014-02-101-1/+1
| | | | | | | | This doesn't change any functionality, since we only have two shader types (compute and pixel) that use local memory. We're just changing the logic to match the documentation. llvm-svn: 201096
* Use llvm_unreachable instead of assert(0)Matt Arsenault2013-12-101-7/+2
| | | | llvm-svn: 196971
* R600/SI: Add support for private address space load/storeTom Stellard2013-11-131-3/+10
| | | | | | | Private address space is emulated using the register file with MOVRELS and MOVRELD instructions. llvm-svn: 194626
* R600: Add support for local memory atomic addTom Stellard2013-09-051-0/+1
| | | | llvm-svn: 190080
* R600/SI: Don't emit S_WQM_B64 instruction for compute shadersTom Stellard2013-09-051-1/+2
| | | | llvm-svn: 190077
* R600/SI: Initial support for LDS/GDS instructionsMichel Danzer2013-07-101-0/+16
| | | | | Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 186009
* Don't cache the instruction and register info from the TargetMachine, becauseBill Wendling2013-06-071-2/+3
| | | | | | | | the internals of TargetMachine could change. No functionality change intended. llvm-svn: 183561
* R600/SI: replace WQM intrinsicChristian Konig2013-03-261-0/+14
| | | | | | | Just enable WQM when we see an LDS interpolation instruction. Signed-off-by: Christian König <christian.koenig@amd.com> llvm-svn: 178019
* R600/SI: fix ELSE pseudo op handlingChristian Konig2013-03-261-1/+2
| | | | | | | | | | | Restore the EXEC mask early, otherwise a copy might end up not beeing executed. Candidate for the mesa stable branch. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> llvm-svn: 178018
* R600/SI: implement indirect adressing for SIChristian Konig2013-03-181-1/+116
| | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 177277
* R600/SI: cleanup literal handling v3Christian Konig2013-02-161-5/+5
| | | | | | | | | | | | | | | | Seems to be allot simpler, and also paves the way for further improvements. v2: rebased on master, use 0 in BUFFER_LOAD_FORMAT_XYZW, use VGPR0 in dummy EXP, avoid compiler warning, break after encoding the first literal. v3: correctly use V_ADD_F32_e64 This is a candidate for the stable branch. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 175354
* R600/SILowerControlFlow.cpp: Fix a warning. [-Wunused-variable]NAKAMURA Takumi2013-01-211-3/+2
| | | | llvm-svn: 173040
* R600: Optimize and cleanup KILL on SITom Stellard2013-01-181-43/+84
| | | | | | | | | | | | We shouldn't insert KILL optimization if we don't have a kill instruction at all. Patch by: Christian König Tested-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Christian König <deathsimple@vodafone.de> llvm-svn: 172845
* R600: Coding style - remove empty spaces from the beginning of functionsTom Stellard2012-12-211-10/+0
| | | | | | No functionality change. llvm-svn: 170923
* R600: control flow optimizationTom Stellard2012-12-191-0/+49
| | | | | | | | | | | | Branch if we have enough instructions so that it makes sense. Also remove branches if they don't make sense. Patch by: Christian König Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Christian König <deathsimple@vodafone.de> llvm-svn: 170592
* R600: New control flow for SI v2Tom Stellard2012-12-191-89/+190
| | | | | | | | | | | | | | | | | | | | This patch replaces the control flow handling with a new pass which structurize the graph before transforming it to machine instruction. This has a couple of different advantages and currently fixes 20 piglit tests without a single regression. It is now a general purpose transformation that could be not only be used for SI/R6xx, but also for other hardware implementations that use a form of structurized control flow. v2: further cleanup, fixes and documentation Patch by: Christian König Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> llvm-svn: 170591
* Add R600 backendTom Stellard2012-12-111-0/+191
A new backend supporting AMD GPUs: Radeon HD2XXX - HD7XXX llvm-svn: 169915
OpenPOWER on IntegriCloud