-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post-inc memory access generation for -Os -Oz and -Og #58
Comments
For https://github.com/openhwgroup/corev-gcc/blob/035c7190d3f89e5f96bf87f5b1030f76ea62f89d/gcc/testsuite/gcc.target/riscv/cv-mem-lw-compile-1.c, gcc corev-gcc/gcc/tree-ssa-loop-ch.cc Lines 420 to 432 in 035c719
You could try changing the loop limit in the test to a compile time constant e.g. change |
Thank you, changing from n to 200 works if the c extension is included. I'll add this for cv-mem-*-compile-[1,2].c. |
For now, we will mark Os, Oz, and Og as UNSUPPORTED. |
Could the volatile key word help? |
Partial fix for issue openhwgroup#58 and tidy up Files Changed: * cv-mem-lb-compile-1.c * cv-mem-lb-compile-2.c * cv-mem-lb-compile-3.c * cv-mem-lbu-compile-1.c * cv-mem-lbu-compile-2.c * cv-mem-lbu-compile-3.c * cv-mem-lh-compile-1.c * cv-mem-lh-compile-2.c * cv-mem-lh-compile-3.c * cv-mem-lhu-compile-1.c * cv-mem-lhu-compile-2.c * cv-mem-lhu-compile-3.c * cv-mem-lw-compile-1.c * cv-mem-lw-compile-2.c * cv-mem-lw-compile-3.c * cv-mem-sb-compile-1.c * cv-mem-sb-compile-2.c * cv-mem-sb-compile-3.c * cv-mem-sh-compile-1.c * cv-mem-sh-compile-2.c * cv-mem-sh-compile-3.c * cv-mem-sw-compile-1.c * cv-mem-sw-compile-2.c * cv-mem-sw-compile-3.c
Partial fix for issue openhwgroup#58 and tidy up Files Changed: * cv-mem-lb-compile-1.c * cv-mem-lb-compile-2.c * cv-mem-lb-compile-3.c * cv-mem-lbu-compile-1.c * cv-mem-lbu-compile-2.c * cv-mem-lbu-compile-3.c * cv-mem-lh-compile-1.c * cv-mem-lh-compile-2.c * cv-mem-lh-compile-3.c * cv-mem-lhu-compile-1.c * cv-mem-lhu-compile-2.c * cv-mem-lhu-compile-3.c * cv-mem-lw-compile-1.c * cv-mem-lw-compile-2.c * cv-mem-lw-compile-3.c * cv-mem-sb-compile-1.c * cv-mem-sb-compile-2.c * cv-mem-sb-compile-3.c * cv-mem-sh-compile-1.c * cv-mem-sh-compile-2.c * cv-mem-sh-compile-3.c * cv-mem-sw-compile-1.c * cv-mem-sw-compile-2.c * cv-mem-sw-compile-3.c
This is done in PR #96. |
Partial fix for issue #58 and tidy up Files Changed: * cv-mem-lb-compile-1.c * cv-mem-lb-compile-2.c * cv-mem-lb-compile-3.c * cv-mem-lbu-compile-1.c * cv-mem-lbu-compile-2.c * cv-mem-lbu-compile-3.c * cv-mem-lh-compile-1.c * cv-mem-lh-compile-2.c * cv-mem-lh-compile-3.c * cv-mem-lhu-compile-1.c * cv-mem-lhu-compile-2.c * cv-mem-lhu-compile-3.c * cv-mem-lw-compile-1.c * cv-mem-lw-compile-2.c * cv-mem-lw-compile-3.c * cv-mem-sb-compile-1.c * cv-mem-sb-compile-2.c * cv-mem-sb-compile-3.c * cv-mem-sh-compile-1.c * cv-mem-sh-compile-2.c * cv-mem-sh-compile-3.c * cv-mem-sw-compile-1.c * cv-mem-sw-compile-2.c * cv-mem-sw-compile-3.c
Partial fix for issue openhwgroup#58 and tidy up Files Changed: * cv-mem-lb-compile-1.c * cv-mem-lb-compile-2.c * cv-mem-lb-compile-3.c * cv-mem-lbu-compile-1.c * cv-mem-lbu-compile-2.c * cv-mem-lbu-compile-3.c * cv-mem-lh-compile-1.c * cv-mem-lh-compile-2.c * cv-mem-lh-compile-3.c * cv-mem-lhu-compile-1.c * cv-mem-lhu-compile-2.c * cv-mem-lhu-compile-3.c * cv-mem-lw-compile-1.c * cv-mem-lw-compile-2.c * cv-mem-lw-compile-3.c * cv-mem-sb-compile-1.c * cv-mem-sb-compile-2.c * cv-mem-sb-compile-3.c * cv-mem-sh-compile-1.c * cv-mem-sh-compile-2.c * cv-mem-sh-compile-3.c * cv-mem-sw-compile-1.c * cv-mem-sw-compile-2.c * cv-mem-sw-compile-3.c
Partial fix for issue openhwgroup#58 and tidy up Files Changed: * cv-mem-lb-compile-1.c * cv-mem-lb-compile-2.c * cv-mem-lb-compile-3.c * cv-mem-lbu-compile-1.c * cv-mem-lbu-compile-2.c * cv-mem-lbu-compile-3.c * cv-mem-lh-compile-1.c * cv-mem-lh-compile-2.c * cv-mem-lh-compile-3.c * cv-mem-lhu-compile-1.c * cv-mem-lhu-compile-2.c * cv-mem-lhu-compile-3.c * cv-mem-lw-compile-1.c * cv-mem-lw-compile-2.c * cv-mem-lw-compile-3.c * cv-mem-sb-compile-1.c * cv-mem-sb-compile-2.c * cv-mem-sb-compile-3.c * cv-mem-sh-compile-1.c * cv-mem-sh-compile-2.c * cv-mem-sh-compile-3.c * cv-mem-sw-compile-1.c * cv-mem-sw-compile-2.c * cv-mem-sw-compile-3.c
Partial fix for issue openhwgroup#58 and tidy up Files Changed: * cv-mem-lb-compile-1.c * cv-mem-lb-compile-2.c * cv-mem-lb-compile-3.c * cv-mem-lbu-compile-1.c * cv-mem-lbu-compile-2.c * cv-mem-lbu-compile-3.c * cv-mem-lh-compile-1.c * cv-mem-lh-compile-2.c * cv-mem-lh-compile-3.c * cv-mem-lhu-compile-1.c * cv-mem-lhu-compile-2.c * cv-mem-lhu-compile-3.c * cv-mem-lw-compile-1.c * cv-mem-lw-compile-2.c * cv-mem-lw-compile-3.c * cv-mem-sb-compile-1.c * cv-mem-sb-compile-2.c * cv-mem-sb-compile-3.c * cv-mem-sh-compile-1.c * cv-mem-sh-compile-2.c * cv-mem-sh-compile-3.c * cv-mem-sw-compile-1.c * cv-mem-sw-compile-2.c * cv-mem-sw-compile-3.c
Partial fix for issue openhwgroup#58 and tidy up Files Changed: * cv-mem-lb-compile-1.c * cv-mem-lb-compile-2.c * cv-mem-lb-compile-3.c * cv-mem-lbu-compile-1.c * cv-mem-lbu-compile-2.c * cv-mem-lbu-compile-3.c * cv-mem-lh-compile-1.c * cv-mem-lh-compile-2.c * cv-mem-lh-compile-3.c * cv-mem-lhu-compile-1.c * cv-mem-lhu-compile-2.c * cv-mem-lhu-compile-3.c * cv-mem-lw-compile-1.c * cv-mem-lw-compile-2.c * cv-mem-lw-compile-3.c * cv-mem-sb-compile-1.c * cv-mem-sb-compile-2.c * cv-mem-sb-compile-3.c * cv-mem-sh-compile-1.c * cv-mem-sh-compile-2.c * cv-mem-sh-compile-3.c * cv-mem-sw-compile-1.c * cv-mem-sw-compile-2.c * cv-mem-sw-compile-3.c
In PR 113907 comment #58, Honza found a case where ICF thinks bodies of functions are equivalent but becaise of difference in aliases in a memory access, different aggregate jump functions are associated with supposedly equivalent call statements. This patch adds a way to compare jump functions and plugs it into ICF to avoid the issue. gcc/ChangeLog: 2024-03-20 Martin Jambor <[email protected]> PR ipa/113907 * ipa-prop.h (class ipa_vr): Declare new overload of a member function equal_p. (ipa_jump_functions_equivalent_p): Declare. * ipa-prop.cc (ipa_vr::equal_p): New function. (ipa_agg_pass_through_jf_equivalent_p): Likewise. (ipa_agg_jump_functions_equivalent_p): Likewise. (ipa_jump_functions_equivalent_p): Likewise. * ipa-cp.h (values_equal_for_ipcp_p): Declare. * ipa-cp.cc (values_equal_for_ipcp_p): Make function public. * ipa-icf-gimple.cc: Include alloc-pool.h, symbol-summary.h, sreal.h, ipa-cp.h and ipa-prop.h. (func_checker::compare_gimple_call): Comapre jump functions. gcc/testsuite/ChangeLog: 2024-03-20 Martin Jambor <[email protected]> PR ipa/113907 * gcc.dg/lto/pr113907_0.c: New. * gcc.dg/lto/pr113907_1.c: Likewise. * gcc.dg/lto/pr113907_2.c: Likewise.
Moved to new issue #108 |
The support for post-increment addressing in #57 does not generate these instructions for
-Os
,-Oz
or-Og
. This issues captures the need to add this functionality.The text was updated successfully, but these errors were encountered: