diff options
author | Jeff Law <law@redhat.com> | 2013-09-25 21:28:03 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2013-09-25 21:28:03 -0600 |
commit | 5254eac41daa5fc22a65bfa47d75fa0445dee4ee (patch) | |
tree | 51aec5a2d37e7596f984fc1365e772fdecb9e80b /gcc/tree-ssa-threadupdate.h | |
parent | 9adc2b3c52c22752ffccfce101959f82e577e0f1 (diff) | |
download | gcc-5254eac41daa5fc22a65bfa47d75fa0445dee4ee.zip gcc-5254eac41daa5fc22a65bfa47d75fa0445dee4ee.tar.gz gcc-5254eac41daa5fc22a65bfa47d75fa0445dee4ee.tar.bz2 |
tree-flow.h (thread_through_all_blocks): Prototype moved into tree-ssa-threadupdate.h.
* tree-flow.h (thread_through_all_blocks): Prototype moved into
tree-ssa-threadupdate.h.
(register_jump_thread): Similarly.
* tree-ssa-threadupdate.h: New header file.
* tree-ssa-dom.c: Include tree-ssa-threadupdate.h.
* tree-vrp.c: Likewise.
* tree-ssa-threadedge.c: Include tree-ssa-threadupdate.h.
(thread_around_empty_blocks): Change type of path vector argument to
an edge,type pair from just an edge. Initialize both elements when
appending to a jump threading path. Tweak references to elements
appropriately.
(thread_across_edge): Similarly. Release memory for the elements
as needed.
* tree-ssa-threadupdate.c: Include tree-ssa-threadupdate.h.
(dump_jump_thread_path): New function broken out from
register_jump_thread.
(register_jump_thread): Use dump_jump_thread_path. Change type of
path vector entries. Search the path for NULL edges and dump
the path if one is found. Tweak the conversion of path to 3-edge
form to use the block copy type information embedded in the path.
* gcc.dg/tree-ssa/ssa-dom-thread-3.c: Update expected output.
From-SVN: r202933
Diffstat (limited to 'gcc/tree-ssa-threadupdate.h')
-rw-r--r-- | gcc/tree-ssa-threadupdate.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gcc/tree-ssa-threadupdate.h b/gcc/tree-ssa-threadupdate.h new file mode 100644 index 0000000..723f5bb --- /dev/null +++ b/gcc/tree-ssa-threadupdate.h @@ -0,0 +1,45 @@ +/* Communication between registering jump thread requests and + updating the SSA/CFG for jump threading. + Copyright (C) 2013 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +<http://www.gnu.org/licenses/>. */ + +#ifndef _TREE_SSA_THREADUPDATE_H +#define _TREE_SSA_THREADUPDATE_H 1 + +/* In tree-ssa-threadupdate.c. */ +extern bool thread_through_all_blocks (bool); +enum jump_thread_edge_type +{ + EDGE_START_JUMP_THREAD, + EDGE_COPY_SRC_BLOCK, + EDGE_COPY_SRC_JOINER_BLOCK, + EDGE_NO_COPY_SRC_BLOCK +}; + +class jump_thread_edge +{ +public: + jump_thread_edge (edge e, enum jump_thread_edge_type type) + : e (e), type (type) {} + + edge e; + enum jump_thread_edge_type type; +}; + +extern void register_jump_thread (vec<class jump_thread_edge *>); +#endif |