Rafael Espindola
6aea59268a
Remove unused argument.
...
llvm-svn: 129955
2011-04-21 23:39:26 +00:00
Justin Holewinski
d74d88a861
PTX: Expand useable register space
...
llvm-svn: 129913
2011-04-21 16:08:02 +00:00
Che-Liang Chiou
14c48e5d66
ptx: fix parameter ordering
...
This patch depends on the prior fix r129908 that changes to use std::find,
rather than std::binary_search, on unordered array.
Patch by Dan Bailey
llvm-svn: 129909
2011-04-21 10:56:58 +00:00
Che-Liang Chiou
cdc51569ee
ptx: PTXMachineFunctionInfo no longer sort registers and so should not use std::binary_search
...
llvm-svn: 129908
2011-04-21 10:16:20 +00:00
Eli Friedman
c93d399eed
Revert r129846; it's breaking a buildbot. See
...
http://google1.osuosl.org:8011/builders/llvm-x86_64-linux-checks/builds/825/steps/test.llvm.stage2/logs/st.ll
llvm-svn: 129869
2011-04-20 19:00:08 +00:00
Justin Holewinski
7d8895e767
PTX: Add intrinsics to list of built-in intrinsics, which allows them to be
...
used by Clang. To help Clang integration, the PTX target has been split
into two targets: ptx32 and ptx64, depending on the desired pointer size.
- Add GCCBuiltin class to all intrinsics
- Split PTX target into ptx32 and ptx64
llvm-svn: 129851
2011-04-20 15:37:17 +00:00
Che-Liang Chiou
6586f84685
ptx: add integer div and rem instruction
...
Patched by Dan Bailey
llvm-svn: 129848
2011-04-20 09:28:55 +00:00
Che-Liang Chiou
5a952b3c67
ptx: add floating-point comparison to setp
...
Patched by Dan Bailey
llvm-svn: 129847
2011-04-20 09:28:20 +00:00
Che-Liang Chiou
49160f9a71
ptx: fix parameter ordering
...
Patched by Dan Bailey
llvm-svn: 129846
2011-04-20 09:27:19 +00:00
Che-Liang Chiou
e34b271718
ptx: support setp's 4-operand format
...
llvm-svn: 128767
2011-04-02 08:51:39 +00:00
Che-Liang Chiou
cdedaf1f7d
ptx: clean up branch code a bit
...
llvm-svn: 128405
2011-03-28 10:23:13 +00:00
Justin Holewinski
06c8a38223
PTX: Improve support for 64-bit addressing
...
- Fix bug in ADDRrr/ADDRri/ADDRii selection for 64-bit addresses
- Add comparison selection for i64
- Add zext selection for i32 -> i64
- Add shl/shr/sha support for i64
llvm-svn: 128153
2011-03-23 16:58:51 +00:00
Che-Liang Chiou
7413080cea
ptx: add analyze/insert/remove branch
...
llvm-svn: 128084
2011-03-22 14:12:00 +00:00
Justin Holewinski
0984dcc077
PTX: Fix various codegen issues
...
- Emit mad instead of mad.rn for shader model 1.0
- Emit explicit mov.u32 instructions for reading global variables
- (most PTX instructions cannot take global variable immediates)
llvm-svn: 127895
2011-03-18 19:24:28 +00:00
Che-Liang Chiou
b1df0fe1cc
ptx: fix parameter order that is reversed
...
llvm-svn: 127874
2011-03-18 11:23:56 +00:00
Che-Liang Chiou
ff9d938e33
ptx: add unconditional and conditional branch
...
llvm-svn: 127873
2011-03-18 11:08:52 +00:00
Justin Holewinski
94751fbf32
PTX: Set PTX 2.0 as the minimum supported version
...
- Remove PTX 1.4 code generation
- Change type of intrinsics to .v4.i32 instead of .v4.i16
- Add and/or/xor integer instructions
llvm-svn: 127677
2011-03-15 13:24:15 +00:00
Duncan Sands
7921ac0975
Avoid a compiler warning about reg possibly being used uninitialized
...
when building with assertions disabled.
llvm-svn: 127675
2011-03-15 08:41:24 +00:00
Justin Holewinski
fbc8d301bf
PTX: Emit global arrays with proper sizes
...
- Emit all arrays as type .b8 and proper sizes in bytes to conform
to the output of nvcc
llvm-svn: 127584
2011-03-14 15:40:11 +00:00
Justin Holewinski
8509380f83
PTX: Add support for sqrt/sin/cos intrinsics
...
llvm-svn: 127578
2011-03-14 14:09:33 +00:00
Che-Liang Chiou
a19f075974
ptx: add set.p instruction and related changes to predicate execution
...
llvm-svn: 127577
2011-03-14 11:26:01 +00:00
Che-Liang Chiou
58bae0e957
ptx: add basic support of predicate execution
...
llvm-svn: 127569
2011-03-13 17:26:00 +00:00
Justin Holewinski
72ff7e4fa9
PTX: Add preliminary support for floating-point divide and multiply-and-add
...
llvm-svn: 127410
2011-03-10 16:57:18 +00:00
Che-Liang Chiou
6e9fb0d056
ptx: add the rest of special registers of ISA version 2.0
...
llvm-svn: 127397
2011-03-10 04:05:57 +00:00
Justin Holewinski
42e9aaa4b1
PTX: Add intrinsic support for ntid, ctaid, and nctaid registers
...
llvm-svn: 127246
2011-03-08 14:10:18 +00:00
Che-Liang Chiou
369ea3fdb4
ptx: add basic intrinsic support
...
llvm-svn: 127084
2011-03-05 14:17:37 +00:00
Justin Holewinski
8e9a126a6c
PTX: Fix Emacs renaming a symbol
...
llvm-svn: 126938
2011-03-03 14:09:40 +00:00
Justin Holewinski
969dfbcff6
PTX: Fix a couple of lint violations
...
llvm-svn: 126936
2011-03-03 13:34:29 +00:00
Che-Liang Chiou
7ed32cc51b
ptx: fix lint and compiler warnings
...
llvm-svn: 126838
2011-03-02 07:58:46 +00:00
Che-Liang Chiou
59515dc703
Add 64-bit addressing to PTX backend
...
- Add '64bit' sub-target option.
- Select 32-bit/64-bit loads/stores based on '64bit' option.
- Fix function parameter order.
Patch by Justin Holewinski
llvm-svn: 126837
2011-03-02 07:36:48 +00:00
Che-Liang Chiou
65b1476031
Extend initial support for primitive types in PTX backend
...
- Allow i16, i32, i64, float, and double types, using the native .u16,
.u32, .u64, .f32, and .f64 PTX types.
- Allow loading/storing of all primitive types.
- Allow primitive types to be passed as parameters.
- Allow selection of PTX Version and Shader Model as sub-target attributes.
- Merge integer/floating-point test cases for load/store.
- Use .u32 instead of .s32 to conform to output from NVidia nvcc compiler.
Patch by Justin Holewinski
llvm-svn: 126824
2011-03-02 03:20:28 +00:00
Che-Liang Chiou
75a800d3bf
Add preliminary support for .f32 in the PTX backend.
...
- Add appropriate TableGen patterns for fadd, fsub, fmul.
- Add .f32 as the PTX type for the LLVM float type.
- Allow parameters, return values, and global variable declarations
to accept the float type.
- Add appropriate test cases.
Patch by Justin Holewinski
llvm-svn: 126636
2011-02-28 06:34:09 +00:00
Cameron Zwarich
fcf51fd298
Roll out r126425 and r126450 to see if it fixes the failures on the buildbots.
...
llvm-svn: 126488
2011-02-25 16:30:32 +00:00
Devang Patel
b037383a35
Enable DebugInfo support for COFF object files.
...
Patch by Nathan Jeffords!
llvm-svn: 126425
2011-02-24 21:04:00 +00:00
Oscar Fuentes
ba1186c23e
Use explicit add_subdirectory's for LLVM target sublibraries instead
...
of testing for its presence at cmake time.
This way the build automatically regenerates the makefiles when a svn
update brings in a new sublibrary.
llvm-svn: 126068
2011-02-20 02:55:27 +00:00
Rafael Espindola
58ac6e1677
Add support for pushsection and popsection. Patch by Joerg Sonnenberger.
...
llvm-svn: 125629
2011-02-16 01:08:29 +00:00
Che-Liang Chiou
84fde9ef2b
ptx: add passing parameter to kernel functions
...
llvm-svn: 125279
2011-02-10 12:01:24 +00:00
Anton Korobeynikov
441ae5b88c
Update CMake stuff
...
llvm-svn: 123171
2011-01-10 12:39:23 +00:00
Anton Korobeynikov
2f93128109
Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs and fixes here and there.
...
llvm-svn: 123170
2011-01-10 12:39:04 +00:00
Che-Liang Chiou
5451fc9195
ptx: remove reg-reg addressing mode and st.const
...
llvm-svn: 122653
2011-01-01 11:58:58 +00:00
Che-Liang Chiou
15e8d2c5e7
ptx: add store instruction
...
llvm-svn: 122652
2011-01-01 10:50:37 +00:00
Che-Liang Chiou
3ee0501338
ptx: add state spaces
...
llvm-svn: 122638
2010-12-30 10:41:27 +00:00
Che-Liang Chiou
aaedf8be1c
ptx: add ld instruction and test
...
llvm-svn: 122398
2010-12-22 10:38:51 +00:00
Daniel Dunbar
ecd0c8a557
MC: Make TargetAsmBackend available to the AsmStreamer.
...
- Treaty talks on the non-proliferation of MC objects broke down.
llvm-svn: 121949
2010-12-16 03:05:59 +00:00
Rafael Espindola
0a017a6db2
Fixed version of 121434 with no new memory leaks.
...
llvm-svn: 121471
2010-12-10 07:39:47 +00:00
Rafael Espindola
a945a34c73
Revert my previous patch to make the valgrind bots happy.
...
llvm-svn: 121461
2010-12-10 04:01:09 +00:00
Rafael Espindola
56eb741237
Initial support for the cfi directives. This is just enough to get
...
f:
.cfi_startproc
nop
.cfi_endproc
assembled (on ELF).
llvm-svn: 121434
2010-12-09 23:48:29 +00:00
Che-Liang Chiou
9f2af628a6
ptx: add shift instructions
...
llvm-svn: 120982
2010-12-06 04:00:03 +00:00
Rafael Espindola
1c8ac8f027
There are two reasons why we might want to use
...
foo = a - b
.long foo
instead of just
.long a - b
First, on darwin9 64 bits the assembler produces the wrong result. Second,
if "a" is the end of the section all darwin assemblers (9, 10 and mc) will not
consider a - b to be a constant but will if the dummy foo is created.
Split how we handle these cases. The first one is something MC should take care
of. The second one has to be handled by the caller.
llvm-svn: 120889
2010-12-04 03:21:47 +00:00
Rafael Espindola
57ab708bdd
Try to resolve symbol differences early, and if successful create a plain
...
data fragment. This reduces the time to assemble the test in 8711 from 60s to
54s.
llvm-svn: 120767
2010-12-03 00:55:40 +00:00