From 9639e8909e13aaa9583972f286972c62dcc26df7 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Wed, 24 May 2006 15:59:06 +0000 Subject: [PATCH] add exchange_cdep() [r7797] --- ir/ana/cdep.c | 8 ++++++++ ir/ana/cdep.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/ir/ana/cdep.c b/ir/ana/cdep.c index b6e9d9144..81fdd942b 100644 --- a/ir/ana/cdep.c +++ b/ir/ana/cdep.c @@ -18,6 +18,14 @@ cdep* find_cdep(const ir_node* block) } +void exchange_cdep(ir_node* old, const ir_node* new) +{ + cdep* cdep = find_cdep(new); + + pmap_insert(cdep_map, old, cdep); +} + + static void add_cdep(ir_node* node, ir_node* dep_on) { cdep* dep = find_cdep(node); diff --git a/ir/ana/cdep.h b/ir/ana/cdep.h index 29d3f7aef..842d72614 100644 --- a/ir/ana/cdep.h +++ b/ir/ana/cdep.h @@ -14,6 +14,8 @@ void free_cdep(ir_graph*); cdep* find_cdep(const ir_node* block); +void exchange_cdep(ir_node* old, const ir_node* new); + int is_cdep_on(const ir_node* dependee, const ir_node* candidate); int is_iterated_cdep_on(ir_node* dependee, ir_node* candidate); -- 2.20.1