Re: Problem with ADDR_EXPR array offset

2010-03-24 Thread Ian Lance Taylor
Massimo Nazaria writes: > I'm working on a pass and I need to handle some pointer expressions. > For example, I have this C-code: > int v[1000]; > int *p; > p = &v[10]; > > The problem is that, when I'm trying to parse "p = &v[10];", I'm not able to > get the array offset (10 in this cas

Problem with ADDR_EXPR array offset

2010-03-24 Thread Massimo Nazaria
Hi everybody! I'm working on a pass and I need to handle some pointer expressions. For example, I have this C-code: int v[1000]; int *p; p = &v[10]; The problem is that, when I'm trying to parse "p = &v[10];", I'm not able to get the array offset (10 in this case). Namely, for a given st

Question about -Os handling of fold_builtin_strcpy()

2010-03-24 Thread Dave Hudson
Is there any obvious reason why this function doesn't enable folding if we're optimizing for size? All of the other string/memory folds appear to rely on the various move, clear or set ratios? When optimizing small string copies it's definitely smaller to do this inline on some ISAs. Thanks,

Re: BB reorder forced off for -Os

2010-03-24 Thread Dave Hudson
On 23 Mar 2010, at 22:30, Steven Bosscher wrote: > On Tue, Mar 23, 2010 at 7:05 PM, Ian Bolton wrote: >> Is there any reason why BB reorder has been disabled >> in bb-reorder.c for -Os, such that you can't even >> turn it on with -freorder-blocks? > > No, you should have the option to turn it on

Re: About "STARTING_FRAME_OFFSET" definition

2010-03-24 Thread redriver jiang
Hi, Thanks! I also find the doc describing the "HARD_FRAME_POINTER_REGNUM" and "FRAME_POINTER_REGNUM" in "gcc internals", chapter "Registers That Address the Stack Frame". It is really "usual" way to handle this similar cases. redriver 2010/3/24 Richard Henderson : > On 03/23/2010 05:55 AM,