irconsconfirm.c 15.3 KB
Newer Older
Michael Beck's avatar
Michael Beck committed
1
/*
Matthias Braun's avatar
Matthias Braun committed
2
 * This file is part of libFirm.
3
 * Copyright (C) 2012 University of Karlsruhe.
Michael Beck's avatar
Michael Beck committed
4
 */
5

Matthias Braun's avatar
Matthias Braun committed
6
7
8
9
10
11
/**
 * @file
 * @brief    Construction of Confirm nodes
 * @author   Michael Beck
 * @date     6.2005
 */
12
13
#include "irconsconfirm.h"

Michael Beck's avatar
Michael Beck committed
14
15
16
17
18
19
#include "irgraph_t.h"
#include "irnode_t.h"
#include "ircons_t.h"
#include "irgmod.h"
#include "iropt_dbg.h"
#include "iredges_t.h"
Michael Beck's avatar
Michael Beck committed
20
#include "irgwalk.h"
21
#include "irgopt.h"
Matthias Braun's avatar
Matthias Braun committed
22
#include "irtools.h"
23
#include "array.h"
24
#include "debug.h"
Matthias Braun's avatar
Matthias Braun committed
25
#include "error.h"
26
#include "irflag.h"
Michael Beck's avatar
Michael Beck committed
27
28
29
30

/**
 * Walker environment.
 */
31
typedef struct env_t {
32
33
34
35
	unsigned num_confirms;  /**< Number of inserted Confirm nodes. */
	unsigned num_consts;    /**< Number of constants placed. */
	unsigned num_eq;        /**< Number of equalities placed. */
	unsigned num_non_null;  /**< Number of non-null Confirms. */
Michael Beck's avatar
Michael Beck committed
36
37
} env_t;

38
39
40
/** The debug handle. */
DEBUG_ONLY(static firm_dbg_module_t *dbg;)

41
/**
42
 * Return the effective use block of a node and its predecessor on
43
44
45
46
47
48
49
 * position pos.
 *
 * @param node  the node
 * @param pos   the position of the used input
 *
 * This handles correctly Phi nodes.
 */
50
51
static ir_node *get_effective_use_block(ir_node *node, int pos)
{
52
	if (is_Phi(node)) {
53
54
55
		/* the effective use of a Phi argument is in its predecessor block */
		node = get_nodes_block(node);
		return get_Block_cfgpred_block(node, pos);
56
57
	}
	return get_nodes_block(node);
58
59
}

Matthias Braun's avatar
Matthias Braun committed
60
61
62
63
64
65
static ir_node *get_case_value(ir_node *switchn, long pn)
{
	ir_graph              *irg       = get_irn_irg(switchn);
	const ir_switch_table *table     = get_Switch_table(switchn);
	size_t                 n_entries = ir_switch_table_get_n_entries(table);
	ir_tarval             *val       = NULL;
Matthias Braun's avatar
Matthias Braun committed
66
	for (size_t e = 0; e < n_entries; ++e) {
Matthias Braun's avatar
Matthias Braun committed
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
		const ir_switch_table_entry *entry
			= ir_switch_table_get_entry_const(table, e);
		if (entry->pn != pn)
			continue;
		/* multiple matching entries gets too complicated for a single
		 * Confirm */
		if (val != NULL)
			return NULL;
		/* case ranges are too complicated too */
		if (entry->min != entry->max)
			return NULL;
		val = entry->min;
	}
	assert(val != NULL);
	return new_r_Const(irg, val);
}

Michael Beck's avatar
Michael Beck committed
84
85
86
87
88
89
/**
 * Handle a CASE-branch.
 *
 * Branch labels are a simple case. We can replace the value
 * by a Const with the branch label.
 */
