summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/radeon/radeon_llvm_util.c
AgeCommit message (Collapse)AuthorFilesLines
2016-07-05gallium/radeon: remove unused code - radeon_llvm_util.*Marek Olšák1-124/+0
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-02-16Handle removal of LLVMAddTargetData in SVN revision 260919Matthew Dawson1-0/+6
LLVM removed LLVMAddTargetData for the 3.9 release in r260919. For the two places in mesa where this is called, only enable the lines when compiling for less then 3.9. For the radeon driver, I'm not sure how to check if any other LLVM calls need to be adjusted. I think since the target data used is extracted from the LLVMModule, it isn't necessary to pass it back to LLVM again. The code does compile, and at least for radeonsi does run OpenGL games. [ Michel Dänzer: Move #if closer to LLVMAddTargetData in lp_bld_init.c, and add HAVE_LLVM < 0x0309 guards around now unused occurrences of TD and data_layout ] Signed-off-by: Matthew Dawson <matthew@mjdsystems.ca> Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
2014-10-31r600g/compute: Enable PIPE_SHADER_IR_NATIVE for compute shaders v2Tom Stellard1-3/+3
v2: - Drop dependency on LLVM >= 3.5.1
2014-07-03radeon/llvm: Allocate space for kernel metadata operandsAaron Watry1-3/+7
Previously, we were assuming that kernel metadata nodes only had 1 operand. Kernels which have attributes can have more than 1, e.g.: !0 = metadata !{void (i32 addrspace(1)*)* @testKernel, metadata !1} !1 = metadata !{metadata !"work_group_size_hint", i32 4, i32 1, i32 1} Attempting to get the kernel without the correct number of attributes led to memory corruption and luxrays crashing out. Fixes the cl/program/execute/attributes.cl piglit test. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76223 CC: "10.2" <mesa-stable@lists.freedesktop.org>
2013-12-23radeon/llvm: Free target data at end of optimizationAaron Watry1-0/+1
Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org>
2013-12-23radeon/compute: Stop leaking LLVMContexts in radeon_llvm_parse_bitcodeAaron Watry1-8/+7
Previously we were creating a new LLVMContext every time that we called radeon_llvm_parse_bitcode, which caused us to leak the context every time that we compiled a CL program. Sadly, we can't dispose of the LLVMContext at the point that it was being created because evergreen_launch_grid (and possibly the SI equivalent) was assuming that the context used to compile the kernels was still available. Now, we'll create a new LLVMContext when creating EG/SI compute state, store it there, and pass it to all of the places that need it. The LLVM Context gets destroyed when we delete the EG/SI compute state. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org>
2013-11-25radeon/compute: Unconditionally inline all functions v2Tom Stellard1-2/+20
We need to do this until function calls are supported. v2: - Fix loop conditional https://bugs.freedesktop.org/show_bug.cgi?id=64225 CC: "10.0" <mesa-stable@lists.freedesktop.org>
2013-11-15radeon/llvm: Free created llvm memory bufferAaron Watry1-0/+1
v2: Fix indentation Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org>
2013-10-30radeon/llvm: Specify the DataLayout when running optimizationsTom Stellard1-0/+4
Without DataLayout, a lot of optimization passes aren't run and the ones that are don't work as well.
2013-05-17radeon/llvm: Run standard optimization passes on conpute shader modulesTom Stellard1-0/+15
The SROA and function inliner passes are espically important, because they optimize away unsupported features: functions and indirect private memory access.
2013-05-06radeon/llvm: Don't use the global context when parsing LLVM IRTom Stellard1-2/+3
This leads to crashes when multiple threads try to compile compute shaders in the same time. Fixes a crash in bfgminer when using more than one thread.
2013-04-05radeonsi: Add compute support v3Tom Stellard1-1/+1
v2: - Only dump shaders when env variable is set. v3: - Don't emit VGT registers Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com
2013-03-13radeon/llvm: Add missing license headersTom Stellard1-0/+26
Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
2013-03-13radeon/llvm: Make radeon_llvm_util.cpp a C fileTom Stellard1-0/+49
All the functions in this file are now implemented in C.