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] |
On Sat, 2006-07-15 at 16:02 +0100, Paul Brook wrote:combine wants r1 and r3 separate so that it can generate
If you look at PRE+strength reduction that's exactly what it willThis can also useful on machines with limited immediate ranges (eg. most RISC machines). Typically it occurs with large structures, ie. when "+ 12" requires multiple instructions.When I look at this patch, it seems to me that it turns pseudo-assembly code like this:
r1 = r0 + 8 r2 = (r1) r3 = r0 + 12 r4 = (r3) ... However, it seems to me that we can view this as two separate optimizations. The first one is to change the first code above into this:
r1 = r0 + 8 r2 = (r1) r1 = r1 + 4 r4 = (r1)
On machines without register offset addressing and with relatively few
registers, this is a useful optimization because it decreases register
pressure.
We've seen evidence that this transformation would help Thumb code on CSiBE.
do. It considers r0 + 8 and r0 + 12 as equivalent and thus
removes the r0 + 12 expression evaluation as it's redundant.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |