diff options
author | Juan A. Suarez Romero <[email protected]> | 2017-06-08 21:22:08 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-08 23:32:32 +0200 |
commit | a625d58ee19cd9f88af2ee76de604420c39f5afb (patch) | |
tree | 37ad8268f766f22c49d2de49fbcf6a726da9f4eb /src/gallium/drivers/radeonsi | |
parent | 69403617963681ed48fa937e978919b855aa4049 (diff) |
radeonsi: call LLVMAddEarlyCSEMemSSAPass only for LLVM >= 4.0
LLVMAddEarlyCSEMemSSAPass() is defined in LLVM 4.0.
Fixes: 257b538 ("radeonsi: do EarlyCSEMemSSA LLVM pass)
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c index 802e2b94e9e..d5e988edebf 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c @@ -1451,8 +1451,10 @@ void si_llvm_optimize_module(struct si_shader_context *ctx) LLVMAddLICMPass(gallivm->passmgr); LLVMAddAggressiveDCEPass(gallivm->passmgr); LLVMAddCFGSimplificationPass(gallivm->passmgr); +#if HAVE_LLVM >= 0x0400 /* This is recommended by the instruction combining pass. */ LLVMAddEarlyCSEMemSSAPass(gallivm->passmgr); +#endif LLVMAddInstructionCombiningPass(gallivm->passmgr); /* Run the pass */ |