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] reload1.c: Detect and utilize implicit sets in move2add.(take 2)


Kazu Hirata wrote:
Attached is a patch to detect implicit sets in move2add and treat such
sets identically to explicit sets.  This patch is a revised version of

The concept looks OK, however I don't think it is quite right.


Branches can be either
(if_then_else (ne cond) (pc) (label))
or
(if_then_else (ne cond) (label) (pc))
These mean different things. The first means we fall through if the condition is NE. The second means we branch to the label if the condition is NE. You need to check for this distinction in your code. There is also the issue that
(if_then_else (eq cond) (pc) (label))
means the same as
(if_then_else (ne cond) (label) (pc))
So you want to accept EQ if pc is operand 1, and NE if pc is operand 2.


Before the move2add_note_store call, you are duplicating some of the tests found in move2add_note_store, specifically, the SCALAR_INT_MODE_P and HARD_REGNO_NREGS checks. It isn't clear why you are doing this.

Jim


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