endif
if with_amd_vk or with_gallium_radeonsi
- _llvm_version = '>= 14.0.0'
+ _llvm_version = '>= 15.0.0'
elif with_intel_clc
_llvm_version = '>= 13.0.0'
elif with_gallium_opencl
size = l / 4;
}
-#if LLVM_VERSION_MAJOR == 14
- /* See: https://github.com/GPUOpen-Tools/radeon_gpu_profiler/issues/65 and
- * https://github.com/llvm/llvm-project/issues/38652
- */
- if (invalid) {
- /* do nothing */
- } else if (gfx_level == GFX9 && (binary[pos] & 0xfc024000) == 0xc0024000) {
- /* SMEM with IMM=1 and SOE=1: LLVM ignores SOFFSET */
- size_t len = strlen(outline);
-
- char imm[16] = {0};
- while (outline[--len] != ' ') ;
- strncpy(imm, outline + len + 1, sizeof(imm) - 1);
-
- snprintf(outline + len, outline_size - len, " s%u offset:%s", binary[pos + 1] >> 25, imm);
- } else if (gfx_level >= GFX10 && (binary[pos] & 0xfc000000) == 0xf4000000 &&
- (binary[pos + 1] & 0xfe000000) != 0xfa000000) {
- /* SMEM non-NULL SOFFSET: LLVM ignores OFFSET */
- uint32_t offset = binary[pos + 1] & 0x1fffff;
- if (offset) {
- size_t len = strlen(outline);
- snprintf(outline + len, outline_size - len, " offset:0x%x", offset);
- }
- }
-#endif
-
return std::make_pair(invalid, size);
}
}
END_TEST
-#if LLVM_VERSION_MAJOR >= 15
BEGIN_TEST(assembler.gfx11.smem)
if (!setup_cs(NULL, GFX11))
return;
finish_assembler_test();
END_TEST
-#endif
}
END_TEST
-#if LLVM_VERSION_MAJOR >= 15
BEGIN_TEST(isel.discard_early_exit.mrtz)
QoShaderModuleCreateInfo vs = qoShaderModuleCreateInfoGLSL(VERTEX,
void main() {}
pbld.add_vsfs(vs, fs);
pbld.print_ir(VK_SHADER_STAGE_FRAGMENT_BIT, "Assembly");
END_TEST
-#endif
call = LLVMBuildCall2(ctx->builder, function_type, function, params, param_count, "");
- if (attrib_mask & AC_ATTR_INVARIANT_LOAD) {
- if (LLVM_VERSION_MAJOR >= 15)
- LLVMSetMetadata(call, ctx->invariant_load_md_kind, ctx->empty_md);
- else
- LLVMAddCallSiteAttribute(call, -1, ac_get_llvm_attribute(ctx->context, "readnone"));
- }
+ if (attrib_mask & AC_ATTR_INVARIANT_LOAD)
+ LLVMSetMetadata(call, ctx->invariant_load_md_kind, ctx->empty_md);
if (attrib_mask & AC_ATTR_CONVERGENT)
LLVMAddCallSiteAttribute(call, -1, ac_get_llvm_attribute(ctx->context, "convergent"));
LLVMAddTargetDependentFunctionAttr(main_function, "denormal-fp-math-f32",
"preserve-sign,preserve-sign");
- if (LLVM_VERSION_MAJOR >= 15 && convention == AC_LLVM_AMDGPU_PS) {
+ if (convention == AC_LLVM_AMDGPU_PS) {
LLVMAddTargetDependentFunctionAttr(main_function, "amdgpu-depth-export",
ctx->exports_mrtz ? "1" : "0");
LLVMAddTargetDependentFunctionAttr(main_function, "amdgpu-color-export",
#include <llvm/Transforms/IPO/AlwaysInliner.h>
#include <llvm/Transforms/InstCombine/InstCombine.h>
#include <llvm/Transforms/IPO/SCCP.h>
-#if LLVM_VERSION_MAJOR >= 15
#include "llvm/CodeGen/SelectionDAGNodes.h"
-#endif
#include <cstring>
using namespace llvm;
-#if LLVM_VERSION_MAJOR >= 15
class RunAtExitForStaticDestructors : public SDNode
{
public:
{
}
};
-#endif
void ac_llvm_run_atexit_for_destructors(void)
{
-#if LLVM_VERSION_MAJOR >= 15
/* LLVM >= 16 registers static variable destructors on the first compile, which gcc
* implements by calling atexit there. Before that, u_queue registers its atexit
* handler to kill all threads. Since exit() runs atexit handlers in the reverse order,
* This just executes the code that declares static variables.
*/
RunAtExitForStaticDestructors();
-#endif
}
bool ac_is_llvm_processor_supported(LLVMTargetMachineRef tm, const char *processor)
case CHIP_REMBRANDT:
return "gfx1035";
case CHIP_RAPHAEL_MENDOCINO:
- return LLVM_VERSION_MAJOR >= 15 ? "gfx1036" : "gfx1030";
+ return "gfx1036";
case CHIP_GFX1100:
return "gfx1100";
case CHIP_GFX1101:
*/
index = LLVMConstInt(ctx->ac.i32, nir_intrinsic_io_semantics(instr).high_16bits, 0);
-#if LLVM_VERSION_MAJOR == 14
- /* To work around old LLVM bug which won't change the output type to
- * LLVMBuildLoad2 type argument.
- */
- output = LLVMBuildLoad2(ctx->ac.builder, ctx->ac.f32, output_addr, "");
- output = LLVMBuildBitCast(ctx->ac.builder, output, ctx->ac.v2f16, "");
-#else
output = LLVMBuildLoad2(ctx->ac.builder, ctx->ac.v2f16, output_addr, "");
-#endif
output = LLVMBuildInsertElement(ctx->ac.builder, output, value, index, "");
value = LLVMBuildBitCast(ctx->ac.builder, output, ctx->ac.f32, "");
}
NIR_PASS(progress, nir, nir_opt_dce);
/* nir_opt_if_optimize_phi_true_false is disabled on LLVM14 (#6976) */
NIR_PASS(lower_phis_to_scalar, nir, nir_opt_if,
- nir_opt_if_aggressive_last_continue |
- (LLVM_VERSION_MAJOR == 14 ? 0 : nir_opt_if_optimize_phi_true_false));
+ nir_opt_if_aggressive_last_continue |
+ nir_opt_if_optimize_phi_true_false);
NIR_PASS(progress, nir, nir_opt_dead_cf);
if (lower_alu_to_scalar) {