comparison gcc/postreload-gcse.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 /* Post reload partially redundant load elimination 1 /* Post reload partially redundant load elimination
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 under 6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free 7 the terms of the GNU General Public License as published by the Free
789 hard_reg_set_iterator hrsi; 789 hard_reg_set_iterator hrsi;
790 EXECUTE_IF_SET_IN_HARD_REG_SET (regs_invalidated_by_call, 0, regno, hrsi) 790 EXECUTE_IF_SET_IN_HARD_REG_SET (regs_invalidated_by_call, 0, regno, hrsi)
791 record_last_reg_set_info_regno (insn, regno); 791 record_last_reg_set_info_regno (insn, regno);
792 792
793 for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1)) 793 for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1))
794 if (GET_CODE (XEXP (link, 0)) == CLOBBER) 794 {
795 { 795 gcc_assert (GET_CODE (XEXP (link, 0)) != CLOBBER_HIGH);
796 x = XEXP (XEXP (link, 0), 0); 796 if (GET_CODE (XEXP (link, 0)) == CLOBBER)
797 if (REG_P (x)) 797 {
798 { 798 x = XEXP (XEXP (link, 0), 0);
799 gcc_assert (HARD_REGISTER_P (x)); 799 if (REG_P (x))
800 record_last_reg_set_info (insn, x); 800 {
801 } 801 gcc_assert (HARD_REGISTER_P (x));
802 } 802 record_last_reg_set_info (insn, x);
803 }
804 }
805 }
803 806
804 if (! RTL_CONST_OR_PURE_CALL_P (insn)) 807 if (! RTL_CONST_OR_PURE_CALL_P (insn))
805 record_last_mem_set_info (insn); 808 record_last_mem_set_info (insn);
806 } 809 }
807 } 810 }
1156 npred_ok == 0 1159 npred_ok == 0
1157 /* Prevent exploding the code. */ 1160 /* Prevent exploding the code. */
1158 || (optimize_bb_for_size_p (bb) && npred_ok > 1) 1161 || (optimize_bb_for_size_p (bb) && npred_ok > 1)
1159 /* If we don't have profile information we cannot tell if splitting 1162 /* If we don't have profile information we cannot tell if splitting
1160 a critical edge is profitable or not so don't do it. */ 1163 a critical edge is profitable or not so don't do it. */
1161 || ((! profile_info || profile_status_for_fn (cfun) != PROFILE_READ 1164 || ((!profile_info || profile_status_for_fn (cfun) != PROFILE_READ
1162 || targetm.cannot_modify_jumps_p ()) 1165 || targetm.cannot_modify_jumps_p ())
1163 && critical_edge_split)) 1166 && critical_edge_split))
1164 goto cleanup; 1167 goto cleanup;
1165 1168
1166 /* Check if it's worth applying the partial redundancy elimination. */ 1169 /* Check if it's worth applying the partial redundancy elimination. */