summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/R600/SIRegisterInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* R600/SI: Remove VReg_32 register classTom Stellard2015-01-071-5/+5
| | | | | | | | | | | Use VGPR_32 register class instead. These two register classes were identical and having separate classes was causing SIInstrInfo::isLegalOperands() to be overly conservative in some cases. This change is necessary to prevent future paches from missing a folding opportunity in fneg-fabs.ll. llvm-svn: 225382
* R600/SI: Make sure non-inline constants aren't folded into mubuf soffset operandTom Stellard2014-12-191-0/+1
| | | | | | | | mubuf instructions now define the soffset field using the SCSrc_32 register class which indicates that only SGPRs and inline constants are allowed. llvm-svn: 224622
* R600/SI: Fix allocating flat_scr_lo / flat_scr_hiMatt Arsenault2014-11-251-0/+2
| | | | | | | | Only the super register flat_scr was marked as reserved, so in some cases with high register usage it would still try to allocate the subregisters. llvm-svn: 222737
* R600/SI: Fix spilling of m0 registerTom Stellard2014-11-141-1/+9
| | | | | | | | | | If we have spilled the value of the m0 register, then we need to restore it with v_readlane_b32 to a regular sgpr, because v_readlane_b32 can't write to m0. v_readlane_b32 can't write to m0, so llvm-svn: 222036
* R600/SI: Make constant array staticMatt Arsenault2014-11-141-1/+1
| | | | llvm-svn: 221965
* R600/SI: Add new helper isSGPRClassIDMatt Arsenault2014-09-241-7/+0
| | | | | | Move these into header since they are trivial llvm-svn: 218360
* R600/SI: Mark EXEC_LO and EXEC_HI as reservedTom Stellard2014-09-241-0/+6
| | | | | | | These registers can be allocated and used like other 32-bit registers, but it seems like a likely source for bugs. llvm-svn: 218350
* R600/SI: Fix SIRegisterInfo::getPhysRegSubReg()Tom Stellard2014-09-241-1/+10
| | | | | | | | Correctly handle special registers: EXEC, EXEC_LO, EXEC_HI, VCC_LO, VCC_HI, and M0. The previous implementation would assertion fail when passed these registers. llvm-svn: 218349
* R600/SI: Implement VGPR register spilling for compute at -O0 v3Tom Stellard2014-09-241-1/+114
| | | | | | | | | | | | | | VGPRs are spilled to LDS. This still needs more testing, but we need to at least enable it at -O0, because the fast register allocator spills all registers that are live at the end of blocks and without this some future commits will break the flat-address-space.ll test. v2: Only calculate thread id once v3: Move insertion of spill instructions to SIRegisterInfo::eliminateFrameIndex() llvm-svn: 218348
* R600/SI: Clean up checks for legality of immediate operandsTom Stellard2014-09-231-3/+21
| | | | | | | | | | | | | | There are new register classes VCSrc_* which represent operands that can take an SGPR, VGPR or inline constant. The VSrc_* class is now used to represent operands that can take an SGPR, VGPR, or a 32-bit immediate. This allows us to have more accurate checks for legality of immediates, since before we had no way to distinguish between operands that supported any 32-bit immediate and operands which could only support inline constants. llvm-svn: 218334
* R600/SI: Add enums for some hard-coded valuesTom Stellard2014-09-221-0/+8
| | | | llvm-svn: 218250
* R600/SI: Add preliminary support for flat address spaceMatt Arsenault2014-09-151-0/+23
| | | | llvm-svn: 217777
* R600/SI: Use eliminateFrameIndex() to expand SGPR spill pseudosTom Stellard2014-08-211-9/+98
| | | | | | | | | | | | | | | This will simplify the SGPR spilling and also allow us to use MachineFrameInfo for calculating offsets, which should be more reliable than our custom code. This fixes a crash in some cases where a register would be spilled in a branch such that the VGPR defined for spilling did not dominate all the uses when restoring. This fixes a crash in an ocl conformance test. The test requries register spilling and is too big to include. llvm-svn: 216217
* R600/SI: Handle VCC in SIRegisterInfo::getPhysRegSubReg()Tom Stellard2014-08-211-0/+11
| | | | | | | This fixes a crash in an ocl conformance test. The test requries register spilling and is too big to include. llvm-svn: 216216
* R600: silence GCC warningSaleem Abdulrasool2014-07-211-0/+1
| | | | | | | | | | GCC believes it may be possible to not return a value from the switch: lib/Target/R600/SIRegisterInfo.cpp:187:1: warning: control reaches end of non-void function [-Wreturn-type] Add an unreachable label to indicate that this is not possible and still permit switch coverage checking. llvm-svn: 213572
* R600/SI: Use scratch memory for large private arraysTom Stellard2014-07-211-2/+46
| | | | llvm-svn: 213551
* R600/SI: Add verifier check for immediates in register operands.Tom Stellard2014-07-021-0/+16
| | | | llvm-svn: 212214
* R600: Remove AMDIL instruction and register definitionsTom Stellard2014-06-131-9/+0
| | | | | | Most of these are no longer used any more. llvm-svn: 210915
* R600: Move AMDGPUInstrInfo from AMDGPUTargetMachine into AMDGPUSubtargetTom Stellard2014-06-131-5/+4
| | | | llvm-svn: 210869
* Use range forMatt Arsenault2014-05-121-4/+3
| | | | llvm-svn: 208617
* R600/SI: Only create one instruction when spilling/restoring register v3Tom Stellard2014-05-021-0/+7
| | | | | | | | | | | | | | | | | | The register spiller assumes that only one new instruction is created when spilling and restoring registers, so we need to emit pseudo instructions for vector register spills and lower them after register allocation. v2: - Fix calculation of lane index - Extend VGPR liveness to end of program. v3: - Use SIMM16 field of S_NOP to specify multiple NOPs. https://bugs.freedesktop.org/show_bug.cgi?id=75005 llvm-svn: 207843
* [C++] Use 'nullptr'. Target edition.Craig Topper2014-04-251-2/+2
| | | | llvm-svn: 207197
* R600/SI: Return the correct index for VGPRs in getHWRegIndex()Tom Stellard2014-03-311-1/+1
| | | | | | The register index is stored in the low 8-bits of the encoding. llvm-svn: 205186
* Fix known typosAlp Toker2014-01-241-1/+1
| | | | | | | Sweep the codebase for common typos. Includes some changes to visible function names that were misspelt. llvm-svn: 200018
* R600/SI: Fix moveToVALU when the first operand is VSrc.Matt Arsenault2013-11-181-0/+2
| | | | | | | Moving into a VSrc doesn't always work, since it could be replaced with an SGPR later. llvm-svn: 195042
* R600/SI: Add VReg_96 register class to SIRegisterInfo::hasVGPRs()Tom Stellard2013-11-151-0/+1
| | | | | | This fixes a crash with GNOME settings manager. llvm-svn: 194836
* R600/SI: Add support for private address space load/storeTom Stellard2013-11-131-0/+8
| | | | | | | Private address space is emulated using the register file with MOVRELS and MOVRELD instructions. llvm-svn: 194626
* R600/SI: Prefer SALU instructions for bit shift operationsTom Stellard2013-11-131-6/+42
| | | | | | | | | | | | | | All shift operations will be selected as SALU instructions and then if necessary lowered to VALU instructions in the SIFixSGPRCopies pass. This allows us to do more operations on the SALU which will improve performance and is also required for implementing private memory using indirect addressing, since the private memory pointers must stay in the scalar registers. This patch includes some fixes from Matt Arsenault. llvm-svn: 194625
* Make method staticMatt Arsenault2013-11-101-1/+1
| | | | llvm-svn: 194340
* R600/SI: Mark the EXEC register as reservedTom Stellard2013-10-101-0/+1
| | | | | | | | This prevents the machine verifier from complaining about uses of an undefined physical register. Reviewed-by: Vincent Lejeune<vljn at ovi.com> llvm-svn: 192364
* R600/SI: Choose the correct MOV instruction for copying immediatesTom Stellard2013-08-141-0/+11
| | | | | | | | The instruction selector will now try to infer the destination register so it can decided whether to use V_MOV_B32 or S_MOV_B32 when copying immediates. llvm-svn: 188426
* R600/SI: Add more special cases for opcodes to ensureSRegLimit()Tom Stellard2013-08-061-0/+21
| | | | | | Also factor out the register class lookup to its own function. llvm-svn: 187830
* Don't cache the instruction and register info from the TargetMachine, becauseBill Wendling2013-06-071-5/+3
| | | | | | | | the internals of TargetMachine could change. No functionality change intended. llvm-svn: 183561
* R600/SI: switch back to RegPressure schedulingChristian Konig2013-03-261-0/+5
| | | | | Signed-off-by: Christian König <christian.koenig@amd.com> llvm-svn: 178021
* Add R600 backendTom Stellard2012-12-111-0/+48
A new backend supporting AMD GPUs: Radeon HD2XXX - HD7XXX llvm-svn: 169915
OpenPOWER on IntegriCloud