Matthias Braun's avatar
Matthias Braun committed
90
static void handle_case(ir_node *block, ir_node *switchn, long pn, env_t *env)
91
{
Matthias Braun's avatar
Matthias Braun committed
92
	ir_node *c        = NULL;
93
	ir_node *selector = get_Switch_selector(switchn);
Michael Beck's avatar
Michael Beck committed
94

Matthias Braun's avatar
Matthias Braun committed
95
96
	/* we can't do usefull things with the default label */
	if (pn == pn_Switch_default)
Michael Beck's avatar
Michael Beck committed
97
98
		return;

99
	foreach_out_edge_safe(selector, edge) {
Michael Beck's avatar
Michael Beck committed
100
101
102
103
104
		ir_node *succ = get_edge_src_irn(edge);
		int     pos   = get_edge_src_pos(edge);
		ir_node *blk  = get_effective_use_block(succ, pos);

		if (block_dominates(block, blk)) {
105
			/* Ok, we found a user of irn that is placed
Michael Beck's avatar
Michael Beck committed
106
107
			 * in a block dominated by the branch block.
			 * We can replace the input with the Constant
108
109
			 * branch label. */
			if (c == NULL) {
Matthias Braun's avatar
Matthias Braun committed
110
				c = get_case_value(switchn, pn);
111
112
113
				if (c == NULL)
					return;
			}
Michael Beck's avatar
Michael Beck committed
114
115

			set_irn_n(succ, pos, c);
Matthias Braun's avatar
Matthias Braun committed
116
			DBG_OPT_CONFIRM_C(selector, c);
117
			DB((dbg, LEVEL_2, "Replacing input %d of node %+F with %+F\n", pos, succ, c));
Michael Beck's avatar
Michael Beck committed
118
119
120
121

			env->num_consts += 1;
		}
	}
122
}
Michael Beck's avatar
Michael Beck committed
123

124
125
126
127
128
129
130
131
/**
 * Handle a mode_b input of Cond nodes.
 *
 * @param block     the block which is entered by the branch
 * @param selector  the mode_b node expressing the branch condition
 * @param pnc       the true/false condition branch
 * @param env       statistical environment
 */
132
133
static void handle_modeb(ir_node *block, ir_node *selector, pn_Cond pnc, env_t *env)
{
Matthias Braun's avatar
Matthias Braun committed
134
135
136
137
	ir_node *other_blk = NULL;
	ir_node *con       = NULL;
	ir_node *c_b       = NULL;
	ir_node *c_o       = NULL;
138

139
	foreach_out_edge_safe(selector, edge) {
140
141
142
143
144
145
146
147
148
149
150
		ir_node *user     = get_edge_src_irn(edge);
		int     pos       = get_edge_src_pos(edge);
		ir_node *user_blk = get_effective_use_block(user, pos);

		if (block_dominates(block, user_blk)) {
			/*
			 * Ok, we found a usage of selector in a block
			 * dominated by the branch block.
			 * We can replace the input with true/false.
			 */
			if (con == NULL) {
151
152
				ir_graph *irg = get_irn_irg(block);
				con = new_r_Const(irg, pnc == pn_Cond_true ? tarval_b_true : tarval_b_false);
153
			}
Matthias Braun's avatar
Matthias Braun committed
154
			ir_node *old = get_irn_n(user, pos);
155
156
157
			set_irn_n(user, pos, con);
			DBG_OPT_CONFIRM_C(old, con);

158
			DB((dbg, LEVEL_2, "Replacing input %d of node %+F with %+F\n", pos, user, con));
159
160
161
162
163
164

			env->num_consts += 1;
		} else {
			/* get the other block */
			if (other_blk == NULL) {
				/* we have already tested, that block has only ONE Cond predecessor */
Matthias Braun's avatar
Matthias Braun committed
165
				ir_node *cond = get_Proj_pred(get_Block_cfgpred(block, 0));
166
167
				foreach_out_edge(cond, edge) {
					ir_node *proj = get_edge_src_irn(edge);
168
					if (get_Proj_proj(proj) == (long)pnc)
169
170
171
172
173
174
						continue;
					edge = get_irn_out_edge_first(proj);
					other_blk = get_edge_src_irn(edge);
					break;
				}
				assert(other_blk);
175

176
				/*
177
178
179
180
				 * Note the special case here: if block is a then, there might be no else
				 * block. In that case the other_block is the user_blk itself and pred_block
				 * is the cond_block ...
				 *
181
				 * Best would be to introduce a block here, removing this critical edge.
182
183
184
185
				 * For some reasons I cannot repair dominance here, so I have to remove
				 * ALL critical edges...
				 * FIXME: This should not be needed if we could repair dominance ...
				 */
186
187
			}

Matthias Braun's avatar
Matthias Braun committed
188
			int n = get_Block_n_cfgpreds(user_blk);
189
190
191
192
193
194

			/*
			 * We have found a user in a non-dominated block:
			 * check, if all its block predecessors are dominated.
			 * If yes, place a Phi.
			 */
Matthias Braun's avatar
Matthias Braun committed
195
196
			int i;
			for (i = n; i-- > 0; ) {
197
198
				ir_node *pred_blk = get_Block_cfgpred_block(user_blk, i);

199
200
				if (!block_dominates(block, pred_blk) &&
				    !block_dominates(other_blk, pred_blk)) {
201
202
203
204
205
					/* can't do anything */
					break;
				}
			}
			if (i < 0) {
206
				ir_node **in = ALLOCAN(ir_node*, n);
207
208
				/* ok, ALL predecessors are either dominated by block OR other block */
				if (c_b == NULL) {
Matthias Braun's avatar
Matthias Braun committed
209
210
211
					ir_graph *irg     = get_irn_irg(block);
					ir_node  *c_true  = new_r_Const(irg, tarval_b_true);
					ir_node  *c_false = new_r_Const(irg, tarval_b_false);
212
					env->num_consts += 2;
213
214
215
216
217
218
219
					if (pnc == pn_Cond_true) {
						c_b = c_true;
						c_o = c_false;
					} else {
						c_b = c_false;
						c_o = c_true;
					}
220
				}
Matthias Braun's avatar
Matthias Braun committed
221
				for (i = n; i-- > 0; ) {
222
223
224
225
226
227
					ir_node *pred_blk = get_Block_cfgpred_block(user_blk, i);
					if (block_dominates(block, pred_blk))
						in[i] = c_b;
					else
						in[i] = c_o;
				}
Matthias Braun's avatar
Matthias Braun committed
228
				ir_node *phi = new_r_Phi(user_blk, n, in, mode_b);
229
				set_irn_n(user, pos, phi);
230
				env->num_eq += 1;
231
232
233
234
235
			}
		}
	}
}

