[Mesa-dev] [PATCH 2/2] radeonsi: fix build of si_eliminate_const_vs_outputs on LLVM <= 3.8
Marek Olšák
maraeo at gmail.com
Wed Oct 19 22:14:46 UTC 2016
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeonsi/si_shader.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index a810d9a..30e45cc 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -6602,24 +6602,23 @@ static void si_eliminate_const_vs_outputs(struct si_shader_context *ctx)
while (bb) {
LLVMValueRef inst = LLVMGetFirstInstruction(bb);
while (inst) {
LLVMValueRef cur = inst;
inst = LLVMGetNextInstruction(inst);
if (LLVMGetInstructionOpcode(cur) != LLVMCall)
continue;
- LLVMValueRef callee = LLVMGetCalledValue(cur);
- LLVMValueKind kind = LLVMGetValueKind(callee);
+ LLVMValueRef callee = lp_get_called_value(cur);
- if (kind != LLVMFunctionValueKind)
+ if (!lp_is_function(callee))
continue;
const char *name = LLVMGetValueName(callee);
unsigned num_args = LLVMCountParams(callee);
/* Check if this is an export instruction. */
if (num_args != 9 || strcmp(name, "llvm.SI.export"))
continue;
LLVMValueRef arg = LLVMGetOperand(cur, 3);
--
2.7.4
More information about the mesa-dev
mailing list