aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadedge.c
diff options
context:
space:
mode:
authorJiufu Guo <guojiufu@linux.ibm.com>2021-07-15 17:21:00 +0800
committerJiufu Guo <guojiufu@linux.ibm.com>2021-07-29 08:42:56 +0800
commitaafa38b5bfed5e3eff258aa5354ed928f4986709 (patch)
treeaa79d882438826d124bc09c9c61168a939e15f8d /gcc/tree-ssa-threadedge.c
parent3916902930769d5172c0feaa5f535ca7b2bafdf7 (diff)
downloadgcc-aafa38b5bfed5e3eff258aa5354ed928f4986709.zip
gcc-aafa38b5bfed5e3eff258aa5354ed928f4986709.tar.gz
gcc-aafa38b5bfed5e3eff258aa5354ed928f4986709.tar.bz2
Use preferred mode for doloop IV [PR61837]
Currently, doloop.xx variable is using the type as niter which may be shorter than word size. For some targets, it would be better to use word size type. For example, on 64bit system, to access 32bit value, subreg maybe used. Then using 64bit type maybe better for niter if it can be present in both 32bit and 64bit. This patch add target hook to query preferred mode for doloop IV, and update mode accordingly. gcc/ChangeLog: 2021-07-29 Jiufu Guo <guojiufu@linux.ibm.com> PR target/61837 * config/rs6000/rs6000.c (TARGET_PREFERRED_DOLOOP_MODE): New hook. (rs6000_preferred_doloop_mode): New hook. * doc/tm.texi: Regenerate. * doc/tm.texi.in: Add hook preferred_doloop_mode. * target.def (preferred_doloop_mode): New hook. * targhooks.c (default_preferred_doloop_mode): New hook. * targhooks.h (default_preferred_doloop_mode): New hook. * tree-ssa-loop-ivopts.c (compute_doloop_base_on_mode): New function. (add_iv_candidate_for_doloop): Call targetm.preferred_doloop_mode and compute_doloop_base_on_mode. gcc/testsuite/ChangeLog: 2021-07-29 Jiufu Guo <guojiufu@linux.ibm.com> PR target/61837 * gcc.target/powerpc/pr61837.c: New test.
Diffstat (limited to 'gcc/tree-ssa-threadedge.c')
0 files changed, 0 insertions, 0 deletions