Michael Beck's avatar
Michael Beck committed
236
237
238
239
240
/**
 * Handle an IF-branch.
 *
 * @param block   the block which is entered by the branch
 * @param cmp     the Cmp node expressing the branch condition
241
 * @param rel     the Compare relation for taking this branch
Michael Beck's avatar
Michael Beck committed
242
243
 * @param env     statistical environment
 */
244
static void handle_if(ir_node *block, ir_node *cmp, ir_relation rel, env_t *env)
245
{
Michael Beck's avatar
Michael Beck committed
246
247
	ir_node *left  = get_Cmp_left(cmp);
	ir_node *right = get_Cmp_right(cmp);
248
	ir_node *cond_block;
Michael Beck's avatar
Michael Beck committed
249
250

	/* Beware of Bads */
251
	if (is_Bad(left) || is_Bad(right))
Michael Beck's avatar
Michael Beck committed
252
253
254
255
		return;

	/* Do not create Confirm nodes for Cmp(Const, Const) constructs.
	   These are removed anyway */
256
	if (is_Const(left) && is_Const(right))
Michael Beck's avatar
Michael Beck committed
257
258
259
		return;

	/* try to place the constant on the right side for a Confirm */
260
	if (is_Const(left) || is_SymConst(left)) {
Michael Beck's avatar
Michael Beck committed
261
262
263
264
		ir_node *t = left;
		left  = right;
		right = t;

265
		rel = get_inversed_relation(rel);
Michael Beck's avatar
Michael Beck committed
266
267
268
269
270
271
	}

	/*
	 * First case: both values are identical.
	 * replace the left one by the right (potentially const) one.
	 */
272
	if (rel == ir_relation_equal) {
273
		cond_block = get_Block_cfgpred_block(block, 0);
274
		foreach_out_edge_safe(left, edge) {
275
			ir_node *user = get_edge_src_irn(edge);
Michael Beck's avatar
Michael Beck committed
276
			int     pos   = get_edge_src_pos(edge);
277
			ir_node *blk  = get_effective_use_block(user, pos);
Michael Beck's avatar
Michael Beck committed
278
279
280
281
282
283
284

			if (block_dominates(block, blk)) {
				/*
				 * Ok, we found a usage of left in a block
				 * dominated by the branch block.
				 * We can replace the input with right.
				 */
285
				set_irn_n(user, pos, right);
Michael Beck's avatar
Michael Beck committed
286
287
				DBG_OPT_CONFIRM(left, right);

288
				DB((dbg, LEVEL_2, "Replacing input %d of node %+F with %+F\n", pos, user, right));
Michael Beck's avatar
Michael Beck committed
289
290

				env->num_eq += 1;
291
292
293
294
295
296
297
			} else if (block_dominates(blk, cond_block)
					&& is_Const(right)
					&& get_irn_pinned(user) == op_pin_state_floats) {
				/*
				 * left == Const and we found a movable user of left in a
				 * dominator of the Cond block
				 */
298
				foreach_out_edge_safe(user, user_edge) {
299
300
301
302
303
					ir_node *usr_of_usr = get_edge_src_irn(user_edge);
					int      npos       = get_edge_src_pos(user_edge);
					ir_node *user_blk   = get_effective_use_block(usr_of_usr, npos);

					if (block_dominates(block, user_blk)) {
304
305
306
						/*
						 * The user of the user is dominated by our true/false
						 * block. So, create a copy of user WITH the constant
307
						 * replacing its pos'th input.
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
						 *
						 * This is always good for unop's and might be good
						 * for binops.
						 *
						 * If user has other user in the false/true block, code
						 * placement will move it down.
						 * If there are users in cond block or upper, we create
						 * "redundant ops", because one will have a const op,
						 * the other no const ...
						 */
						ir_node *new_op = exact_copy(user);
						set_nodes_block(new_op, block);
						set_irn_n(new_op, pos, right);
						set_irn_n(usr_of_usr, npos, new_op);
						env->num_eq += 1;
323
324
					}
				}
Michael Beck's avatar
Michael Beck committed
325
326
			}
		}
327
	} else { /* not ir_relation_equal cases */
Michael Beck's avatar
Michael Beck committed
328
329
		ir_node *c = NULL;

330
		foreach_out_edge_safe(left, edge) {
Michael Beck's avatar
Michael Beck committed
331
332
333
334
335
336
337
338
339
340
341
			ir_node *succ = get_edge_src_irn(edge);
			int     pos   = get_edge_src_pos(edge);
			ir_node *blk  = get_effective_use_block(succ, pos);

			if (block_dominates(block, blk)) {
				/*
				 * Ok, we found a usage of left in a block
				 * dominated by the branch block.
				 * We can replace the input with a Confirm(left, pnc, right).
				 */
				if (! c)
342
					c = new_r_Confirm(block, left, right, rel);
Michael Beck's avatar
Michael Beck committed
343
344
345

				pos = get_edge_src_pos(edge);
				set_irn_n(succ, pos, c);
346
				DB((dbg, LEVEL_2, "Replacing input %d of node %+F with %+F\n", pos, succ, c));
Michael Beck's avatar
Michael Beck committed
347
348
349
350

				env->num_confirms += 1;
			}
		}
351
352
353

		if (! is_Const(right)) {
			/* also construct inverse Confirms */
354
355
			ir_node *rc = NULL;

356
			rel = get_inversed_relation(rel);
357
			foreach_out_edge_safe(right, edge) {
358
				ir_node *succ = get_edge_src_irn(edge);
359
360
361
				if (succ == c)
					continue;

Matthias Braun's avatar
Matthias Braun committed
362
363
				int      pos  = get_edge_src_pos(edge);
				ir_node *blk  = get_effective_use_block(succ, pos);
364
365
366
367
368

				if (block_dominates(block, blk)) {
					/*
					 * Ok, we found a usage of right in a block
					 * dominated by the branch block.
369
					 * We can replace the input with a Confirm(right, rel^-1, left).
370
					 */
371
					if (! rc)
372
						rc = new_r_Confirm(block, right, left, rel);
373
374

					pos = get_edge_src_pos(edge);
375
376
					set_irn_n(succ, pos, rc);
					DB((dbg, LEVEL_2, "Replacing input %d of node %+F with %+F\n", pos, succ, rc));
377
378
379
380
381

					env->num_confirms += 1;
				}
			}
		}
Michael Beck's avatar
Michael Beck committed
382
	}
383
}
Michael Beck's avatar
Michael Beck committed
384
385

