Re: writing a new pass: association with an option string

2006-12-06 Thread Ben Elliston
> >I wrote a new pass for gcc. Actually the pass is always executed, but > >I'd like to execute it only if I specify an option from shell (ex. gcc > >--mypass pippo.c). How can I do? This sounds surprisingly like a patch I've been promising Diego for just about ever :-) Ben

Re: writing a new pass: association with an option string

2006-12-04 Thread Dorit Nuzman
See slides 18-35 in http://gcc.gnu.org/wiki/OptimizationCourse?action=AttachFile&do=get&target=ExampleGCC_middle.pdf (linked from http://gcc.gnu.org/wiki/OptimizationCourse). dorit > Dear all, > I wrote a new pass for gcc. Actually the pass is always executed, but > I'd like to execute it only i

Re: writing a new pass: association with an option string

2006-12-04 Thread Revital1 Eres
> Create a new flag in common.opt and read its value in the gate function > of your pass. I *believe* this is documented somewher in the internals > manual, but I'm not sure. See also - http://gcc.gnu.org/wiki/WritingANewPass

Re: writing a new pass: association with an option string

2006-12-04 Thread Diego Novillo
Andrea Callia D'Iddio wrote on 12/04/06 03:48: Dear all, I wrote a new pass for gcc. Actually the pass is always executed, but I'd like to execute it only if I specify an option from shell (ex. gcc --mypass pippo.c). How can I do? Create a new flag in common.opt and read its value in the gate fu

Re: writing a new pass: association with an option string

2006-12-04 Thread Revital1 Eres
[EMAIL PROTECTED] wrote on 04/12/2006 10:48:25: > Dear all, > I wrote a new pass for gcc. Actually the pass is always executed, but > I'd like to execute it only if I specify an option from shell (ex. gcc > --mypass pippo.c). How can I do? Maybe adding a gate to your pass which is controlled by