2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
8 * @brief boolean condition/control flow optimizations
9 * @author Matthias Braun, Christoph Mallon, Michael Beck
17 #include "../adt/array_t.h"
18 #include "iroptimize.h"
28 /** Describes a pair of relative conditions lo < hi, lo rel_lo x, hi rel_hi x */
29 typedef struct cond_pair {
30 ir_node *cmp_lo; /**< The lo compare node. */
31 ir_node *cmp_hi; /**< The hi compare node. */
32 ir_relation rel_lo; /**< The lo relation node. */
33 ir_relation rel_hi; /**< The hi relation node. */
34 ir_tarval *tv_lo; /**< The tarval of cmp_lo node. */
35 ir_tarval *tv_hi; /**< The tarval of cmp_hi node. */
36 ir_mode *lo_mode; /**< The mode of the cmp_lo operands. */
39 /** Environment for all walker in boolopt. */
41 int changed; /**< Set if the graph was changed. */
44 DEBUG_ONLY(static firm_dbg_module_t *dbg;)
47 * Check if tho given nodes, l and r, represent two compares with
48 * ... . If yes, return non-zero and fill the res struct.
50 static bool find_cond_pair(ir_node *const l, ir_node *const r, cond_pair *const res)
52 if (is_Cmp(l) && is_Cmp(r)) {
53 ir_node *const lol = get_Cmp_left(l);
54 ir_node *const lor = get_Cmp_right(l);
55 ir_node *const rol = get_Cmp_left(r);
56 ir_node *const ror = get_Cmp_right(r);
57 ir_relation const pnc_l = get_Cmp_relation(l);
58 ir_relation const pnc_r = get_Cmp_relation(r);
60 if (is_Const(lor) && is_Const_null(lor) &&
61 is_Const(ror) && is_Const_null(ror) &&
63 (pnc_l == ir_relation_less_greater || pnc_l == ir_relation_equal)) {
64 /* l == (lol !=|== NULL) && r == (rol !=|== NULL) */
69 res->tv_lo = get_Const_tarval(lor);
70 res->tv_hi = get_Const_tarval(ror);
71 res->lo_mode = get_irn_mode(lor);
76 if (lol == rol && lor != ror && is_Const(lor) && is_Const(ror)) {
77 /* l == (x CMP c_l), r == (x cmp c_r) */
78 ir_tarval *const tv_l = get_Const_tarval(lor);
79 ir_tarval *const tv_r = get_Const_tarval(ror);
80 ir_relation const rel = tarval_cmp(tv_l, tv_r);
82 res->lo_mode = get_irn_mode(lol);
84 if (rel == ir_relation_less) {
92 } else if (rel == ir_relation_greater) {
101 /* The constants shall be unequal but comparable.
102 * Local optimizations handle the equal case. */
112 * Handle (lo rel_lo x) AND (hi rel_hi x)
114 static ir_node *bool_and(cond_pair* const cpair, ir_node *dst_block)
116 ir_node *const cmp_lo = cpair->cmp_lo;
117 ir_node *const cmp_hi = cpair->cmp_hi;
118 ir_relation rel_lo = cpair->rel_lo;
119 ir_relation const rel_hi = cpair->rel_hi;
120 ir_tarval * tv_lo = cpair->tv_lo;
121 ir_tarval * tv_hi = cpair->tv_hi;
122 ir_mode * mode = cpair->lo_mode;
123 ir_graph * irg = get_irn_irg(cmp_lo);
125 if (rel_lo == ir_relation_equal && rel_hi == rel_lo &&
126 tarval_is_null(tv_lo) && tarval_is_null(tv_hi) &&
127 mode == get_tarval_mode(tv_hi)) {
128 /* p == NULL && q == NULL ==> (p&q) == NULL) */
129 ir_node *lol, *hil, *cmp, *c, *p;
131 if (mode_is_reference(mode)) {
132 mode = find_unsigned_mode(mode);
135 tv_lo = tarval_convert_to(tv_lo, mode);
136 if (tv_lo == tarval_bad)
139 if (mode_is_int(mode)) {
140 lol = get_Cmp_left(cmp_lo);
141 lol = new_r_Conv(dst_block, lol, mode);
142 hil = get_Cmp_left(cmp_hi);
143 hil = new_r_Conv(dst_block, hil, mode);
144 p = new_r_And(dst_block, lol, hil, mode);
145 c = new_r_Const(irg, tv_lo);
146 cmp = new_r_Cmp(dst_block, p, c, ir_relation_equal);
151 /* the following tests expect one common operand */
152 if (get_Cmp_left(cmp_lo) != get_Cmp_left(cmp_hi))
155 /* TODO: for now reject float modes */
156 if (! mode_is_int(mode))
159 /* Beware of NaN's, we can only check for (ordered) != here (which is Lg, not Ne) */
160 if ((rel_lo == ir_relation_less || rel_lo == ir_relation_less_equal || rel_lo == ir_relation_equal) &&
161 (rel_hi == ir_relation_equal || rel_hi == ir_relation_greater_equal || rel_hi == ir_relation_greater)) {
162 /* x <|<=|== lo && x ==|>=|> hi ==> false */
163 ir_node *const t = new_r_Const(irg, tarval_b_false);
165 } else if ((rel_lo == ir_relation_less || rel_lo == ir_relation_less_equal || rel_lo == ir_relation_equal) &&
166 (rel_hi == ir_relation_less || rel_hi == ir_relation_less_equal || rel_hi == ir_relation_less_greater)) {
167 /* x <|<=|== lo && x <|<=|!= hi ==> x <|<=|== lo */
169 } else if ((rel_lo == ir_relation_greater_equal || rel_lo == ir_relation_greater || rel_lo == ir_relation_less_greater) &&
170 (rel_hi == ir_relation_equal || rel_hi == ir_relation_greater_equal || rel_hi == ir_relation_greater)) {
171 /* x >=|>|!= lo && x ==|>=|> hi ==> x ==|>=|> hi */
173 } else if (tarval_is_one(tarval_sub(tv_hi, tv_lo, NULL))) { /* lo + 1 == hi */
174 if (rel_lo == ir_relation_greater_equal && rel_hi == ir_relation_less) {
175 /* x >= c && x < c + 1 ==> x == c */
176 ir_node *const p = new_r_Proj(cmp_lo, mode_b, ir_relation_equal);
178 } else if (rel_lo == ir_relation_greater) {
179 if (rel_hi == ir_relation_less_greater) {
180 /* x > c && x != c + 1 ==> x > c + 1 */
181 ir_node *const p = new_r_Proj(cmp_hi, mode_b, ir_relation_greater);
183 } else if (rel_hi == ir_relation_less) {
184 /* x > c && x < c + 1 ==> false */
185 ir_node *const t = new_r_Const(irg, tarval_b_false);
187 } else if (rel_hi == ir_relation_less_equal) {
188 /* x > c && x <= c + 1 ==> x != c + 1 */
189 ir_node *const p = new_r_Proj(cmp_hi, mode_b, ir_relation_equal);
192 } else if (rel_lo == ir_relation_less_greater && rel_hi == ir_relation_less) {
193 /* x != c && c < c + 1 ==> x < c */
194 ir_node *const p = new_r_Proj(cmp_lo, mode_b, ir_relation_less);
197 } else if ((rel_lo == ir_relation_greater || rel_lo == ir_relation_greater_equal) &&
198 (rel_hi == ir_relation_less || rel_lo == ir_relation_less_equal) &&
199 get_mode_arithmetic(mode) == irma_twos_complement) {
200 /* works for two-complements only */
201 /* x >|\= lo && x <|<= hi ==> (x - lo) <u|<=u (hi-lo) */
202 if (rel_lo == ir_relation_greater) {
203 /* must convert to >= */
204 ir_mode *mode = get_tarval_mode(tv_lo);
205 ir_tarval *n = tarval_add(tv_lo, get_mode_one(mode));
206 if (n != tarval_bad && tarval_cmp(n, tv_lo) == ir_relation_greater) {
209 rel_lo = ir_relation_greater_equal;
212 if (rel_lo == ir_relation_greater_equal) {
214 ir_node *const block = get_nodes_block(cmp_hi);
215 ir_node * x = get_Cmp_left(cmp_hi);
216 ir_mode * mode = get_irn_mode(x);
217 ir_node *sub, *cmp, *c, *subc;
219 if (mode_is_signed(mode)) {
220 /* convert to unsigned */
221 mode = find_unsigned_mode(mode);
224 x = new_r_Conv(block, x, mode);
225 tv_lo = tarval_convert_to(tv_lo, mode);
226 tv_hi = tarval_convert_to(tv_hi, mode);
227 if (tv_lo == tarval_bad || tv_hi == tarval_bad)
230 c = new_r_Const(irg, tv_lo);
231 sub = new_r_Sub(block, x, c, mode);
232 subc = new_r_Sub(block, new_r_Const(irg, tv_hi), c, mode);
233 cmp = new_r_Cmp(block, sub, subc, rel_hi);
241 * Handle (lo rel_lo x) OR (hi rel_hi x)
243 static ir_node *bool_or(cond_pair *const cpair, ir_node *dst_block)
245 ir_node *const cmp_lo = cpair->cmp_lo;
246 ir_node *const cmp_hi = cpair->cmp_hi;
247 ir_relation rel_lo = cpair->rel_lo;
248 ir_relation const rel_hi = cpair->rel_hi;
249 ir_tarval * tv_lo = cpair->tv_lo;
250 ir_tarval * tv_hi = cpair->tv_hi;
251 ir_mode * mode = cpair->lo_mode;
252 ir_graph * irg = get_irn_irg(cmp_lo);
254 if (rel_lo == ir_relation_less_greater && rel_hi == ir_relation_less_greater &&
255 tarval_is_null(tv_lo) && tarval_is_null(tv_hi) &&
256 mode == get_tarval_mode(tv_hi)) {
257 /* p != NULL || q != NULL ==> (p|q) != NULL) */
258 ir_node *lol, *hil, *cmp, *c, *p;
260 if (mode_is_reference(mode)) {
261 mode = find_unsigned_mode(mode);
264 tv_lo = tarval_convert_to(tv_lo, mode);
265 if (tv_lo == tarval_bad)
268 if (mode_is_int(mode)) {
269 lol = get_Cmp_left(cmp_lo);
270 lol = new_r_Conv(dst_block, lol, mode);
271 hil = get_Cmp_left(cmp_hi);
272 hil = new_r_Conv(dst_block, hil, mode);
273 p = new_r_Or(dst_block, lol, hil, mode);
274 c = new_r_Const(irg, tv_lo);
275 cmp = new_r_Cmp(dst_block, p, c, ir_relation_less_greater);
280 /* the following tests expect one common operand */
281 if (get_Cmp_left(cmp_lo) != get_Cmp_left(cmp_hi))
284 /* TODO: for now reject float modes */
285 if (! mode_is_int(mode))
288 /* Beware of NaN's, we can only check for (ordered) != here (which is Lg, not Ne) */
289 if ((rel_lo == ir_relation_greater_equal || rel_lo == ir_relation_greater || rel_lo == ir_relation_less_greater) &&
290 (rel_hi == ir_relation_less || rel_hi == ir_relation_less_equal || rel_hi == ir_relation_less_greater)) {
291 /* x >=|>|!= lo | x <|<=|!= hi ==> true */
292 ir_node *const t = new_r_Const(irg, tarval_b_true);
294 } else if ((rel_lo == ir_relation_less || rel_lo == ir_relation_less_equal || rel_lo == ir_relation_equal) &&
295 (rel_hi == ir_relation_less || rel_hi == ir_relation_less_equal || rel_hi == ir_relation_less_greater)) {
296 /* x <|<=|== lo || x <|<=|!= hi ==> x <|<=|!= hi */
298 } else if ((rel_lo == ir_relation_greater_equal || rel_lo == ir_relation_greater || rel_lo == ir_relation_less_greater) &&
299 (rel_hi == ir_relation_equal || rel_hi == ir_relation_greater_equal || rel_hi == ir_relation_greater)) {
300 /* x >=|>|!= lo || x ==|>=|> hi ==> x >=|>|!= lo */
302 } else if (tarval_is_one(tarval_sub(tv_hi, tv_lo, NULL))) { /* lo + 1 == hi */
303 if (rel_lo == ir_relation_less && rel_hi == ir_relation_greater_equal) {
304 /* x < c || x >= c + 1 ==> x != c */
305 ir_node *const p = new_r_Proj(cmp_lo, mode_b, ir_relation_less_greater);
307 } else if (rel_lo == ir_relation_less_equal) {
308 if (rel_hi == ir_relation_equal) {
309 /* x <= c || x == c + 1 ==> x <= c + 1 */
310 ir_node *const p = new_r_Proj(cmp_hi, mode_b, ir_relation_less_equal);
312 } else if (rel_hi == ir_relation_greater_equal) {
313 /* x <= c || x >= c + 1 ==> true */
314 ir_node *const t = new_r_Const(irg, tarval_b_true);
316 } else if (rel_hi == ir_relation_greater) {
317 /* x <= c || x > c + 1 ==> x != c + 1 */
318 ir_node *const p = new_r_Proj(cmp_hi, mode_b, ir_relation_less_greater);
321 } else if (rel_lo == ir_relation_equal && rel_hi == ir_relation_greater_equal) {
322 /* x == c || x >= c + 1 ==> x >= c */
323 ir_node *const p = new_r_Proj(cmp_lo, mode_b, ir_relation_greater_equal);
326 } else if ((rel_lo == ir_relation_less || rel_lo == ir_relation_less_equal) &&
327 (rel_hi == ir_relation_greater || rel_lo == ir_relation_greater_equal) &&
328 get_mode_arithmetic(mode) == irma_twos_complement) {
329 /* works for two-complements only */
330 /* x <|<= lo || x >|>= hi ==> (x - lo) >u|>=u (hi-lo) */
331 if (rel_lo == ir_relation_less_equal) {
332 /* must convert to < */
333 ir_mode *mode = get_tarval_mode(tv_lo);
334 ir_tarval *n = tarval_add(tv_lo, get_mode_one(mode));
335 if (n != tarval_bad && tarval_cmp(n, tv_lo) == ir_relation_greater) {
338 rel_lo = ir_relation_less;
341 if (rel_lo == ir_relation_less) {
343 ir_node *const block = get_nodes_block(cmp_hi);
344 ir_node * x = get_Cmp_left(cmp_hi);
345 ir_mode * mode = get_irn_mode(x);
346 ir_node *sub, *cmp, *c, *subc;
348 if (mode_is_signed(mode)) {
349 /* convert to unsigned */
350 mode = find_unsigned_mode(mode);
353 x = new_r_Conv(block, x, mode);
354 tv_lo = tarval_convert_to(tv_lo, mode);
355 tv_hi = tarval_convert_to(tv_hi, mode);
356 if (tv_lo == tarval_bad || tv_hi == tarval_bad)
359 c = new_r_Const(irg, tv_lo);
360 sub = new_r_Sub(block, x, c, mode);
361 subc = new_r_Sub(block, new_r_Const(irg, tv_hi), c, mode);
362 cmp = new_r_Cmp(block, sub, subc, rel_hi);
370 * Walker, tries to optimize Andb and Orb nodes.
372 static void bool_walk(ir_node *n, void *ctx)
374 bool_opt_env_t *env = (bool_opt_env_t*)ctx;
376 if (get_irn_mode(n) != mode_b)
380 ir_node *const l = get_And_left(n);
381 ir_node *const r = get_And_right(n);
382 ir_node * replacement;
384 if (!find_cond_pair(l, r, &cpair))
386 replacement = bool_and(&cpair, get_nodes_block(n));
388 exchange(n, replacement);
391 } else if (is_Or(n)) {
392 ir_node *const l = get_Or_left(n);
393 ir_node *const r = get_Or_right(n);
394 ir_node * replacement;
396 if (!find_cond_pair(l, r, &cpair))
398 replacement = bool_or(&cpair, get_nodes_block(n));
400 exchange(n, replacement);
407 * Walker, clear Block marker and Phi lists.
409 static void clear_block_infos(ir_node *node, void *env)
413 /* we visit blocks before any other nodes (from the block) */
417 /* clear the PHI list */
418 set_Block_phis(node, NULL);
419 set_Block_mark(node, 0);
423 * Walker: collect Phi nodes and mark
425 static void collect_phis(ir_node *node, void *env)
430 ir_node *block = get_nodes_block(node);
431 add_Block_phi(block, node);
435 /* Ignore control flow nodes, these will be removed. */
436 if (get_irn_pinned(node) == op_pin_state_pinned &&
437 !is_Block(node) && !is_cfop(node)) {
438 /* found a pinned non-cf node, mark its block */
439 ir_node *block = get_nodes_block(node);
440 set_Block_mark(block, 1);
445 * If node is a Jmp in a block containing no pinned instruction
446 * and having only one predecessor, skip the block and return its
447 * cf predecessor, else the node itself.
449 static ir_node *skip_empty_blocks(ir_node *node)
451 while (is_Jmp(node)) {
452 ir_node *block = get_nodes_block(node);
454 if (get_Block_n_cfgpreds(block) != 1)
457 if (get_Block_mark(block))
460 node = get_Block_cfgpred(block, 0);
466 * Check if two block inputs can be fused.
467 * This can be done, if block contains no Phi node that depends on
468 * different inputs idx_i and idx_j.
470 static int can_fuse_block_inputs(const ir_node *block, int idx_i, int idx_j)
474 for (phi = get_Block_phis(block); phi != NULL; phi = get_Phi_next(phi)) {
475 if (get_Phi_pred(phi, idx_i) != get_Phi_pred(phi, idx_j))
482 * Remove block input with given index.
484 static void remove_block_input(ir_node *block, int idx)
486 int i, j, n = get_Block_n_cfgpreds(block) - 1;
489 NEW_ARR_A(ir_node *, ins, n);
492 /* all Phis will be deleted */
495 for (phi = get_Block_phis(block); phi != NULL; phi = next_phi) {
496 next_phi = get_Phi_next(phi);
497 exchange(phi, get_Phi_pred(phi, idx ^ 1));
499 set_Block_phis(block, NULL);
501 for (phi = get_Block_phis(block); phi != NULL; phi = get_Phi_next(phi)) {
502 for (i = j = 0; i <= n; ++i) {
504 ins[j++] = get_Phi_pred(phi, i);
506 set_irn_in(phi, n, ins);
509 for (i = j = 0; i <= n; ++i) {
511 ins[j++] = get_Block_cfgpred(block, i);
513 set_irn_in(block, n, ins);
517 * Under the preposition that we have a chain of blocks from
518 * from_block to to_block, collapse them all into to_block.
520 static void move_nodes_to_block(ir_node *jmp, ir_node *to_block)
522 ir_node *new_jmp = NULL;
523 ir_node *block, *next_block;
525 for (block = get_nodes_block(jmp); block != to_block; block = next_block) {
526 new_jmp = get_Block_cfgpred(block, 0);
527 next_block = get_nodes_block(new_jmp);
528 exchange(block, to_block);
531 exchange(jmp, new_jmp);
537 * if we can find the following structure,
548 * try to convert it into a (x rel_lo c_lo) || (x rel_hi c_hi)
551 static void find_cf_and_or_walker(ir_node *block, void *ctx)
553 bool_opt_env_t *env = (bool_opt_env_t*)ctx;
557 /* because we modify the graph in regions we might not visited yet,
558 * Id nodes might arise here. Ignore them.
563 n_cfgpreds = get_Block_n_cfgpreds(block);
568 for (low_idx = 0; low_idx < n_cfgpreds; ++low_idx) {
569 ir_node *lower_block;
573 lower_cf = get_Block_cfgpred(block, low_idx);
574 lower_cf = skip_empty_blocks(lower_cf);
575 if (!is_Proj(lower_cf))
578 cond = get_Proj_pred(lower_cf);
582 lower_block = get_nodes_block(cond);
583 if (get_Block_n_cfgpreds(lower_block) != 1)
586 /* the block must not produce any side-effects */
587 if (get_Block_mark(lower_block))
590 ir_node *const cond_selector = get_Cond_selector(cond);
591 ir_node *const lower_pred = get_Block_cfgpred_block(lower_block, 0);
592 for (up_idx = 0; up_idx < n_cfgpreds; ++up_idx) {
593 ir_node *upper_block;
595 ir_node *replacement;
598 upper_cf = get_Block_cfgpred(block, up_idx);
599 upper_cf = skip_empty_blocks(upper_cf);
600 if (is_Bad(upper_cf))
602 upper_block = get_nodes_block(upper_cf);
603 if (upper_block != lower_pred)
605 if (!block_dominates(upper_block, block))
608 /* we have found the structure */
609 /* check Phis: There must be NO Phi in block that
610 depends on the existence of low block */
611 if (!can_fuse_block_inputs(block, low_idx, up_idx))
614 /* all fine, try it */
615 ir_node *const upper_cond = get_Proj_pred(upper_cf);
616 ir_node *const upper_cond_selector = get_Cond_selector(upper_cond);
617 if (!find_cond_pair(cond_selector, upper_cond_selector, &cpair))
620 /* normalize pncs: we need the true case to jump into the
621 * common block (i.e. conjunctive normal form) */
622 if (get_Proj_proj(lower_cf) == pn_Cond_false) {
623 if (cpair.cmp_lo == cond_selector) {
624 ir_node *cmp = cpair.cmp_lo;
625 ir_node *block = get_nodes_block(cmp);
626 dbg_info *dbgi = get_irn_dbg_info(cmp);
627 cpair.rel_lo = get_negated_relation(cpair.rel_lo);
628 cpair.cmp_lo = new_rd_Cmp(dbgi, block,
629 get_Cmp_left(cmp), get_Cmp_right(cmp), cpair.rel_lo);
631 ir_node *cmp = cpair.cmp_hi;
632 ir_node *block = get_nodes_block(cmp);
633 dbg_info *dbgi = get_irn_dbg_info(cmp);
634 assert(cmp == cond_selector);
635 cpair.rel_hi = get_negated_relation(cpair.rel_hi);
636 cpair.cmp_hi = new_rd_Cmp(dbgi, block,
637 get_Cmp_left(cmp), get_Cmp_right(cmp), cpair.rel_hi);
640 if (get_Proj_proj(upper_cf) == pn_Cond_false) {
641 if (cpair.cmp_lo == upper_cond_selector) {
642 ir_node *cmp = cpair.cmp_lo;
643 ir_node *block = get_nodes_block(cmp);
644 dbg_info *dbgi = get_irn_dbg_info(cmp);
645 cpair.rel_lo = get_negated_relation(cpair.rel_lo);
646 cpair.cmp_lo = new_rd_Cmp(dbgi, block,
647 get_Cmp_left(cmp), get_Cmp_right(cmp), cpair.rel_lo);
649 ir_node *cmp = cpair.cmp_hi;
650 ir_node *block = get_nodes_block(cmp);
651 dbg_info *dbgi = get_irn_dbg_info(cmp);
652 assert(cmp == upper_cond_selector);
653 cpair.rel_hi = get_negated_relation(cpair.rel_hi);
654 cpair.cmp_hi = new_rd_Cmp(dbgi, block,
655 get_Cmp_left(cmp), get_Cmp_right(cmp), cpair.rel_hi);
659 /* can we optimize the case? */
660 replacement = bool_or(&cpair, upper_block);
661 if (replacement == NULL)
666 DB((dbg, LEVEL_1, "boolopt: %+F: fusing (ub %+F lb %+F)\n",
667 get_irn_irg(upper_block), upper_block, lower_block));
669 /* move all expressions on the path to lower/upper block */
670 move_nodes_to_block(get_Block_cfgpred(block, up_idx), upper_block);
671 move_nodes_to_block(get_Block_cfgpred(block, low_idx), lower_block);
673 /* move all nodes from lower block to upper block */
674 exchange(lower_block, upper_block);
676 remove_block_input(block, up_idx);
679 /* the optimizations expected the true case to jump */
680 if (get_Proj_proj(lower_cf) == pn_Cond_false) {
681 ir_node *block = get_nodes_block(replacement);
682 replacement = new_rd_Not(NULL, block, replacement, mode_b);
684 set_Cond_selector(cond, replacement);
691 void opt_bool(ir_graph *const irg)
695 /* register a debug mask */
696 FIRM_DBG_REGISTER(dbg, "firm.opt.bool");
700 /* optimize simple Andb and Orb cases */
701 irg_walk_graph(irg, NULL, bool_walk, &env);
703 /* now more complicated cases: find control flow And/Or and optimize. */
704 ir_reserve_resources(irg, IR_RESOURCE_BLOCK_MARK | IR_RESOURCE_PHI_LIST);
705 irg_walk_graph(irg, clear_block_infos, collect_phis, NULL);
706 irg_block_walk_graph(irg, NULL, find_cf_and_or_walker, &env);
707 ir_free_resources(irg, IR_RESOURCE_BLOCK_MARK | IR_RESOURCE_PHI_LIST);
709 confirm_irg_properties(irg,
710 env.changed ? IR_GRAPH_PROPERTIES_NONE : IR_GRAPH_PROPERTIES_ALL);
713 /* Creates an ir_graph pass for opt_bool. */
714 ir_graph_pass_t *opt_bool_pass(const char *name)
716 return def_graph_pass(name ? name : "opt_bool", opt_bool);