How to easily identify that a FUNCTION_DECL is a lambda

2018-07-16 Thread Martin Liška
Hi. For purpose of --coverage I would like to distinguish lambda functions among DECL_ARTIFICIAL functions. Currently, cp-tree.h provides macro: /* Test if FUNCTION_DECL is a lambda function. */ #define LAMBDA_FUNCTION_P(FNDECL) \ (DECL_DECLARES_FUNCTION_P (FNDECL

Re: [RFC] Update coding conventions to restrict use of non-const references

2018-07-16 Thread Richard Sandiford
Aldy Hernandez writes: > On Thu, Jul 12, 2018 at 1:41 PM Jonathan Wakely wrote: >> >> On Thu, 12 Jul 2018 at 11:41, Richard Sandiford wrote: >> > +Only use non-constant references in the following situations: >> > + >> > + >> > + >> > +when they are necessary to conform to a standard interface, s

Re: Understanding tree_swap_operands_p wrt SSA name versions

2018-07-16 Thread Richard Biener
On Mon, Jul 16, 2018 at 12:19 AM Michael Ploujnikov wrote: > > On 2018-07-04 04:52 AM, Richard Biener wrote: > > On Tue, Jul 3, 2018 at 9:09 PM Jeff Law wrote: > >> > >> On 07/03/2018 11:55 AM, Michael Ploujnikov wrote: > >>> On 2018-07-03 12:46 PM, Richard Biener wrote: > On July 3, 2018 4:

Re: [RFC] Update coding conventions to restrict use of non-const references

2018-07-16 Thread Aldy Hernandez
On 07/16/2018 04:19 AM, Richard Sandiford wrote: Aldy Hernandez writes: On Thu, Jul 12, 2018 at 1:41 PM Jonathan Wakely wrote: On Thu, 12 Jul 2018 at 11:41, Richard Sandiford wrote: +Only use non-constant references in the following situations: + + + +when they are necessary to conform t

Re: [RFC] Update coding conventions to restrict use of non-const references

2018-07-16 Thread Richard Biener
On Mon, Jul 16, 2018 at 11:48 AM Aldy Hernandez wrote: > > > > On 07/16/2018 04:19 AM, Richard Sandiford wrote: > > Aldy Hernandez writes: > >> On Thu, Jul 12, 2018 at 1:41 PM Jonathan Wakely > >> wrote: > >>> > >>> On Thu, 12 Jul 2018 at 11:41, Richard Sandiford wrote: > +Only use non-con

Re: How to easily identify that a FUNCTION_DECL is a lambda

2018-07-16 Thread Nathan Sidwell
On 07/16/2018 03:23 AM, Martin Liška wrote: Hi. For purpose of --coverage I would like to distinguish lambda functions among DECL_ARTIFICIAL functions. Currently, cp-tree.h provides macro: /* Test if FUNCTION_DECL is a lambda function. */ #define LAMBDA_FUNCTION_P(FNDECL)

Re: [GSOC] LTO dump tool project

2018-07-16 Thread Hrishikesh Kulkarni
Hi, As suggested I have created command line option -optimized=[none, blocks, stats, vops] to dump the respective gimple bodies of all functions. for example: -optimized=blocks will dump Gimple body of function: main main () { ;; basic block 2, loop depth 0 ;;pred: ENTRY printf ("

Re: How to easily identify that a FUNCTION_DECL is a lambda

2018-07-16 Thread Richard Biener
On July 16, 2018 4:30:42 PM GMT+02:00, Nathan Sidwell wrote: >On 07/16/2018 03:23 AM, Martin Liška wrote: >> Hi. >> >> For purpose of --coverage I would like to distinguish lambda >functions >> among DECL_ARTIFICIAL functions. Currently, cp-tree.h provides macro: >> >> /* Test if FUNCTION_DECL i

Re: How to easily identify that a FUNCTION_DECL is a lambda

2018-07-16 Thread Nathan Sidwell
On 07/16/2018 12:04 PM, Richard Biener wrote: Just use a spare bit in function_decl, then we can simply stream it. If there's one, then sure. (you've reminded me that there are a bunch of mutually disjoint flags in function_decl that could be collapsed to an enumeration. This may be anothe

Re: [RFC] Update coding conventions to restrict use of non-const references

2018-07-16 Thread Martin Sebor
On 07/16/2018 02:19 AM, Richard Sandiford wrote: Aldy Hernandez writes: On Thu, Jul 12, 2018 at 1:41 PM Jonathan Wakely wrote: On Thu, 12 Jul 2018 at 11:41, Richard Sandiford wrote: +Only use non-constant references in the following situations: + + + +when they are necessary to conform to a

Re: ICE building a libsupc++ file, pdp11 target

2018-07-16 Thread Paul Koning
> On Jul 13, 2018, at 3:12 PM, U.Mutlu wrote: > > Paul Koning wrote on 07/13/2018 08:56 PM: >> >> >>> On Jul 13, 2018, at 2:52 PM, U.Mutlu wrote: >>> >>> Paul Koning wrote on 07/13/2018 08:27 PM: I'm trying to see if I can build the pdp11 target for languages other than just C,

Re: Understanding tree_swap_operands_p wrt SSA name versions

2018-07-16 Thread Michael Ploujnikov
On 2018-07-16 04:30 AM, Richard Biener wrote: > On Mon, Jul 16, 2018 at 12:19 AM Michael Ploujnikov > wrote: >> >> On 2018-07-04 04:52 AM, Richard Biener wrote: >>> On Tue, Jul 3, 2018 at 9:09 PM Jeff Law wrote: On 07/03/2018 11:55 AM, Michael Ploujnikov wrote: > On 2018-07-03 12:46