diff options
author | Jose Fonseca <[email protected]> | 2015-05-28 15:35:14 +0100 |
---|---|---|
committer | Jose Fonseca <[email protected]> | 2015-05-29 11:20:58 +0100 |
commit | 29203e77388f11e36db3190834809c3196ee47b5 (patch) | |
tree | 80eecd06acb39d6393d6403493f573a4ad1f5855 /src/gallium/auxiliary/gallivm | |
parent | dd048543e944d95b4471572454cfa902392e3f61 (diff) |
gallivm: Disable frame pointer omission on LLVM 3.7.
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_init.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index 7b906c27ed5..384ea864081 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -533,6 +533,16 @@ gallivm_compile_module(struct gallivm_state *gallivm) if (0) { debug_printf("optimizing func %s...\n", LLVMGetValueName(func)); } + + /* Disable frame pointer omission on debug/profile builds */ + /* XXX: And workaround http://llvm.org/PR21435 */ +#if HAVE_LLVM >= 0x0307 && \ + (defined(DEBUG) || defined(PROFILE) || \ + defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)) + LLVMAddTargetDependentFunctionAttr(func, "no-frame-pointer-elim", "true"); + LLVMAddTargetDependentFunctionAttr(func, "no-frame-pointer-elim-non-leaf", "true"); +#endif + LLVMRunFunctionPassManager(gallivm->passmgr, func); func = LLVMGetNextFunction(func); } |