/**
386
 * Pre-block-walker: Called for every block to insert Confirm nodes
Michael Beck's avatar
Michael Beck committed
387
 */
388
static void insert_Confirm_in_block(ir_node *block, void *data)
389
{
Michael Beck's avatar
Michael Beck committed
390
391
392
393
394
395
396
	/*
	 * we can only handle blocks with only ONE control flow
	 * predecessor yet.
	 */
	if (get_Block_n_cfgpreds(block) != 1)
		return;

Matthias Braun's avatar
Matthias Braun committed
397
	ir_node *proj = get_Block_cfgpred(block, 0);
398
	if (! is_Proj(proj))
Michael Beck's avatar
Michael Beck committed
399
400
		return;

Matthias Braun's avatar
Matthias Braun committed
401
402
	env_t   *env = (env_t*)data;
	ir_node *cond = get_Proj_pred(proj);
Matthias Braun's avatar
Matthias Braun committed
403
404
405
	if (is_Switch(cond)) {
		long proj_nr = get_Proj_proj(proj);
		handle_case(block, cond, proj_nr, env);
406
	} else if (is_Cond(cond)) {
Matthias Braun's avatar
Matthias Braun committed
407
		ir_node *selector = get_Cond_selector(cond);
408
		ir_relation rel;
Michael Beck's avatar
Michael Beck committed
409

410
		handle_modeb(block, selector, (pn_Cond) get_Proj_proj(proj), env);
411

412
		if (! is_Cmp(selector))
Michael Beck's avatar
Michael Beck committed
413
414
			return;

415
		rel = get_Cmp_relation(selector);
Michael Beck's avatar
Michael Beck committed
416
417
418

		if (get_Proj_proj(proj) != pn_Cond_true) {
			/* it's the false branch */
419
			rel = get_negated_relation(rel);
Michael Beck's avatar
Michael Beck committed
420
		}
421
		DB((dbg, LEVEL_2, "At %+F using %+F Confirm %=\n", block, selector, rel));
Michael Beck's avatar
Michael Beck committed
422

423
		handle_if(block, selector, rel, env);
Michael Beck's avatar
Michael Beck committed
424
	}
425
}
426

