diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-26 03:28:03 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-26 03:28:03 +0000 |
commit | 0c5b289aa8913ab232a0147e08b256b22fd8532a (patch) | |
tree | 51aec5a2d37e7596f984fc1365e772fdecb9e80b /gcc/tree-ssa-threadupdate.h | |
parent | dfa7b5b595c7892921be8f3c017eff8eaa00f45f (diff) | |
download | gcc-0c5b289aa8913ab232a0147e08b256b22fd8532a.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202933 138bc75d-0d04-0410-961f-82ee72b054a4
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 00000000000..723f5bbe0eb --- /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 |