comparison gcc/loop-invariant.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* RTL-level loop invariant motion. 1 /* RTL-level loop invariant motion.
2 Copyright (C) 2004-2017 Free Software Foundation, Inc. 2 Copyright (C) 2004-2018 Free Software Foundation, Inc.
3 3
4 This file is part of GCC. 4 This file is part of GCC.
5 5
6 GCC is free software; you can redistribute it and/or modify it 6 GCC is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the 7 under the terms of the GNU General Public License as published by the
333 for (j = 0; j < XVECLEN (x, i); j++) 333 for (j = 0; j < XVECLEN (x, i); j++)
334 val ^= hash_invariant_expr_1 (insn, XVECEXP (x, i, j)); 334 val ^= hash_invariant_expr_1 (insn, XVECEXP (x, i, j));
335 } 335 }
336 else if (fmt[i] == 'i' || fmt[i] == 'n') 336 else if (fmt[i] == 'i' || fmt[i] == 'n')
337 val ^= XINT (x, i); 337 val ^= XINT (x, i);
338 else if (fmt[i] == 'p')
339 val ^= constant_lower_bound (SUBREG_BYTE (x));
338 } 340 }
339 341
340 return val; 342 return val;
341 } 343 }
342 344
416 } 418 }
417 } 419 }
418 else if (fmt[i] == 'i' || fmt[i] == 'n') 420 else if (fmt[i] == 'i' || fmt[i] == 'n')
419 { 421 {
420 if (XINT (e1, i) != XINT (e2, i)) 422 if (XINT (e1, i) != XINT (e2, i))
423 return false;
424 }
425 else if (fmt[i] == 'p')
426 {
427 if (maybe_ne (SUBREG_BYTE (e1), SUBREG_BYTE (e2)))
421 return false; 428 return false;
422 } 429 }
423 /* Unhandled type of subexpression, we fail conservatively. */ 430 /* Unhandled type of subexpression, we fail conservatively. */
424 else 431 else
425 return false; 432 return false;
651 may_assign_reg_p (rtx x) 658 may_assign_reg_p (rtx x)
652 { 659 {
653 return (GET_MODE (x) != VOIDmode 660 return (GET_MODE (x) != VOIDmode
654 && GET_MODE (x) != BLKmode 661 && GET_MODE (x) != BLKmode
655 && can_copy_p (GET_MODE (x)) 662 && can_copy_p (GET_MODE (x))
663 /* Do not mess with the frame pointer adjustments that can
664 be generated e.g. by expand_builtin_setjmp_receiver. */
665 && x != frame_pointer_rtx
656 && (!REG_P (x) 666 && (!REG_P (x)
657 || !HARD_REGISTER_P (x) 667 || !HARD_REGISTER_P (x)
658 || REGNO_REG_CLASS (REGNO (x)) != NO_REGS)); 668 || REGNO_REG_CLASS (REGNO (x)) != NO_REGS));
659 } 669 }
660 670