aboutsummaryrefslogtreecommitdiff
path: root/gcc/pointer-query.cc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2023-07-28 16:18:32 +0200
committerJan Hubicka <jh@suse.cz>2023-07-28 16:19:21 +0200
commitf5fb9ff2396fd41fdd2e6d35a412e936d2d42f75 (patch)
treedcbebedc3915ec7bb64564cb2b94af0eedd4d86d /gcc/pointer-query.cc
parent095eb138f736d94dabf9a07a6671bd351be0e66a (diff)
downloadgcc-f5fb9ff2396fd41fdd2e6d35a412e936d2d42f75.zip
gcc-f5fb9ff2396fd41fdd2e6d35a412e936d2d42f75.tar.gz
gcc-f5fb9ff2396fd41fdd2e6d35a412e936d2d42f75.tar.bz2
loop-split improvements, part 3
extend tree-ssa-loop-split to understand test of the form if (i==0) and if (i!=0) which triggers only during the first iteration. Naturally we should also be able to trigger last iteration or split into 3 cases if the test indeed can fire in the middle of the loop. Last iteration is bit trickier pattern matching so I want to do it incrementally, but I implemented easy case using value range that handled loops with constant iterations. The testcase gets misupdated profile, I will also fix that incrementally. gcc/ChangeLog: PR middle-end/77689 * tree-ssa-loop-split.cc: Include value-query.h. (split_at_bb_p): Analyze cases where EQ/NE can be turned into LT/LE/GT/GE; return updated guard code. (split_loop): Use guard code. gcc/testsuite/ChangeLog: PR middle-end/77689 * g++.dg/tree-ssa/loop-split-1.C: New test.
Diffstat (limited to 'gcc/pointer-query.cc')
0 files changed, 0 insertions, 0 deletions