Mercurial > hg > CbC > CbC_gcc
comparison gcc/tree-ssa-threadedge.c @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | b7f97abdc517 |
children | 04ced10e8804 |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
1 /* SSA Jump Threading | 1 /* SSA Jump Threading |
2 Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 2 Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 |
3 Free Software Foundation, Inc. | |
3 Contributed by Jeff Law <law@redhat.com> | 4 Contributed by Jeff Law <law@redhat.com> |
4 | 5 |
5 This file is part of GCC. | 6 This file is part of GCC. |
6 | 7 |
7 GCC is free software; you can redistribute it and/or modify | 8 GCC is free software; you can redistribute it and/or modify |
26 #include "flags.h" | 27 #include "flags.h" |
27 #include "tm_p.h" | 28 #include "tm_p.h" |
28 #include "basic-block.h" | 29 #include "basic-block.h" |
29 #include "cfgloop.h" | 30 #include "cfgloop.h" |
30 #include "output.h" | 31 #include "output.h" |
31 #include "expr.h" | |
32 #include "function.h" | 32 #include "function.h" |
33 #include "diagnostic.h" | |
34 #include "timevar.h" | 33 #include "timevar.h" |
35 #include "tree-dump.h" | 34 #include "tree-dump.h" |
36 #include "tree-flow.h" | 35 #include "tree-flow.h" |
37 #include "tree-pass.h" | 36 #include "tree-pass.h" |
38 #include "tree-ssa-propagate.h" | 37 #include "tree-ssa-propagate.h" |
242 rhs = COND_EXPR_ELSE (rhs); | 241 rhs = COND_EXPR_ELSE (rhs); |
243 } | 242 } |
244 | 243 |
245 return fold (rhs); | 244 return fold (rhs); |
246 } | 245 } |
247 break; | 246 |
248 case GIMPLE_UNARY_RHS: | 247 case GIMPLE_UNARY_RHS: |
249 { | 248 { |
250 tree lhs = gimple_assign_lhs (stmt); | 249 tree lhs = gimple_assign_lhs (stmt); |
251 tree op0 = gimple_assign_rhs1 (stmt); | 250 tree op0 = gimple_assign_rhs1 (stmt); |
252 return fold_unary (subcode, TREE_TYPE (lhs), op0); | 251 return fold_unary (subcode, TREE_TYPE (lhs), op0); |
253 } | 252 } |
254 break; | 253 |
255 case GIMPLE_BINARY_RHS: | 254 case GIMPLE_BINARY_RHS: |
256 { | 255 { |
257 tree lhs = gimple_assign_lhs (stmt); | 256 tree lhs = gimple_assign_lhs (stmt); |
258 tree op0 = gimple_assign_rhs1 (stmt); | 257 tree op0 = gimple_assign_rhs1 (stmt); |
259 tree op1 = gimple_assign_rhs2 (stmt); | 258 tree op1 = gimple_assign_rhs2 (stmt); |
260 return fold_binary (subcode, TREE_TYPE (lhs), op0, op1); | 259 return fold_binary (subcode, TREE_TYPE (lhs), op0, op1); |
261 } | 260 } |
262 break; | 261 |
262 case GIMPLE_TERNARY_RHS: | |
263 { | |
264 tree lhs = gimple_assign_lhs (stmt); | |
265 tree op0 = gimple_assign_rhs1 (stmt); | |
266 tree op1 = gimple_assign_rhs2 (stmt); | |
267 tree op2 = gimple_assign_rhs3 (stmt); | |
268 return fold_ternary (subcode, TREE_TYPE (lhs), op0, op1, op2); | |
269 } | |
270 | |
263 default: | 271 default: |
264 gcc_unreachable (); | 272 gcc_unreachable (); |
265 } | 273 } |
266 } | 274 } |
267 | 275 |