diff options
author | vekumar <vekumar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-09 15:48:45 +0000 |
---|---|---|
committer | vekumar <vekumar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-09 15:48:45 +0000 |
commit | 7b64e7e0cde2704d3f982d31c20a61fac0d39987 (patch) | |
tree | 57e1fe2200c0ab02d5afebc842ab80d29b4aa98e /gcc/cfgloop.h | |
parent | 011ea24cdbd3084a1408a5abf015da0ea1eca0ee (diff) | |
download | gcc-7b64e7e0cde2704d3f982d31c20a61fac0d39987.tar.gz |
Fix for PR53397 by making prefecthing less agressive
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192261 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloop.h')
-rw-r--r-- | gcc/cfgloop.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index 9d7b784174d..80af7d8dbc4 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -712,4 +712,18 @@ extern void move_loop_invariants (void); extern bool finite_loop_p (struct loop *); extern void scale_loop_profile (struct loop *loop, int scale, int iteration_bound); +/* Returns the outermost loop of the loop nest that contains LOOP.*/ +static inline struct loop * +loop_outermost (struct loop *loop) +{ + + unsigned n = VEC_length (loop_p, loop->superloops); + + if (n <= 1) + return loop; + + return VEC_index (loop_p, loop->superloops, 1); +} + + #endif /* GCC_CFGLOOP_H */ |