Development

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Fix PR27302

    1 answers - 1067 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Tue, 9 May 2006, Richard Guenther wrote:
    2006-05-09 Richard Guenther <rguenther (AT) suse (DOT) de>
    PR tree-optimization/27302
    * fold-const.c (operand_equal_p): For two comparisons,
    try comparison of one comparison code swapped if that yields
    the same code.
    If it's K with you, I think I'd prefer explicit operand_equal_p
    calls on the operands, rather than build a new tree node just for
    this test. Something like:
    - return operand_equal_p (arg0,
    - build2 (swap_code, TREE_TYPE (arg1),
    - TREEPERAND (arg1, 1),
    - TREEPERAND (arg1, 0)), flags);
    +return operand_equal_p (TREEPERAND (arg0, 0),
    +TREEPERAND (arg1, 1), flags)
    + && operand_equal_p (TREEPERAND (arg0, 1),
    + TREEPERAND (arg1, 1), flags);
    This matches the idiom for commutative_tree_codes in the tcc_comparison
    case below, and saves leaking memory to be garbage collector on each
    invocation. I'm sorry for missing this earlier, my bad.
    K for mainline with this change. Thanks again.
    Roger
    --
  • No.1 | | 1169 bytes | |

    Tue, 9 May 2006, Roger Sayle wrote:

    Tue, 9 May 2006, Richard Guenther wrote:
    2006-05-09 Richard Guenther <rguenther (AT) suse (DOT) de>

    PR tree-optimization/27302
    * fold-const.c (operand_equal_p): For two comparisons,
    try comparison of one comparison code swapped if that yields
    the same code.

    If it's K with you, I think I'd prefer explicit operand_equal_p
    calls on the operands, rather than build a new tree node just for
    this test. Something like:
    - return operand_equal_p (arg0,
    - build2 (swap_code, TREE_TYPE (arg1),
    - TREEPERAND (arg1, 1),
    - TREEPERAND (arg1, 0)), flags);
    +return operand_equal_p (TREEPERAND (arg0, 0),
    +TREEPERAND (arg1, 1), flags)
    + && operand_equal_p (TREEPERAND (arg0, 1),
    + TREEPERAND (arg1, 1), flags);

    This matches the idiom for commutative_tree_codes in the tcc_comparison
    case below, and saves leaking memory to be garbage collector on each
    invocation. I'm sorry for missing this earlier, my bad.

    K for mainline with this change. Thanks again.

    Applied to mainline after re-testing with that change.

    Thanks,
    Richard.

Re: Fix PR27302


max 4000 letters.
Your nickname that display:
In order to stop the spam: 2 + 1 =
QUESTION ON "Development"

EMSDN.COM