public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH GCC 2/9]Add interface reseting original copy tables in cfg.c
@ 2016-09-06 18:51 Bin Cheng
  2016-09-07 12:23 ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: Bin Cheng @ 2016-09-06 18:51 UTC (permalink / raw)
  To: gcc-patches; +Cc: nd

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

Hi,
This simple patch adds interface reseting original copy table in cfg.c.  This will be used in rewriting vect_do_peeling_* functions in vectorizer so that we don't need to release/allocate tables between prolog and epilog peeling.

Thanks,
bin

2016-09-01  Bin Cheng  <bin.cheng@arm.com>

	* cfg.c (reset_original_copy_tables): New func.
	* cfg.h (reset_original_copy_tables): New decl.

[-- Attachment #2: 002-interface-reset-copy-tables-20160901.txt --]
[-- Type: text/plain, Size: 1013 bytes --]

diff --git a/gcc/cfg.c b/gcc/cfg.c
index cab66c6..8e4a044 100644
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -1066,6 +1066,15 @@ initialize_original_copy_tables (void)
   loop_copy = new hash_table<bb_copy_hasher> (10);
 }
 
+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 6c8ba7e..ad935e3 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);

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-13 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-06 18:51 [PATCH GCC 2/9]Add interface reseting original copy tables in cfg.c Bin Cheng
2016-09-07 12:23 ` Jeff Law
2016-10-13 11:18   ` Bin.Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).