427
428
429
/**
 * Checks if a node is a non-null Confirm.
 */
Matthias Braun's avatar
Matthias Braun committed
430
static bool is_non_null_Confirm(const ir_node *ptr)
431
{
432
433
	for (;;) {
		if (! is_Confirm(ptr))
434
			break;
435
		if (get_Confirm_relation(ptr) == ir_relation_less_greater) {
436
437
438
			ir_node *bound = get_Confirm_bound(ptr);

			if (is_Const(bound) && is_Const_null(bound))
Matthias Braun's avatar
Matthias Braun committed
439
				return true;
440
441
442
		}
		ptr = get_Confirm_value(ptr);
	}
443
444
445
446
447
448
	/*
	 * While a SymConst is not a Confirm, it is non-null
	 * anyway. This helps to reduce the number of
	 * constructed Confirms.
	 */
	if (is_SymConst_addr_ent(ptr))
Matthias Braun's avatar
Matthias Braun committed
449
450
		return true;
	return false;
451
}
452

453
/**
454
 * The given pointer will be dereferenced, add non-null Confirms.
455
456
457
458
459
 *
 * @param ptr    a node representing an address
 * @param block  the block of the dereferencing instruction
 * @param env    environment
 */
460
461
static void insert_non_null(ir_node *ptr, ir_node *block, env_t *env)
{
462
	ir_node *c = NULL;
463

464
	foreach_out_edge_safe(ptr, edge) {
465
		/* for now, we place a Confirm only in front of a Cmp */
Matthias Braun's avatar
Matthias Braun committed
466
		ir_node *succ = get_edge_src_irn(edge);
467
		if (! is_Cmp(succ))
468
			continue;
469

Matthias Braun's avatar
Matthias Braun committed
470
471
		int      pos = get_edge_src_pos(edge);
		ir_node *blk = get_effective_use_block(succ, pos);
472

473
		if (block_dominates(block, blk)) {
474
475
476
477
478
479
			/*
			 * Ok, we found a usage of ptr in a block
			 * dominated by the Load/Store block.
			 * We can replace the input with a Confirm(ptr, !=, NULL).
			 */
			if (c == NULL) {
480
481
482
				ir_mode  *mode = get_irn_mode(ptr);
				ir_graph *irg  = get_irn_irg(block);
				c = new_r_Const(irg, get_mode_null(mode));
483
				c = new_r_Confirm(block, ptr, c, ir_relation_less_greater);
484
485
486
			}

			set_irn_n(succ, pos, c);
487
			DB((dbg, LEVEL_2, "Replacing input %d of node %+F with %+F\n", pos, succ, c));
488

489
			env->num_non_null += 1;
490
491
492
			env->num_confirms += 1;
		}
	}
493
}
494
495
496
497

