This is the mail archive of the 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: [gfortran] Make all labels DECL_ARTIFICIAL

On Monday 20 December 2004 23:15, Steven Bosscher wrote:
> On Tuesday 21 December 2004 00:10, Paul Brook wrote:
> > On Monday 20 December 2004 21:23, Steven Bosscher wrote:
> > > There is absolutely nothing we gain from making Fortran's numeric
> > > labels user labels (gdb can't put break points on them), and they
> > > for some reason hurt performance.  So the attached patch just all
> > > marks them as compiler-generated.  Thoughts?
> >
> > It'd be nice if we could figure out what "some reason" was,
> We believed at the time that it would be useful to be able to set
> a breakpoint on __label_#####.

I still do. However I just tried this and it didn't work.

> > and/or why gdb
> > won't set breakpoints on these labels.
> It will, but users who try, say "b 100" will put a breakpoint on
> line 100, not label 100.  I wouldn't expect people to remember to
> put a breakpoint on __label_00100.

b __label_000010 seems acceptable to me. The gdb syntax is ambiguous, so 
something has to give. I thought g77 did the same.

> > Last time I brought this up I was
> > told that user labels should not effect the optimizers.
> You were told wrong.  At -O1 they're always preserved, which prevents
> some merging of basic blocks.  At the tree level it appears we never
> remove user labels (there's a separate patch from from Andrew Pinski
> to fix that).

Preserving them at -O1 seems reasonable. In my mind -O1 means enable 
optimization, but don't make too much of a mess. It's -O2 I care about.

> > IMHO labels should
> > not affect code quality, and this is an optimizer bug.
> Yup.


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