Mesa (main): llvmpipe: correct the debug information printed with GALLIVM_PERF=nopt
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jul 27 20:19:26 UTC 2021
Module: Mesa
Branch: main
Commit: 44aa7e25dd4168d12f6fbe9a3ef6d5dde662ff1e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=44aa7e25dd4168d12f6fbe9a3ef6d5dde662ff1e
Author: suijingfeng <suijingfeng at loongson.cn>
Date: Mon Jul 19 23:06:48 2021 +0800
llvmpipe: correct the debug information printed with GALLIVM_PERF=nopt
GALLIVM_PERF_NO_OPT is "belond" to GALLIVM_PERF environment variable,
not GALLIVM_DEBUG. when GALLIVM_PERF=nopt is passed to llvmpipe,
"-sroa -early-cse -simplifycfg -reassociate -constprop -instcombine -gvn"
should not be printed. Those llvm optimation techniques should only be
printed when the default(-O2) optimation is enabled.
$ GALLIVM_PERF=nopt GALLIVM_DEBUG=dumpbc glmark2
Before apply this patch:
Invoke as "opt -sroa -early-cse -simplifycfg -reassociate -mem2reg -constprop -instcombine -gvn ir_setup_variant_0.bc | llc -O2 [-mcpu=<-mcpu option>] [-mattr=<-mattr option(s)>]"
After apply this patch:
Invoke as "opt -mem2reg ir_fs304_variant0.bc | llc -O0 [-mcpu=<-mcpu option>] [-mattr=<-mattr option(s)>]"
Reviewed-by: Adam Jackson <ajax at redhat.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Signed-off-by: suijingfeng <suijingfeng at loongson.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11994>
---
src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index d2d049ace5e..6cb04e2a136 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -595,10 +595,10 @@ gallivm_compile_module(struct gallivm_state *gallivm)
LLVMWriteBitcodeToFile(gallivm->module, filename);
debug_printf("%s written\n", filename);
debug_printf("Invoke as \"opt %s %s | llc -O%d %s%s\"\n",
- gallivm_debug & GALLIVM_PERF_NO_OPT ? "-mem2reg" :
+ gallivm_perf & GALLIVM_PERF_NO_OPT ? "-mem2reg" :
"-sroa -early-cse -simplifycfg -reassociate "
"-mem2reg -constprop -instcombine -gvn",
- filename, gallivm_debug & GALLIVM_PERF_NO_OPT ? 0 : 2,
+ filename, gallivm_perf & GALLIVM_PERF_NO_OPT ? 0 : 2,
"[-mcpu=<-mcpu option>] ",
"[-mattr=<-mattr option(s)>]");
}
More information about the mesa-commit
mailing list