Advertisement
Guest User

Untitled

a guest
Jun 19th, 2014
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.16 KB | None | 0 0
  1.  
  2. static bool
  3. gimple_match_and_simplify (code_helper code, tree type, tree op0, tree op1,
  4.                tree op2, code_helper * res_code, tree * res_ops,
  5.                gimple_seq * seq, tree (*valueize) (tree))
  6. {
  7.   if (code == MINUS_EXPR)
  8.     {
  9.       {
  10.     tree o2 = op0;
  11.     tree t0 = NULL_TREE;
  12.     tree t1 = NULL_TREE;
  13.     if (TREE_CODE (o2) == SSA_NAME)
  14.       {
  15.         gimple def_stmt = SSA_NAME_DEF_STMT (o2);
  16.         if (is_gimple_assign (def_stmt) &&
  17.         (gimple_assign_rhs_code (def_stmt) == PLUS_EXPR
  18.          || CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (def_stmt))))
  19.           {
  20.         t0 = gimple_assign_rhs1 (def_stmt);
  21.         if (do_valueize (valueize, t0))
  22.           {
  23.             t1 = gimple_assign_rhs2 (def_stmt);
  24.             if (do_valueize (valueize, t1))
  25.               {
  26.             {
  27.               tree o3 = t0;
  28.               {
  29.                 tree o4 = t1;
  30.                 {
  31.                   tree o5 = op1;
  32.                   if (o5 == o4)
  33.                 {
  34.                   /* simplify 0 */
  35.                   {
  36.                     tree captures[4] = { };
  37.                     captures[0] = o3;
  38.                     captures[1] = o4;
  39.                     res_ops[0] = captures[0];
  40.                     *res_code = TREE_CODE (res_ops[0]);
  41.                     return true;
  42.                   }
  43.                 }
  44.                 }
  45.               }
  46.             }
  47.               }
  48.           }
  49.           }
  50.       }
  51.       }
  52.     }
  53.   return false;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement