bechordal: Handle Phis more like live-ins instead of regular scheduled nodes in creat...
[libfirm] / ir / opt / jumpthreading.c
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief   Path-Sensitive Jump Threading
9  * @date    10. Sep. 2006
10  * @author  Christoph Mallon, Matthias Braun
11  */
12 #include "config.h"
13
14 #include "iroptimize.h"
15
16 #include <assert.h>
17 #include <stdbool.h>
18 #include "array_t.h"
19 #include "debug.h"
20 #include "ircons.h"
21 #include "irgmod.h"
22 #include "irgopt.h"
23 #include "irgwalk.h"
24 #include "irnode.h"
25 #include "irnode_t.h"
26 #include "iredges.h"
27 #include "iredges_t.h"
28 #include "irtools.h"
29 #include "irgraph.h"
30 #include "tv.h"
31 #include "iroptimize.h"
32 #include "iropt_dbg.h"
33 #include "irpass.h"
34 #include "vrp.h"
35 #include "firmstat_t.h"
36
37 #undef AVOID_PHIB
38
39 DEBUG_ONLY(static firm_dbg_module_t *dbg;)
40
41 /**
42  * Add the new predecessor x to node node, which is either a Block or a Phi
43  */
44 static void add_pred(ir_node* node, ir_node* x)
45 {
46         ir_node** ins;
47
48         int const n = get_Block_n_cfgpreds(node);
49         NEW_ARR_A(ir_node*, ins, n + 1);
50         for (int i = 0; i < n; i++)
51                 ins[i] = get_irn_n(node, i);
52         ins[n] = x;
53         set_irn_in(node, n + 1, ins);
54 }
55
56 static ir_node *ssa_second_def;
57 static ir_node *ssa_second_def_block;
58
59 static ir_node *search_def_and_create_phis(ir_node *block, ir_mode *mode,
60                                            int first)
61 {
62         int i;
63         int n_cfgpreds;
64         ir_graph *irg;
65         ir_node *phi;
66         ir_node **in;
67         ir_node *dummy;
68
69         /* In case of a bad input to a block we need to return the bad value */
70         if (is_Bad(block)) {
71                 ir_graph *irg = get_irn_irg(block);
72                 return new_r_Bad(irg, mode);
73         }
74
75         /* the other defs can't be marked for cases where a user of the original
76          * value is in the same block as the alternative definition.
77          * In this case we mustn't use the alternative definition.
78          * So we keep a flag that indicated whether we walked at least 1 block
79          * away and may use the alternative definition */
80         if (block == ssa_second_def_block && !first) {
81                 return ssa_second_def;
82         }
83
84         /* already processed this block? */
85         if (irn_visited(block)) {
86                 ir_node *value = (ir_node*) get_irn_link(block);
87                 return value;
88         }
89
90         irg = get_irn_irg(block);
91         assert(block != get_irg_start_block(irg));
92
93         /* a Block with only 1 predecessor needs no Phi */
94         n_cfgpreds = get_Block_n_cfgpreds(block);
95         if (n_cfgpreds == 1) {
96                 ir_node *pred_block = get_Block_cfgpred_block(block, 0);
97                 ir_node *value      = search_def_and_create_phis(pred_block, mode, 0);
98
99                 set_irn_link(block, value);
100                 mark_irn_visited(block);
101                 return value;
102         }
103
104         /* create a new Phi */
105         NEW_ARR_A(ir_node*, in, n_cfgpreds);
106         dummy = new_r_Dummy(irg, mode);
107         for (i = 0; i < n_cfgpreds; ++i)
108                 in[i] = dummy;
109
110         phi = new_r_Phi(block, n_cfgpreds, in, mode);
111         set_irn_link(block, phi);
112         mark_irn_visited(block);
113
114         /* set Phi predecessors */
115         for (i = 0; i < n_cfgpreds; ++i) {
116                 ir_node *pred_block = get_Block_cfgpred_block(block, i);
117                 ir_node *pred_val   = search_def_and_create_phis(pred_block, mode, 0);
118
119                 set_irn_n(phi, i, pred_val);
120         }
121
122         return phi;
123 }
124
125 /**
126  * Given a set of values this function constructs SSA-form for the users of the
127  * first value (the users are determined through the out-edges of the value).
128  * Uses the irn_visited flags. Works without using the dominance tree.
129  */
130 static void construct_ssa(ir_node *orig_block, ir_node *orig_val,
131                           ir_node *second_block, ir_node *second_val)
132 {
133         ir_graph *irg;
134         ir_mode *mode;
135
136         /* no need to do anything */
137         if (orig_val == second_val)
138                 return;
139
140         irg = get_irn_irg(orig_val);
141         inc_irg_visited(irg);
142
143         mode = get_irn_mode(orig_val);
144         set_irn_link(orig_block, orig_val);
145         mark_irn_visited(orig_block);
146
147         ssa_second_def_block = second_block;
148         ssa_second_def       = second_val;
149
150         /* Only fix the users of the first, i.e. the original node */
151         foreach_out_edge_safe(orig_val, edge) {
152                 ir_node *user = get_edge_src_irn(edge);
153                 int j = get_edge_src_pos(edge);
154                 ir_node *user_block = get_nodes_block(user);
155                 ir_node *newval;
156
157                 /* ignore keeps */
158                 if (is_End(user))
159                         continue;
160
161                 DB((dbg, LEVEL_3, ">>> Fixing user %+F (pred %d == %+F)\n", user, j, get_irn_n(user, j)));
162
163                 if (is_Phi(user)) {
164                         ir_node *pred_block = get_Block_cfgpred_block(user_block, j);
165                         newval = search_def_and_create_phis(pred_block, mode, 1);
166                 } else {
167                         newval = search_def_and_create_phis(user_block, mode, 1);
168                 }
169
170                 /* don't fix newly created Phis from the SSA construction */
171                 if (newval != user) {
172                         DB((dbg, LEVEL_4, ">>>> Setting input %d of %+F to %+F\n", j, user, newval));
173                         set_irn_n(user, j, newval);
174                 }
175         }
176 }
177
178 /**
179  * jumpthreading produces critical edges, e.g. B-C:
180  *     A         A
181  *  \ /       \  |
182  *   B    =>   B |
183  *  / \       / \|
184  *     C         C
185  *
186  * By splitting this critical edge more threadings might be possible.
187  */
188 static void split_critical_edge(ir_node *block, int pos)
189 {
190         ir_graph *irg = get_irn_irg(block);
191         ir_node *in[1];
192         ir_node *new_block;
193         ir_node *new_jmp;
194
195         in[0] = get_Block_cfgpred(block, pos);
196         new_block = new_r_Block(irg, 1, in);
197         new_jmp = new_r_Jmp(new_block);
198         set_Block_cfgpred(block, pos, new_jmp);
199 }
200
201 typedef struct jumpthreading_env_t {
202         ir_node       *true_block;
203         ir_node       *cmp;        /**< The Compare node that might be partial evaluated */
204         ir_relation    relation;   /**< The Compare mode of the Compare node. */
205         ir_node       *cnst;
206         ir_tarval     *tv;
207         ir_visited_t   visited_nr;
208
209         ir_node       *cnst_pred;   /**< the block before the constant */
210         int            cnst_pos;    /**< the pos to the constant block (needed to
211                                           kill that edge later) */
212 } jumpthreading_env_t;
213
214 static ir_node *copy_and_fix_node(const jumpthreading_env_t *env,
215                                   ir_node *block, ir_node *copy_block, int j,
216                                   ir_node *node)
217 {
218         int      i, arity;
219         ir_node *copy;
220
221         /* we can evaluate Phis right now, all other nodes get copied */
222         if (is_Phi(node)) {
223                 copy = get_Phi_pred(node, j);
224                 /* we might have to evaluate a Phi-cascade */
225                 if (get_irn_visited(copy) >= env->visited_nr) {
226                         copy = (ir_node*)get_irn_link(copy);
227                 }
228         } else {
229                 copy = exact_copy(node);
230                 set_nodes_block(copy, copy_block);
231
232                 assert(get_irn_mode(copy) != mode_X);
233
234                 arity = get_irn_arity(copy);
235                 for (i = 0; i < arity; ++i) {
236                         ir_node *pred     = get_irn_n(copy, i);
237                         ir_node *new_pred;
238
239                         if (get_nodes_block(pred) != block)
240                                 continue;
241
242                         if (get_irn_visited(pred) >= env->visited_nr) {
243                                 new_pred = (ir_node*)get_irn_link(pred);
244                         } else {
245                                 new_pred = copy_and_fix_node(env, block, copy_block, j, pred);
246                         }
247                         DB((dbg, LEVEL_2, ">> Set Pred of %+F to %+F\n", copy, new_pred));
248                         set_irn_n(copy, i, new_pred);
249                 }
250         }
251
252         set_irn_link(node, copy);
253         set_irn_visited(node, env->visited_nr);
254
255         return copy;
256 }
257
258 static void copy_and_fix(const jumpthreading_env_t *env, ir_node *block,
259                          ir_node *copy_block, int j)
260 {
261         /* Look at all nodes in the cond_block and copy them into pred */
262         foreach_out_edge(block, edge) {
263                 ir_node *node = get_edge_src_irn(edge);
264                 ir_node *copy;
265                 ir_mode *mode;
266
267                 if (is_End(node)) {
268                         /* edge is a Keep edge. If the end block is unreachable via normal
269                          * control flow, we must maintain end's reachability with Keeps.
270                          */
271                         keep_alive(copy_block);
272                         continue;
273                 }
274                 /* ignore control flow */
275                 mode = get_irn_mode(node);
276                 if (mode == mode_X || is_Cond(node) || is_Switch(node))
277                         continue;
278 #ifdef AVOID_PHIB
279                 /* we may not copy mode_b nodes, because this could produce Phi with
280                  * mode_bs which can't be handled in all backends. Instead we duplicate
281                  * the node and move it to its users */
282                 if (mode == mode_b) {
283                         ir_node *const pred = get_Proj_pred(node);
284                         long     const pn   = get_Proj_proj(node);
285
286                         foreach_out_edge_safe(node, edge) {
287                                 ir_node *cmp_copy;
288                                 ir_node *user       = get_edge_src_irn(edge);
289                                 int pos             = get_edge_src_pos(edge);
290                                 ir_node *user_block = get_nodes_block(user);
291
292                                 if (user_block == block)
293                                         continue;
294
295                                 cmp_copy = exact_copy(pred);
296                                 set_nodes_block(cmp_copy, user_block);
297                                 copy = new_r_Proj(cmp_copy, mode_b, pn);
298                                 set_irn_n(user, pos, copy);
299                         }
300                         continue;
301                 }
302 #endif
303
304                 copy = copy_and_fix_node(env, block, copy_block, j, node);
305
306                 /* we might hit values in blocks that have already been processed by a
307                  * recursive find_phi_with_const() call */
308                 assert(get_irn_visited(copy) <= env->visited_nr);
309                 if (get_irn_visited(copy) >= env->visited_nr) {
310                         ir_node *prev_copy = (ir_node*)get_irn_link(copy);
311                         if (prev_copy != NULL)
312                                 set_irn_link(node, prev_copy);
313                 }
314         }
315
316         /* fix data-flow (and reconstruct SSA if needed) */
317         foreach_out_edge(block, edge) {
318                 ir_node *node = get_edge_src_irn(edge);
319                 ir_node *copy_node;
320                 ir_mode *mode;
321
322                 mode = get_irn_mode(node);
323                 if (mode == mode_X || is_Cond(node) || is_Switch(node))
324                         continue;
325 #ifdef AVOID_PHIB
326                 if (mode == mode_b)
327                         continue;
328 #endif
329
330                 DB((dbg, LEVEL_2, ">> Fixing users of %+F\n", node));
331
332                 copy_node = (ir_node*)get_irn_link(node);
333                 construct_ssa(block, node, copy_block, copy_node);
334         }
335
336         /* make sure new nodes are kept alive if old nodes were */
337         ir_graph *irg = get_irn_irg(block);
338         ir_node  *end = get_irg_end(irg);
339         for (int i = 0, arity = get_End_n_keepalives(end); i < arity; ++i) {
340                 ir_node *keep = get_End_keepalive(end, i);
341                 if (get_irn_visited(keep) < env->visited_nr || is_Block(keep))
342                         continue;
343                 ir_node *copy = get_irn_link(keep);
344                 add_End_keepalive(end, copy);
345         }
346 }
347
348 /**
349  * returns whether the cmp evaluates to true or false, or can't be evaluated!
350  * 1: true, 0: false, -1: can't evaluate
351  *
352  * @param relation  the compare mode of the Compare
353  * @param tv_left   the left tarval
354  * @param tv_right  the right tarval
355  */
356 static int eval_cmp_tv(ir_relation relation, ir_tarval *tv_left,
357                        ir_tarval *tv_right)
358 {
359         ir_relation cmp_result = tarval_cmp(tv_left, tv_right);
360
361         /* does the compare evaluate to true? */
362         if (cmp_result == ir_relation_false)
363                 return -1;
364         if ((cmp_result & relation) != 0)
365                 return 1;
366
367         return 0;
368 }
369
370 /**
371  * returns whether the cmp evaluates to true or false, or can't be evaluated!
372  * 1: true, 0: false, -1: can't evaluate
373  *
374  * @param env      the environment
375  * @param cand     the candidate node, either a Const or a Confirm
376  */
377 static int eval_cmp(jumpthreading_env_t *env, ir_node *cand)
378 {
379         if (is_Const(cand)) {
380                 ir_tarval *tv_cand = get_Const_tarval(cand);
381                 ir_tarval *tv_cmp  = get_Const_tarval(env->cnst);
382
383                 return eval_cmp_tv(env->relation, tv_cand, tv_cmp);
384         } else { /* a Confirm */
385                 ir_tarval *res = computed_value_Cmp_Confirm(env->cmp, cand, env->cnst, env->relation);
386
387                 if (res == tarval_bad)
388                         return -1;
389                 return res == tarval_b_true;
390         }
391 }
392
393 /**
394  * Check for Const or Confirm with Const.
395  */
396 static int is_Const_or_Confirm(const ir_node *node)
397 {
398         if (is_Confirm(node))
399                 node = get_Confirm_bound(node);
400         return is_Const(node);
401 }
402
403 /**
404  * get the tarval of a Const or Confirm with
405  */
406 static ir_tarval *get_Const_or_Confirm_tarval(const ir_node *node)
407 {
408         if (is_Confirm(node)) {
409                 if (get_Confirm_bound(node))
410                         node = get_Confirm_bound(node);
411         }
412         return get_Const_tarval(node);
413 }
414
415 static ir_node *find_const_or_confirm(jumpthreading_env_t *env, ir_node *jump,
416                                       ir_node *value)
417 {
418         ir_node *block = get_nodes_block(jump);
419
420         if (irn_visited_else_mark(value))
421                 return NULL;
422
423         if (is_Const_or_Confirm(value)) {
424                 if (eval_cmp(env, value) <= 0)
425                         return NULL;
426
427                 DB((
428                         dbg, LEVEL_1,
429                         "> Found jump threading candidate %+F->%+F\n",
430                         block, env->true_block
431                 ));
432
433                 /* adjust true_block to point directly towards our jump */
434                 add_pred(env->true_block, jump);
435
436                 split_critical_edge(env->true_block, 0);
437
438                 /* we need a bigger visited nr when going back */
439                 env->visited_nr++;
440
441                 return block;
442         }
443
444         if (is_Phi(value)) {
445                 int i, arity;
446
447                 /* the Phi has to be in the same Block as the Jmp */
448                 if (get_nodes_block(value) != block)
449                         return NULL;
450
451                 arity = get_irn_arity(value);
452                 for (i = 0; i < arity; ++i) {
453                         ir_node *copy_block;
454                         ir_node *phi_pred = get_Phi_pred(value, i);
455                         ir_node *cfgpred  = get_Block_cfgpred(block, i);
456
457                         copy_block = find_const_or_confirm(env, cfgpred, phi_pred);
458                         if (copy_block == NULL)
459                                 continue;
460
461                         /* copy duplicated nodes in copy_block and fix SSA */
462                         copy_and_fix(env, block, copy_block, i);
463
464                         if (copy_block == get_nodes_block(cfgpred)) {
465                                 env->cnst_pred = block;
466                                 env->cnst_pos  = i;
467                         }
468
469                         /* return now as we can't process more possibilities in 1 run */
470                         return copy_block;
471                 }
472         }
473
474         return NULL;
475 }
476
477 static ir_node *find_candidate(jumpthreading_env_t *env, ir_node *jump,
478                                ir_node *value)
479 {
480         ir_node *block = get_nodes_block(jump);
481
482         if (irn_visited_else_mark(value)) {
483                 return NULL;
484         }
485
486         if (is_Const_or_Confirm(value)) {
487                 ir_tarval *tv = get_Const_or_Confirm_tarval(value);
488
489                 if (tv != env->tv)
490                         return NULL;
491
492                 DB((
493                         dbg, LEVEL_1,
494                         "> Found jump threading candidate %+F->%+F\n",
495                         block, env->true_block
496                 ));
497
498                 /* adjust true_block to point directly towards our jump */
499                 add_pred(env->true_block, jump);
500
501                 split_critical_edge(env->true_block, 0);
502
503                 /* we need a bigger visited nr when going back */
504                 env->visited_nr++;
505
506                 return block;
507         }
508         if (is_Phi(value)) {
509                 int i, arity;
510
511                 /* the Phi has to be in the same Block as the Jmp */
512                 if (get_nodes_block(value) != block)
513                         return NULL;
514
515                 arity = get_irn_arity(value);
516                 for (i = 0; i < arity; ++i) {
517                         ir_node *copy_block;
518                         ir_node *phi_pred = get_Phi_pred(value, i);
519                         ir_node *cfgpred  = get_Block_cfgpred(block, i);
520
521                         copy_block = find_candidate(env, cfgpred, phi_pred);
522                         if (copy_block == NULL)
523                                 continue;
524
525                         /* copy duplicated nodes in copy_block and fix SSA */
526                         copy_and_fix(env, block, copy_block, i);
527
528                         if (copy_block == get_nodes_block(cfgpred)) {
529                                 env->cnst_pred = block;
530                                 env->cnst_pos  = i;
531                         }
532
533                         /* return now as we can't process more possibilities in 1 run */
534                         return copy_block;
535                 }
536         }
537         if (is_Cmp(value)) {
538                 ir_node    *cmp      = value;
539                 ir_node    *left     = get_Cmp_left(cmp);
540                 ir_node    *right    = get_Cmp_right(cmp);
541                 ir_relation relation = get_Cmp_relation(cmp);
542
543                 /* we assume that the constant is on the right side, swap left/right
544                  * if needed */
545                 if (is_Const(left)) {
546                         ir_node *t = left;
547                         left       = right;
548                         right      = t;
549
550                         relation   = get_inversed_relation(relation);
551                 }
552
553                 if (!is_Const(right))
554                         return NULL;
555
556                 if (get_nodes_block(left) != block)
557                         return NULL;
558
559                 /* negate condition when we're looking for the false block */
560                 if (env->tv == tarval_b_false) {
561                         relation = get_negated_relation(relation);
562                 }
563
564                 /* (recursively) look if a pred of a Phi is a constant or a Confirm */
565                 env->cmp      = cmp;
566                 env->relation = relation;
567                 env->cnst     = right;
568
569                 return find_const_or_confirm(env, jump, left);
570         }
571
572         return NULL;
573 }
574
575 /**
576  * Block-walker: searches for the following construct
577  *
578  *  Const or Phi with constants
579  *           |
580  *          Cmp
581  *           |
582  *         Cond
583  *          /
584  *       ProjX
585  *        /
586  *     Block
587  */
588 static void thread_jumps(ir_node* block, void* data)
589 {
590         jumpthreading_env_t env;
591         bool *changed = (bool*)data;
592         ir_node *selector;
593         ir_node *projx;
594         ir_node *cond;
595         ir_node *copy_block;
596         int      selector_evaluated;
597         ir_graph *irg;
598         ir_node *badX;
599         int      cnst_pos;
600
601         /* we do not deal with Phis, so restrict this to exactly one cfgpred */
602         if (get_Block_n_cfgpreds(block) != 1)
603                 return;
604
605         projx = get_Block_cfgpred(block, 0);
606         if (!is_Proj(projx))
607                 return;
608         assert(get_irn_mode(projx) == mode_X);
609
610         cond = get_Proj_pred(projx);
611         /* TODO handle switch Conds */
612         if (!is_Cond(cond))
613                 return;
614
615         /* handle cases that can be immediately evaluated */
616         selector = get_Cond_selector(cond);
617         selector_evaluated = -1;
618         if (is_Cmp(selector)) {
619                 ir_node *left  = get_Cmp_left(selector);
620                 ir_node *right = get_Cmp_right(selector);
621                 if (is_Const(left) && is_Const(right)) {
622                         ir_relation relation = get_Cmp_relation(selector);
623                         ir_tarval  *tv_left  = get_Const_tarval(left);
624                         ir_tarval  *tv_right = get_Const_tarval(right);
625
626                         selector_evaluated = eval_cmp_tv(relation, tv_left, tv_right);
627                 }
628         } else if (is_Const_or_Confirm(selector)) {
629                 ir_tarval *tv = get_Const_or_Confirm_tarval(selector);
630                 if (tv == tarval_b_true) {
631                         selector_evaluated = 1;
632                 } else {
633                         assert(tv == tarval_b_false);
634                         selector_evaluated = 0;
635                 }
636         }
637
638         env.cnst_pred = NULL;
639         if (get_Proj_proj(projx) == pn_Cond_false) {
640                 env.tv = tarval_b_false;
641                 if (selector_evaluated >= 0)
642                         selector_evaluated = !selector_evaluated;
643         } else {
644                 env.tv = tarval_b_true;
645         }
646
647         if (selector_evaluated == 0) {
648                 ir_graph *irg = get_irn_irg(block);
649                 ir_node  *bad = new_r_Bad(irg, mode_X);
650                 exchange(projx, bad);
651                 *changed = true;
652                 return;
653         } else if (selector_evaluated == 1) {
654                 dbg_info *dbgi = get_irn_dbg_info(selector);
655                 ir_node  *jmp  = new_rd_Jmp(dbgi, get_nodes_block(projx));
656                 DBG_OPT_JUMPTHREADING(projx, jmp);
657                 exchange(projx, jmp);
658                 *changed = true;
659                 return;
660         }
661
662         /* (recursively) look if a pred of a Phi is a constant or a Confirm */
663         env.true_block = block;
664         irg = get_irn_irg(block);
665         inc_irg_visited(irg);
666         env.visited_nr = get_irg_visited(irg);
667
668         copy_block = find_candidate(&env, projx, selector);
669         if (copy_block == NULL)
670                 return;
671
672         /* We might thread the condition block of an infinite loop,
673          * such that there is no path to End anymore. */
674         keep_alive(block);
675
676         /* we have to remove the edge towards the pred as the pred now
677          * jumps into the true_block. We also have to shorten Phis
678          * in our block because of this */
679         badX     = new_r_Bad(irg, mode_X);
680         cnst_pos = env.cnst_pos;
681
682         /* shorten Phis */
683         foreach_out_edge_safe(env.cnst_pred, edge) {
684                 ir_node *node = get_edge_src_irn(edge);
685
686                 if (is_Phi(node)) {
687                         ir_node *bad = new_r_Bad(irg, get_irn_mode(node));
688                         set_Phi_pred(node, cnst_pos, bad);
689                 }
690         }
691
692         set_Block_cfgpred(env.cnst_pred, cnst_pos, badX);
693
694         /* the graph is changed now */
695         *changed = true;
696 }
697
698 void opt_jumpthreading(ir_graph* irg)
699 {
700         bool changed;
701         bool rerun;
702
703         assure_irg_properties(irg,
704                 IR_GRAPH_PROPERTY_NO_UNREACHABLE_CODE
705                 | IR_GRAPH_PROPERTY_CONSISTENT_OUT_EDGES
706                 | IR_GRAPH_PROPERTY_NO_CRITICAL_EDGES);
707
708         FIRM_DBG_REGISTER(dbg, "firm.opt.jumpthreading");
709
710         DB((dbg, LEVEL_1, "===> Performing jumpthreading on %+F\n", irg));
711
712         ir_reserve_resources(irg, IR_RESOURCE_IRN_LINK | IR_RESOURCE_IRN_VISITED);
713
714         changed = false;
715         do {
716                 rerun = false;
717                 irg_block_walk_graph(irg, thread_jumps, NULL, &rerun);
718                 changed |= rerun;
719         } while (rerun);
720
721         ir_free_resources(irg, IR_RESOURCE_IRN_LINK | IR_RESOURCE_IRN_VISITED);
722
723         confirm_irg_properties(irg,
724                 changed ? IR_GRAPH_PROPERTIES_NONE : IR_GRAPH_PROPERTIES_ALL);
725 }
726
727 /* Creates an ir_graph pass for opt_jumpthreading. */
728 ir_graph_pass_t *opt_jumpthreading_pass(const char *name)
729 {
730         return def_graph_pass(name ? name : "jumpthreading", opt_jumpthreading);
731 }