On 28/05/15 15:37, Roland Scheidegger wrote:
Am 28.05.2015 um 16:35 schrieb Jose Fonseca:
---
src/gallium/auxiliary/gallivm/lp_bld_init.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c
b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index 7b906c2..384ea86 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);
}
Reviewed-by: Roland Scheidegger <srol...@vmware.com>
Thanks.
BTW, while testing this change I noticed that disassembly is busted with
LLVM 3.7 -- it keeps dumping the same instruction over and over again.
Tried to fix but's not trivial.
Rather than trying to keep patching things up, I'm going to try using
the C API.
Jose
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev