Advertisement
Guest User

Untitled

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