This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, ARM] Don't copy uncopyable instructions in gcse.c


>     * gcse.c (target.h): Include.
>     (hash_scan_set): Don't make copies of instructions the target deems
>     uncopyable.
>     * config/arm/arm.c (arm_cannot_copy_insn_p): Check we have an
>     instruction.

Don't change the interface of the hook, i.e. verify that it's not NULL and the 
insn is INSN_P before calling it.  See cfg_layout_can_duplicate_bb_p.

Why do you need the second hunk in hash_scan_set?  Does the source verify 
gcse_constant_p?

I think that this should be prevented by want_to_gcse_p, maybe by verifying in 
can_assign_to_reg_without_clobbers_p that test_insn is not cannot_copy_insn_p 
or devising a similar helper.  Steven, what do you think?

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]