/**
 * Pre-walker: Called for every node to insert Confirm nodes
 */
498
static void insert_Confirm(ir_node *node, void *data)
499
{
Matthias Braun's avatar
Matthias Braun committed
500
	env_t *env = (env_t*)data;
501
502
503
504
	switch (get_irn_opcode(node)) {
	case iro_Block:
		insert_Confirm_in_block(node, env);
		break;
Matthias Braun's avatar
Matthias Braun committed
505
506
	case iro_Load: {
		ir_node *ptr = get_Load_ptr(node);
507
508
509
		if (! is_non_null_Confirm(ptr))
			insert_non_null(ptr, get_nodes_block(node), env);
		break;
Matthias Braun's avatar
Matthias Braun committed
510
511
512
	}
	case iro_Store: {
		ir_node *ptr = get_Store_ptr(node);
513
514
515
		if (! is_non_null_Confirm(ptr))
			insert_non_null(ptr, get_nodes_block(node), env);
		break;
Matthias Braun's avatar
Matthias Braun committed
516
	}
517
518
519
	default:
		break;
	}
520
}
Michael Beck's avatar
Michael Beck committed
521

522
void construct_confirms(ir_graph *irg)
523
{
524
525
	FIRM_DBG_REGISTER(dbg, "firm.ana.confirm");

526
	assure_irg_properties(irg,
527
		IR_GRAPH_PROPERTY_CONSISTENT_OUT_EDGES
528
		| IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE
529
		| IR_GRAPH_PROPERTY_NO_BADS
530
531
		| IR_GRAPH_PROPERTY_NO_CRITICAL_EDGES);

Michael Beck's avatar
Michael Beck committed
532
533
	assert(get_irg_pinned(irg) == op_pin_state_pinned &&
	       "Nodes must be placed to insert Confirms");
Michael Beck's avatar
Michael Beck committed
534

Matthias Braun's avatar
Matthias Braun committed
535
	env_t env;
Michael Beck's avatar
Michael Beck committed
536
537
538
	env.num_confirms = 0;
	env.num_consts   = 0;
	env.num_eq       = 0;
539
	env.num_non_null = 0;
Michael Beck's avatar
Michael Beck committed
540

541
	if (get_opt_global_null_ptr_elimination()) {
542
543
544
545
546
547
		/* do global NULL test elimination */
		irg_walk_graph(irg, insert_Confirm, NULL, &env);
	} else {
		/* now, visit all blocks and add Confirms where possible */
		irg_block_walk_graph(irg, insert_Confirm_in_block, NULL, &env);
	}
Michael Beck's avatar
Michael Beck committed
548

549
550
551
	DB((dbg, LEVEL_1, "# Confirms inserted : %u\n", env.num_confirms));
	DB((dbg, LEVEL_1, "# Const replacements: %u\n", env.num_consts));
	DB((dbg, LEVEL_1, "# node equalities   : %u\n", env.num_eq));
552
	DB((dbg, LEVEL_1, "# non-null Confirms : %u\n", env.num_non_null));
Michael Beck's avatar
Michael Beck committed
553

554
	confirm_irg_properties(irg, IR_GRAPH_PROPERTIES_CONTROL_FLOW);
555
}
Michael Beck's avatar
Michael Beck committed
556

557
static void remove_confirm(ir_node *n, void *env)
558
{
Michael Beck's avatar
Michael Beck committed
559
	(void) env;
560
561
562
	if (!is_Confirm(n))
		return;

Matthias Braun's avatar
Matthias Braun committed
563
	ir_node *value = get_Confirm_value(n);
564
565
	exchange(n, value);
}
Michael Beck's avatar
Michael Beck committed
566

567
568
void remove_confirms(ir_graph *irg)
{
569
	irg_walk_graph(irg, NULL, remove_confirm, NULL);
570
	confirm_irg_properties(irg, IR_GRAPH_PROPERTIES_CONTROL_FLOW);
571
}