Question about simplify_rtx ()

2005-09-06 Thread Leehod Baruch
Hello, In the discussion: "Question about merging two instructions" http://gcc.gnu.org/ml/gcc/2005-08/msg00563.html You showed me that it might be dangerous to replace rtx on the LHS of a SET using simplify_replace_rtx (). simplify_rtx () seems safer, is there a good reason why it doesn't work wi

Question about pre_edge_insert () in gcse.c

2005-08-28 Thread Leehod Baruch
Hello, While reading the function pre_edge_insert () in gcse.c, something didn't make sense to me: According to the documentation: /* Where PRE_INSERT_MAP is nonzero, we add the expression on that edge if it reaches any of the deleted expressions. */ I understand that before inserting an expr

Re: Searching for a branch for the see optimization.

2005-08-24 Thread Leehod Baruch
> > Why not just maintain it in a local tree and post refined > > versions every now and then, until stage 1 for GCC 4.2 opens? > > Branches are for major work and a new pass is not that major. > > It's also fine to create a new branch for this work. That let's other > people see what you're wor

Question about an rtx expression.

2005-08-23 Thread Leehod Baruch
Hello, Is it true that in a SET, a search for a _use_ of a register in the LHS should be done only inside a memory address? Like in this SET: (set (mem:SI (plus:DI (reg:DI 159) (reg/v/f:DI 150 ))) (subreg/s:SI (reg/v:DI 142 [ j ]) 4)) -1 (nil) Registers 142, 159 and 150 are

Re: Question about merging two instructions.

2005-08-22 Thread Leehod Baruch
Paolo Bonzini <[EMAIL PROTECTED]> wrote on 22/08/2005 10:10:40: > > > I tried to use simplify_replace_rtx to replace any use of (reg r) with[in] > > > the right-hand-side of the extension and simplify the result. > > If he want to replace uses within the RHS of the extension, he should > pass SE

Re: Question about merging two instructions.

2005-08-22 Thread Leehod Baruch
> > 1. Can you please give me an example of something bad that can happen to > > the LHS. Maybe I'm missing something here. > > In this case nothing, but if NEW were a subreg, it can change a lot. Why? Do I always need to recognize the result? If the answer is yes, than I suppose that if som

Searching for a branch for the see optimization.

2005-08-22 Thread Leehod Baruch
Hello, I would like to know if someone knows a suitable branch for the sign extension optimization pass. This pass stands for itself. There are not many changes to the other parts of the gcc. For details see: http://gcc.gnu.org/ml/gcc-patches/2005-08/msg01087.html Thanks, Leehod.

Re: Question about merging two instructions.

2005-08-21 Thread Leehod Baruch
>>(insn 1 0 2 0 (set (reg/v:Xmode r) >>(sign_extend:Xmode (op:Ymode (... >>(insn 2 1 3 0 (set (lhs) (rhs))) > To summarise, the change above is not unreasonable and I'd be > happy to allow this change to simplify-rtx.c, but I'd be more > cautious about where and why it was used. For e

Question about merging two instructions.

2005-08-21 Thread Leehod Baruch
Hello, I'm working on a the sign extension elimination pass. (see http://gcc.gnu.org/ml/gcc-patches/2005-08/msg01087.html for details) I would like to merge these two instructions: (insn 1 0 2 0 (set (reg/v:Xmode r) (sign_extend:Xmode (op:Ymode (... (insn 2 1 3 0 (set (lhs) (rhs))) w