radeon/llvm: replace shader type intrinsic with function attribute

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
index 958d3a3..af05078 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
@@ -542,17 +542,6 @@
 	 * stage. */
 }
 
-static void si_llvm_emit_prologue(struct lp_build_tgsi_context *bld_base)
-{
-	struct si_shader_context *si_shader_ctx = si_shader_context(bld_base);
-	struct gallivm_state *gallivm = bld_base->base.gallivm;
-	lp_build_intrinsic_unary(gallivm->builder,
-			"llvm.AMDGPU.shader.type",
-			LLVMVoidTypeInContext(gallivm->context),
-			lp_build_const_int32(gallivm, si_shader_ctx->type));
-}
-
-
 static void si_alpha_test(struct lp_build_tgsi_context *bld_base,
 			  unsigned index)
 {
@@ -1032,7 +1021,6 @@
 	shader->shader.uses_kill = shader_info.uses_kill;
 	bld_base->info = &shader_info;
 	bld_base->emit_fetch_funcs[TGSI_FILE_CONSTANT] = fetch_constant;
-	bld_base->emit_prologue = si_llvm_emit_prologue;
 	bld_base->emit_epilogue = si_llvm_emit_epilogue;
 
 	bld_base->op_actions[TGSI_OPCODE_TEX] = tex_action;
@@ -1048,6 +1036,8 @@
 	si_shader_ctx.type = si_shader_ctx.parse.FullHeader.Processor.Processor;
 	si_shader_ctx.rctx = rctx;
 
+	radeon_llvm_shader_type(si_shader_ctx.radeon_bld.main_fn, si_shader_ctx.type);
+
 	shader->shader.nr_cbufs = rctx->framebuffer.nr_cbufs;
 
 	/* Dump TGSI code before doing TGSI->LLVM conversion in case the