aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfghooks.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-08-30 11:11:01 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-08-30 11:11:01 +0000
commitd19188032afbbea1854ff5439482fa63f00d4906 (patch)
tree145b80592c01556fd2f46d5baceaa190a577c03d /gcc/cfghooks.h
parent09f1bd959287894eeaeb6ab12ce85c6051d0e31a (diff)
downloadgcc-d19188032afbbea1854ff5439482fa63f00d4906.zip
gcc-d19188032afbbea1854ff5439482fa63f00d4906.tar.gz
gcc-d19188032afbbea1854ff5439482fa63f00d4906.tar.bz2
backport: [multiple changes]
2019-08-30 Richard Biener <rguenther@suse.de> * lto-streamer.h (LTO_minor_version): Bump. Backport from mainline 2019-05-06 Richard Biener <rguenther@suse.de> PR tree-optimization/90328 * tree-data-ref.h (dr_may_alias_p): Pass in the actual loop nest. * tree-data-ref.c (dr_may_alias_p): Check whether the clique is valid in the loop nest before using it. (initialize_data_dependence_relation): Adjust. * graphite-scop-detection.c (build_alias_set): Pass the SCOP enclosing loop as loop-nest to dr_may_alias_p. * gcc.dg/torture/pr90328.c: New testcase. 2019-03-08 Richard Biener <rguenther@suse.de> PR middle-end/89578 * cfgloop.h (struct loop): Add owned_clique field. * cfgloopmanip.c (copy_loop_info): Copy it. * tree-cfg.c (gimple_duplicate_bb): Do not remap owned_clique cliques. * tree-inline.c (copy_loops): Remap owned_clique. * lto-streamer-in.c (input_cfg): Stream owned_clique. * lto-streamer-out.c (output_cfg): Likewise. 2019-02-22 Richard Biener <rguenther@suse.de> PR tree-optimization/87609 * tree-cfg.c (gimple_duplicate_bb): Only remap inlined cliques. 2019-02-22 Richard Biener <rguenther@suse.de> PR middle-end/87609 * cfghooks.h (dependence_hash): New typedef. (struct copy_bb_data): New type. (cfg_hooks::duplicate_block): Adjust to take a copy_bb_data argument. (duplicate_block): Likewise. * cfghooks.c (duplicate_block): Pass down copy_bb_data. (copy_bbs): Create and pass down copy_bb_data. * cfgrtl.c (cfg_layout_duplicate_bb): Adjust. (rtl_duplicate_bb): Likewise. * tree-cfg.c (gimple_duplicate_bb): If the copy_bb_data arg is not NULL remap dependence info. * gcc.dg/torture/restrict-7.c: New testcase. 2019-02-22 Richard Biener <rguenther@suse.de> PR tree-optimization/87609 * tree-core.h (tree_base): Document special clique values. * tree-inline.c (remap_dependence_clique): Do not use the special clique value of one. (maybe_set_dependence_info): Use clique one. (clear_dependence_clique): New callback. (compute_dependence_clique): Clear clique one from all refs before assigning it (again). From-SVN: r275069
Diffstat (limited to 'gcc/cfghooks.h')
-rw-r--r--gcc/cfghooks.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/gcc/cfghooks.h b/gcc/cfghooks.h
index b5981da4..fa2092a 100644
--- a/gcc/cfghooks.h
+++ b/gcc/cfghooks.h
@@ -54,6 +54,19 @@ struct profile_record
bool run;
};
+typedef int_hash <unsigned short, 0> dependence_hash;
+
+/* Optional data for duplicate_block. */
+
+struct copy_bb_data
+{
+ copy_bb_data() : dependence_map (NULL) {}
+ ~copy_bb_data () { delete dependence_map; }
+
+ /* A map from the copied BBs dependence info cliques to
+ equivalents in the BBs duplicated to. */
+ hash_map<dependence_hash, unsigned short> *dependence_map;
+};
struct cfg_hooks
{
@@ -112,7 +125,7 @@ struct cfg_hooks
bool (*can_duplicate_block_p) (const_basic_block a);
/* Duplicate block A. */
- basic_block (*duplicate_block) (basic_block a);
+ basic_block (*duplicate_block) (basic_block a, copy_bb_data *);
/* Higher level functions representable by primitive operations above if
we didn't have some oddities in RTL and Tree representations. */
@@ -227,7 +240,8 @@ extern void tidy_fallthru_edges (void);
extern void predict_edge (edge e, enum br_predictor predictor, int probability);
extern bool predicted_by_p (const_basic_block bb, enum br_predictor predictor);
extern bool can_duplicate_block_p (const_basic_block);
-extern basic_block duplicate_block (basic_block, edge, basic_block);
+extern basic_block duplicate_block (basic_block, edge, basic_block,
+ copy_bb_data * = NULL);
extern bool block_ends_with_call_p (basic_block bb);
extern bool empty_block_p (basic_block);
extern basic_block split_block_before_cond_jump (basic_block);