summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramker <amker@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-13 10:52:00 +0000
committeramker <amker@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-13 10:52:00 +0000
commit1d67a0549321e6e816a70413eb58a761cc8f4a2f (patch)
tree447f34cd90f8a780c954781139f9db62adb3a742
parentc0f4422f26a07270ec6027df89b731e7b9977e14 (diff)
downloadgcc-1d67a0549321e6e816a70413eb58a761cc8f4a2f.tar.gz
* cfg.c (reset_original_copy_tables): New func.
* cfg.h (reset_original_copy_tables): New decl. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241095 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/cfg.c12
-rw-r--r--gcc/cfg.h1
3 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b2b3ab5804c..242805eeda7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-13 Bin Cheng <bin.cheng@arm.com>
+
+ * cfg.c (reset_original_copy_tables): New func.
+ * cfg.h (reset_original_copy_tables): New decl.
+
2016-10-13 Jakub Jelinek <jakub@redhat.com>
PR c/77946
diff --git a/gcc/cfg.c b/gcc/cfg.c
index cab66c67d4a..ee2e42c1f80 100644
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -1066,6 +1066,18 @@ initialize_original_copy_tables (void)
loop_copy = new hash_table<bb_copy_hasher> (10);
}
+/* Reset the data structures to maintain mapping between blocks and
+ its copies. */
+
+void
+reset_original_copy_tables (void)
+{
+ gcc_assert (original_copy_bb_pool);
+ bb_original->empty ();
+ bb_copy->empty ();
+ loop_copy->empty ();
+}
+
/* Free the data structures to maintain mapping between blocks and
its copies. */
void
diff --git a/gcc/cfg.h b/gcc/cfg.h
index 6c8ba7e8f10..ad935e3ee08 100644
--- a/gcc/cfg.h
+++ b/gcc/cfg.h
@@ -108,6 +108,7 @@ extern void scale_bbs_frequencies_int (basic_block *, int, int, int);
extern void scale_bbs_frequencies_gcov_type (basic_block *, int, gcov_type,
gcov_type);
extern void initialize_original_copy_tables (void);
+extern void reset_original_copy_tables (void);
extern void free_original_copy_tables (void);
extern void set_bb_original (basic_block, basic_block);
extern basic_block get_bb_original (basic_block);