summaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-09 16:47:06 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-09 16:47:06 +0000
commit1a9a443670598aaa49e2709fb6fb40a3e580c752 (patch)
tree7ff9b4837f50abdab01e59f816bf07c92e9a20fd /gcc/tree-cfg.c
parent31ebfd4982740ff959c6d561b0b97e3569d91ad3 (diff)
downloadgcc-1a9a443670598aaa49e2709fb6fb40a3e580c752.tar.gz
* gimple.h (CASE_GIMPLE_OMP): New.
(is_gimple_omp): Use it. * tree-cfg.c (is_ctrl_altering_stmt): Likewise. (verify_gimple_debug): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151565 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c54
1 files changed, 29 insertions, 25 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 3996f081733..524422f1ec4 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -2748,24 +2748,30 @@ is_ctrl_altering_stmt (gimple t)
{
gcc_assert (t);
- if (is_gimple_call (t))
+ switch (gimple_code (t))
{
- int flags = gimple_call_flags (t);
+ case GIMPLE_CALL:
+ {
+ int flags = gimple_call_flags (t);
- /* A non-pure/const call alters flow control if the current
- function has nonlocal labels. */
- if (!(flags & (ECF_CONST | ECF_PURE))
- && cfun->has_nonlocal_label)
- return true;
+ /* A non-pure/const call alters flow control if the current
+ function has nonlocal labels. */
+ if (!(flags & (ECF_CONST | ECF_PURE)) && cfun->has_nonlocal_label)
+ return true;
- /* A call also alters control flow if it does not return. */
- if (gimple_call_flags (t) & ECF_NORETURN)
- return true;
- }
+ /* A call also alters control flow if it does not return. */
+ if (gimple_call_flags (t) & ECF_NORETURN)
+ return true;
+ }
+ break;
- /* OpenMP directives alter control flow. */
- if (is_gimple_omp (t))
- return true;
+ CASE_GIMPLE_OMP:
+ /* OpenMP directives alter control flow. */
+ return true;
+
+ default:
+ break;
+ }
/* If a statement can throw, it alters control flow. */
return stmt_can_throw_internal (t);
@@ -4196,17 +4202,6 @@ verify_gimple_debug (gimple stmt ATTRIBUTE_UNUSED)
static bool
verify_types_in_gimple_stmt (gimple stmt)
{
- if (is_gimple_omp (stmt))
- {
- /* OpenMP directives are validated by the FE and never operated
- on by the optimizers. Furthermore, GIMPLE_OMP_FOR may contain
- non-gimple expressions when the main index variable has had
- its address taken. This does not affect the loop itself
- because the header of an GIMPLE_OMP_FOR is merely used to determine
- how to setup the parallel iteration. */
- return false;
- }
-
switch (gimple_code (stmt))
{
case GIMPLE_ASSIGN:
@@ -4244,6 +4239,15 @@ verify_types_in_gimple_stmt (gimple stmt)
case GIMPLE_PREDICT:
return false;
+ CASE_GIMPLE_OMP:
+ /* OpenMP directives are validated by the FE and never operated
+ on by the optimizers. Furthermore, GIMPLE_OMP_FOR may contain
+ non-gimple expressions when the main index variable has had
+ its address taken. This does not affect the loop itself
+ because the header of an GIMPLE_OMP_FOR is merely used to determine
+ how to setup the parallel iteration. */
+ return false;
+
case GIMPLE_DEBUG:
return verify_gimple_debug (stmt);