summaryrefslogtreecommitdiff
path: root/lib/Target/R600
Commit message (Collapse)AuthorAge
...
* R600: Add work-around for the CF stack entry HW bugTom Stellard2014-01-22
| | | | | | | | | | | | | | | | | 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> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199842 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Add some missing CF instruction definitions to the .td files.Tom Stellard2014-01-22
| | | | | | reviewed-by: Vincent Lejeune <vljn at ovi.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199841 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Refactor stack size calculationTom Stellard2014-01-22
| | | | | | reviewed-by: Vincent Lejeune <vljn at ovi.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199840 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: CF_PUSH is the same on Evergreen and CaymanTom Stellard2014-01-22
| | | | | | reviewed-by: Vincent Lejeune <vljn at ovi.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199839 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Add wavefront size property to the subtargets v2Tom Stellard2014-01-22
| | | | | | | | | v2: - Initialize wavefront size to 0 reviewed-by: Vincent Lejeune <vljn at ovi.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199838 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Add stack size to .AMDGPUcsdata sectionTom Stellard2014-01-22
| | | | | | reviewed-by: Vincent Lejeune <vljn at ovi.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199837 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: MOVA is vector onlyTom Stellard2014-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199827 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Take alignment into account when calculating the stack offsetTom Stellard2014-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199826 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Add support for global addresses with constant initializersTom Stellard2014-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199825 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Begin private memory at the second GPR.Tom Stellard2014-01-22
| | | | | | | This way private memory does not over-write work group information stored in GPRs 0 and 1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199824 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Add support for i8 and i16 private loads/storesTom Stellard2014-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199823 91177308-0d34-0410-b5e6-96231b3b80d8
* CommentColumn is always 40. Simplify.Rafael Espindola2014-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199357 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Split DominatorTree into a concrete analysis result object whichChandler Carruth2014-01-13
| | | | | | | | | | | | | | | | | | | | | | | can be used by both the new pass manager and the old. This removes it from any of the virtual mess of the pass interfaces and lets it derive cleanly from the DominatorTreeBase<> template. In turn, tons of boilerplate interface can be nuked and it turns into a very straightforward extension of the base DominatorTree interface. The old analysis pass is now a simple wrapper. The names and style of this split should match the split between CallGraph and CallGraphWrapperPass. All of the users of DominatorTree have been updated to match using many of the same tricks as with CallGraph. The goal is that the common type remains the resulting DominatorTree rather than the pass. This will make subsequent work toward the new pass manager significantly easier. Also in numerous places things became cleaner because I switched from re-running the pass (!!! mid way through some other passes run!!!) to directly recomputing the domtree. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199104 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Pull the generic graph algorithms and data structures for dominatorChandler Carruth2014-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | trees into the Support library. These are all expressed in terms of the generic GraphTraits and CFG, with no reliance on any concrete IR types. Putting them in support clarifies that and makes the fact that the static analyzer in Clang uses them much more sane. When moving the Dominators.h file into the IR library I claimed that this was the right home for it but not something I planned to work on. Oops. So why am I doing this? It happens to be one step toward breaking the requirement that IR verification can only be performed from inside of a pass context, which completely blocks the implementation of verification for the new pass manager infrastructure. Fixing it will also allow removing the concept of the "preverify" step (WTF???) and allow the verifier to cleanly flag functions which fail verification in a way that precludes even computing dominance information. Currently, that results in a fatal error even when you ask the verifier to not fatally error. It's awesome like that. The yak shaving will continue... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199095 91177308-0d34-0410-b5e6-96231b3b80d8
* [cleanup] Move the Dominators.h and Verifier.h headers into the IRChandler Carruth2014-01-13
| | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199082 91177308-0d34-0410-b5e6-96231b3b80d8
* Move declaration of variables down to first use.Matt Arsenault2014-01-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198794 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-07
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198685 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor MI-Sched in preparation for post-ra scheduling support.Andrew Trick2013-12-28
| | | | | | | | Factor the MachineFunctionPass into MachineSchedulerBase. Split the DAG class into ScheduleDAGMI and SchedulerDAGMILive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198119 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Allow ftruncTom Stellard2013-12-20
| | | | | | | | | | | | v2: Add ftrunc->TRUNC pattern instead of replacing int_AMDGPU_trunc v3: move ftrunc pattern next to TRUNC definition, it's available since R600 Patch By: Jan Vesely Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197783 91177308-0d34-0410-b5e6-96231b3b80d8
* Small simplification, p0 is the same as p.Rafael Espindola2013-12-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197699 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Make private pointers be 32-bit.Matt Arsenault2013-12-19
| | | | | | | | Different sized address spaces should theoretically work most of the time now, and since 64-bit add is currently disabled, using more 32-bit pointers fixes some cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197659 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow MachineCSE to coalesce trivial subregister copies the same way that it ↵Andrew Trick2013-12-17
| | | | | | | | | | | | | | | | | | | | coalesces normal copies. Without this, MachineCSE is powerless to handle redundant operations with truncated source operands. This required fixing the 2-addr pass to handle tied subregisters. It isn't clear what combinations of subregisters can legally be tied, but the simple case of truncated source operands is now safely handled: %vreg11<def> = COPY %vreg1:sub_32bit; GR32:%vreg11 GR64:%vreg1 %vreg12<def> = COPY %vreg2:sub_32bit; GR32:%vreg12 GR64:%vreg2 %vreg13<def,tied1> = ADD32rr %vreg11<tied0>, %vreg12<kill>, %EFLAGS<imp-def> Test case: cse-add-with-overflow.ll. This exposed an existing bug in PPCInstrInfo::commuteInstruction. Thanks to Rafael for the test case: PowerPC/crash.ll. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197465 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in instruction name.Matt Arsenault2013-12-16
| | | | | | SI_KIL -> SI_KILL git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197425 91177308-0d34-0410-b5e6-96231b3b80d8
* One last cleanup of LLVM's DataLayout strings.Rafael Espindola2013-12-16
| | | | | | | Produce them in the same order on every target. The order is that of getStringRepresentation: e|E-i*-f*-v*-a*-s*-n*-S*. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197411 91177308-0d34-0410-b5e6-96231b3b80d8
* Structure R600's computeDataLayout more like every other target.Rafael Espindola2013-12-16
| | | | | | While there, simplify "p3:32:32:32" to "p3:32:32". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197407 91177308-0d34-0410-b5e6-96231b3b80d8
* The preferred alignment defaults to the abi alignment. Omit if it is the same.Rafael Espindola2013-12-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197400 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't duplicate the DataLayout defaults for integer, floats and vectors.Rafael Espindola2013-12-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197398 91177308-0d34-0410-b5e6-96231b3b80d8
* On DataLayout, omit the default of p:64:64:64.Rafael Espindola2013-12-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197397 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't manually calculate size in bytesMatt Arsenault2013-12-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197327 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn AMDGPUSubtarget::getDataLayout into a static function.Rafael Espindola2013-12-14
| | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197310 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't set unused variable.Rafael Espindola2013-12-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197064 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Re-format Processors.tdTom Stellard2013-12-11
| | | | | | | | This makes it a little easier to read. Reviewed-by: Vincent Lejeune <vljn at ovi.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197058 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Register AMDGPUCFGStructurizer passTom Stellard2013-12-11
| | | | | | | | This enables -print-before-all to dump MachineInstrs after it is run. Reviewed-by: Vincent Lejeune <vljn at ovi.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197057 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Register R600EmitClauseMarkers passTom Stellard2013-12-11
| | | | | | | | This enables -print-before-all to dump MachineInstrs after it is run. Reviewed-by: Vincent Lejeune <vljn at ovi.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197056 91177308-0d34-0410-b5e6-96231b3b80d8
* Prune redundant dependencies in LLVMBuild.txt.NAKAMURA Takumi2013-12-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196988 91177308-0d34-0410-b5e6-96231b3b80d8
* Use llvm_unreachable instead of assert(0)Matt Arsenault2013-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196971 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Fix an infinite loop when trying to reorganize export/tex vector inputVincent Lejeune2013-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196923 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Fix input modifiers lost for CaymanVincent Lejeune2013-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196922 91177308-0d34-0410-b5e6-96231b3b80d8
* Add proper dependencies to LLVMBuild.txt in llvm/lib.NAKAMURA Takumi2013-12-10
| | | | | | I'll prune redundant deps in LLVMBuild.txt, later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196881 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespaces.NAKAMURA Takumi2013-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196880 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't set a variable to its default value.Rafael Espindola2013-12-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196807 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a RequireStructuredCFG Field to TargetMachine.Vincent Lejeune2013-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196634 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Remove orphaned declarationsVincent Lejeune2013-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196633 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an index array check.Eric Christopher2013-12-06
| | | | | | Patch by Marius Wachtler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196561 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a default constructor to get deterministic behavior.Rafael Espindola2013-12-05
| | | | | | Should fix the msan and valgrind bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196509 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct word hyphenationsAlp Toker2013-12-05
| | | | | | | This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities and contractions in nearby lines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196471 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Add comments for number of used registers.Matt Arsenault2013-12-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196467 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't set PrivateGlobalPrefix for NVPTX and R600.Rafael Espindola2013-12-03
| | | | | | These targets have special asm printers that don't use these. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196187 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert two char* that are only ever used as booleans to bool.Rafael Espindola2013-12-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196168 91177308-0d34-0410-b5e6-96231b3b80d8
* R600: Workaround for cayman loop bugVincent Lejeune2013-12-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196121 91177308-0d34-0410-b5e6-96231b3b80d8