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] cse (canon_reg): Don't modify insns without using validate_change


In your previous mail you mentioned the need to call apply_change_group after canon_reg; I see places in cse.c where that isn't done. Why don't
we need to change them?
The cases I was concerned about where cases where either INSN is NULL_RTX or apply_change_group is called later on. According to the comment above canon_reg the function must not call validate_change if INSN isn't set.
That's why I've left the check for INSN != 0 in validate_canon_reg. It
should be ok with this.

I'm not entirely sure what to make of the code that's processing CALL_INSN_FUNCTION_USAGE, but that function ends up in an unconditional call to apply_change_group so I guess it's ok. The other callers of canon_reg look safe as well.


2006-05-30 Andreas Krebbel <krebbel1@de.ibm.com>

	* cse.c (validate_canon_reg, cse_insn): Don't change insns without
	calling recog.

Ok.



Bernd



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