public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* FIXME in gcc/gimplify.c
@ 2019-03-29 22:29 nick
  2019-04-01  8:21 ` Martin Liška
  0 siblings, 1 reply; 6+ messages in thread
From: nick @ 2019-03-29 22:29 UTC (permalink / raw)
  To: GCC Development

Greetings all,

Not sure why this exists still as tree-eh.h is including in tree-eh.c which defines this header
as used for this FIXME:
 #include "tree-pass.h"          /* FIXME: only for PROP_gimple_any */

Unless there is something in the build ordering that would cause issues it's indirectly including
that way so this header inclusion should now be removed. Unless I'm missing something else
which is fine.

If not just let me known and I will just send a patch for it,
Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: FIXME in gcc/gimplify.c
  2019-03-29 22:29 FIXME in gcc/gimplify.c nick
@ 2019-04-01  8:21 ` Martin Liška
  2019-04-01 16:50   ` nick
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Liška @ 2019-04-01  8:21 UTC (permalink / raw)
  To: nick, GCC Development

On 3/29/19 11:29 PM, nick wrote:
> Greetings all,
> 
> Not sure why this exists still as tree-eh.h is including in tree-eh.c which defines this header
> as used for this FIXME:
>  #include "tree-pass.h"          /* FIXME: only for PROP_gimple_any */
> 
> Unless there is something in the build ordering that would cause issues it's indirectly including
> that way so this header inclusion should now be removed. Unless I'm missing something else
> which is fine.
> 
> If not just let me known and I will just send a patch for it,
> Nick
> 

Hi.

Using following patch:

diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index e264700989f..ede679b311c 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -31,7 +31,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "gimple.h"
 #include "gimple-predict.h"
-#include "tree-pass.h"		/* FIXME: only for PROP_gimple_any */
 #include "ssa.h"
 #include "cgraph.h"
 #include "tree-pretty-print.h"

I get:

g++ -fno-PIE -c   -g -O2 -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/marxin/Programming/gcc/gcc -I/home/marxin/Programming/gcc/gcc/. -I/home/marxin/Programming/gcc/gcc/../include -I/home/marxin/Programming/gcc/gcc/../libcpp/include  -I/home/marxin/Programming/gcc/gcc/../libdecnumber -I/home/marxin/Programming/gcc/gcc/../libdecnumber/bid -I../libdecnumber -I/home/marxin/Programming/gcc/gcc/../libbacktrace   -o gimplify.o -MT gimplify.o -MMD -MP -MF ./.deps/gimplify.TPo /home/marxin/Programming/gcc/gcc/gimplify.c
/home/marxin/Programming/gcc/gcc/gimplify.c: In function ‘gbind* gimplify_body(tree, bool)’:
/home/marxin/Programming/gcc/gcc/gimplify.c:13636:17: error: ‘TV_TREE_GIMPLIFY’ was not declared in this scope
   timevar_push (TV_TREE_GIMPLIFY);
                 ^~~~~~~~~~~~~~~~
/home/marxin/Programming/gcc/gcc/gimplify.c:13636:3: error: ‘timevar_push’ was not declared in this scope
   timevar_push (TV_TREE_GIMPLIFY);
   ^~~~~~~~~~~~
/home/marxin/Programming/gcc/gcc/gimplify.c:13636:3: note: suggested alternative: ‘timeval’
   timevar_push (TV_TREE_GIMPLIFY);
   ^~~~~~~~~~~~
   timeval
/home/marxin/Programming/gcc/gcc/gimplify.c:13726:3: error: ‘timevar_pop’ was not declared in this scope
   timevar_pop (TV_TREE_GIMPLIFY);
   ^~~~~~~~~~~
/home/marxin/Programming/gcc/gcc/gimplify.c:13726:3: note: suggested alternative: ‘timeval’
   timevar_pop (TV_TREE_GIMPLIFY);
   ^~~~~~~~~~~
   timeval
/home/marxin/Programming/gcc/gcc/gimplify.c: In function ‘void gimplify_function_tree(tree)’:
/home/marxin/Programming/gcc/gcc/gimplify.c:13792:28: error: ‘PROP_gimple_lva’ was not declared in this scope
   cfun->curr_properties |= PROP_gimple_lva;
                            ^~~~~~~~~~~~~~~
/home/marxin/Programming/gcc/gcc/gimplify.c:13792:28: note: suggested alternative: ‘is_gimple_val’
   cfun->curr_properties |= PROP_gimple_lva;
                            ^~~~~~~~~~~~~~~
                            is_gimple_val
/home/marxin/Programming/gcc/gcc/gimplify.c:13895:28: error: ‘PROP_gimple_any’ was not declared in this scope
   cfun->curr_properties |= PROP_gimple_any;
                            ^~~~~~~~~~~~~~~
/home/marxin/Programming/gcc/gcc/gimplify.c:13895:28: note: suggested alternative: ‘walk_gimple_op’
   cfun->curr_properties |= PROP_gimple_any;
                            ^~~~~~~~~~~~~~~
                            walk_gimple_op
/home/marxin/Programming/gcc/gcc/gimplify.c: In function ‘gimplify_status gimplify_va_arg_expr(tree_node**, gimple**, gimple**)’:
/home/marxin/Programming/gcc/gcc/gimplify.c:13988:29: error: ‘PROP_gimple_lva’ was not declared in this scope
   cfun->curr_properties &= ~PROP_gimple_lva;
                             ^~~~~~~~~~~~~~~
/home/marxin/Programming/gcc/gcc/gimplify.c:13988:29: note: suggested alternative: ‘is_gimple_val’
   cfun->curr_properties &= ~PROP_gimple_lva;
                             ^~~~~~~~~~~~~~~
                             is_gimple_val

Martin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: FIXME in gcc/gimplify.c
  2019-04-01  8:21 ` Martin Liška
@ 2019-04-01 16:50   ` nick
  2019-04-01 17:54     ` Andrew MacLeod
  0 siblings, 1 reply; 6+ messages in thread
From: nick @ 2019-04-01 16:50 UTC (permalink / raw)
  To: Martin Liška; +Cc: GCC Development, amacleod



On 2019-04-01 4:21 a.m., Martin Liška wrote:
> On 3/29/19 11:29 PM, nick wrote:
>> Greetings all,
>>
>> Not sure why this exists still as tree-eh.h is including in tree-eh.c which defines this header
>> as used for this FIXME:
>>  #include "tree-pass.h"          /* FIXME: only for PROP_gimple_any */
>>
>> Unless there is something in the build ordering that would cause issues it's indirectly including
>> that way so this header inclusion should now be removed. Unless I'm missing something else
>> which is fine.
>>
>> If not just let me known and I will just send a patch for it,
>> Nick
>>
> 
> Hi.
> 
> Using following patch:
> 
> diff --git a/gcc/gimplify.c b/gcc/gimplify.c
> index e264700989f..ede679b311c 100644
> --- a/gcc/gimplify.c
> +++ b/gcc/gimplify.c
> @@ -31,7 +31,6 @@ along with GCC; see the file COPYING3.  If not see
>  #include "tm_p.h"
>  #include "gimple.h"
>  #include "gimple-predict.h"
> -#include "tree-pass.h"		/* FIXME: only for PROP_gimple_any */
>  #include "ssa.h"
>  #include "cgraph.h"
>  #include "tree-pretty-print.h"
> 
> I get:
> 
> g++ -fno-PIE -c   -g -O2 -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/marxin/Programming/gcc/gcc -I/home/marxin/Programming/gcc/gcc/. -I/home/marxin/Programming/gcc/gcc/../include -I/home/marxin/Programming/gcc/gcc/../libcpp/include  -I/home/marxin/Programming/gcc/gcc/../libdecnumber -I/home/marxin/Programming/gcc/gcc/../libdecnumber/bid -I../libdecnumber -I/home/marxin/Programming/gcc/gcc/../libbacktrace   -o gimplify.o -MT gimplify.o -MMD -MP -MF ./.deps/gimplify.TPo /home/marxin/Programming/gcc/gcc/gimplify.c
> /home/marxin/Programming/gcc/gcc/gimplify.c: In function ‘gbind* gimplify_body(tree, bool)’:
> /home/marxin/Programming/gcc/gcc/gimplify.c:13636:17: error: ‘TV_TREE_GIMPLIFY’ was not declared in this scope
>    timevar_push (TV_TREE_GIMPLIFY);
>                  ^~~~~~~~~~~~~~~~
> /home/marxin/Programming/gcc/gcc/gimplify.c:13636:3: error: ‘timevar_push’ was not declared in this scope
>    timevar_push (TV_TREE_GIMPLIFY);
>    ^~~~~~~~~~~~
> /home/marxin/Programming/gcc/gcc/gimplify.c:13636:3: note: suggested alternative: ‘timeval’
>    timevar_push (TV_TREE_GIMPLIFY);
>    ^~~~~~~~~~~~
>    timeval
> /home/marxin/Programming/gcc/gcc/gimplify.c:13726:3: error: ‘timevar_pop’ was not declared in this scope
>    timevar_pop (TV_TREE_GIMPLIFY);
>    ^~~~~~~~~~~
> /home/marxin/Programming/gcc/gcc/gimplify.c:13726:3: note: suggested alternative: ‘timeval’
>    timevar_pop (TV_TREE_GIMPLIFY);
>    ^~~~~~~~~~~
>    timeval
> /home/marxin/Programming/gcc/gcc/gimplify.c: In function ‘void gimplify_function_tree(tree)’:
> /home/marxin/Programming/gcc/gcc/gimplify.c:13792:28: error: ‘PROP_gimple_lva’ was not declared in this scope
>    cfun->curr_properties |= PROP_gimple_lva;
>                             ^~~~~~~~~~~~~~~
> /home/marxin/Programming/gcc/gcc/gimplify.c:13792:28: note: suggested alternative: ‘is_gimple_val’
>    cfun->curr_properties |= PROP_gimple_lva;
>                             ^~~~~~~~~~~~~~~
>                             is_gimple_val
> /home/marxin/Programming/gcc/gcc/gimplify.c:13895:28: error: ‘PROP_gimple_any’ was not declared in this scope
>    cfun->curr_properties |= PROP_gimple_any;
>                             ^~~~~~~~~~~~~~~
> /home/marxin/Programming/gcc/gcc/gimplify.c:13895:28: note: suggested alternative: ‘walk_gimple_op’
>    cfun->curr_properties |= PROP_gimple_any;
>                             ^~~~~~~~~~~~~~~
>                             walk_gimple_op
> /home/marxin/Programming/gcc/gcc/gimplify.c: In function ‘gimplify_status gimplify_va_arg_expr(tree_node**, gimple**, gimple**)’:
> /home/marxin/Programming/gcc/gcc/gimplify.c:13988:29: error: ‘PROP_gimple_lva’ was not declared in this scope
>    cfun->curr_properties &= ~PROP_gimple_lva;
>                              ^~~~~~~~~~~~~~~
> /home/marxin/Programming/gcc/gcc/gimplify.c:13988:29: note: suggested alternative: ‘is_gimple_val’
>    cfun->curr_properties &= ~PROP_gimple_lva;
>                              ^~~~~~~~~~~~~~~
>                              is_gimple_val
> 
> Martin
> 
Martin,

Seems this was refactored in commit id,7c29e30e. Andrew MacLeaod seems to be the author so I'm asking him
for why this fixme was added during his major reordering and refactoring of included headers in various .c
or .cc files in gcc.

Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: FIXME in gcc/gimplify.c
  2019-04-01 16:50   ` nick
@ 2019-04-01 17:54     ` Andrew MacLeod
  2019-04-01 21:17       ` nick
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew MacLeod @ 2019-04-01 17:54 UTC (permalink / raw)
  To: nick, Martin Liška; +Cc: GCC Development

On 4/1/19 12:49 PM, nick wrote:
>
> On 2019-04-01 4:21 a.m., Martin Liška wrote:
>> On 3/29/19 11:29 PM, nick wrote:
>>> Greetings all,
>>>
>>> Not sure why this exists still as tree-eh.h is including in tree-eh.c which defines this header
>>> as used for this FIXME:
>>>   #include "tree-pass.h"          /* FIXME: only for PROP_gimple_any */
>>>
>>> Unless there is something in the build ordering that would cause issues it's indirectly including
>>> that way so this header inclusion should now be removed. Unless I'm missing something else
>>> which is fine.
>>>
>>> If not just let me known and I will just send a patch for it,
>>> Nick
>>>
>> Hi.
>>
>> Using following patch:
>>
>> diff --git a/gcc/gimplify.c b/gcc/gimplify.c
>> index e264700989f..ede679b311c 100644
>> --- a/gcc/gimplify.c
>> +++ b/gcc/gimplify.c
>> @@ -31,7 +31,6 @@ along with GCC; see the file COPYING3.  If not see
>>   #include "tm_p.h"
>>   #include "gimple.h"
>>   #include "gimple-predict.h"
>> -#include "tree-pass.h"		/* FIXME: only for PROP_gimple_any */
>>   #include "ssa.h"
>>   #include "cgraph.h"
>>   #include "tree-pretty-print.h"
>>
>> I get:
>>
>> g++ -fno-PIE -c   -g -O2 -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/marxin/Programming/gcc/gcc -I/home/marxin/Programming/gcc/gcc/. -I/home/marxin/Programming/gcc/gcc/../include -I/home/marxin/Programming/gcc/gcc/../libcpp/include  -I/home/marxin/Programming/gcc/gcc/../libdecnumber -I/home/marxin/Programming/gcc/gcc/../libdecnumber/bid -I../libdecnumber -I/home/marxin/Programming/gcc/gcc/../libbacktrace   -o gimplify.o -MT gimplify.o -MMD -MP -MF ./.deps/gimplify.TPo /home/marxin/Programming/gcc/gcc/gimplify.c
>> /home/marxin/Programming/gcc/gcc/gimplify.c: In function ‘gbind* gimplify_body(tree, bool)’:
>> /home/marxin/Programming/gcc/gcc/gimplify.c:13636:17: error: ‘TV_TREE_GIMPLIFY’ was not declared in this scope
>>     timevar_push (TV_TREE_GIMPLIFY);
>>                   ^~~~~~~~~~~~~~~~
>> /home/marxin/Programming/gcc/gcc/gimplify.c:13636:3: error: ‘timevar_push’ was not declared in this scope
>>     timevar_push (TV_TREE_GIMPLIFY);
>>     ^~~~~~~~~~~~
>> /home/marxin/Programming/gcc/gcc/gimplify.c:13636:3: note: suggested alternative: ‘timeval’
>>     timevar_push (TV_TREE_GIMPLIFY);
>>     ^~~~~~~~~~~~
>>     timeval
>> /home/marxin/Programming/gcc/gcc/gimplify.c:13726:3: error: ‘timevar_pop’ was not declared in this scope
>>     timevar_pop (TV_TREE_GIMPLIFY);
>>     ^~~~~~~~~~~
>> /home/marxin/Programming/gcc/gcc/gimplify.c:13726:3: note: suggested alternative: ‘timeval’
>>     timevar_pop (TV_TREE_GIMPLIFY);
>>     ^~~~~~~~~~~
>>     timeval
>> /home/marxin/Programming/gcc/gcc/gimplify.c: In function ‘void gimplify_function_tree(tree)’:
>> /home/marxin/Programming/gcc/gcc/gimplify.c:13792:28: error: ‘PROP_gimple_lva’ was not declared in this scope
>>     cfun->curr_properties |= PROP_gimple_lva;
>>                              ^~~~~~~~~~~~~~~
>> /home/marxin/Programming/gcc/gcc/gimplify.c:13792:28: note: suggested alternative: ‘is_gimple_val’
>>     cfun->curr_properties |= PROP_gimple_lva;
>>                              ^~~~~~~~~~~~~~~
>>                              is_gimple_val
>> /home/marxin/Programming/gcc/gcc/gimplify.c:13895:28: error: ‘PROP_gimple_any’ was not declared in this scope
>>     cfun->curr_properties |= PROP_gimple_any;
>>                              ^~~~~~~~~~~~~~~
>> /home/marxin/Programming/gcc/gcc/gimplify.c:13895:28: note: suggested alternative: ‘walk_gimple_op’
>>     cfun->curr_properties |= PROP_gimple_any;
>>                              ^~~~~~~~~~~~~~~
>>                              walk_gimple_op
>> /home/marxin/Programming/gcc/gcc/gimplify.c: In function ‘gimplify_status gimplify_va_arg_expr(tree_node**, gimple**, gimple**)’:
>> /home/marxin/Programming/gcc/gcc/gimplify.c:13988:29: error: ‘PROP_gimple_lva’ was not declared in this scope
>>     cfun->curr_properties &= ~PROP_gimple_lva;
>>                               ^~~~~~~~~~~~~~~
>> /home/marxin/Programming/gcc/gcc/gimplify.c:13988:29: note: suggested alternative: ‘is_gimple_val’
>>     cfun->curr_properties &= ~PROP_gimple_lva;
>>                               ^~~~~~~~~~~~~~~
>>                               is_gimple_val
>>
>> Martin
>>
> Martin,
>
> Seems this was refactored in commit id,7c29e30e. Andrew MacLeaod seems to be the author so I'm asking him
> for why this fixme was added during his major reordering and refactoring of included headers in various .c
> or .cc files in gcc.
>
> Nick

Presumably because I didn't add it?  I just refactored the major 
spaghetti-interdependencies, not all the include files.
If you look back into 2012 before I did any refactoring, that file 
looked like:

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "gimple.h"
#include "tree-iterator.h"
#include "tree-inline.h"
#include "tree-pretty-print.h"
#include "langhooks.h"
#include "tree-flow.h"
#include "cgraph.h"
#include "timevar.h"
#include "hashtab.h"
#include "flags.h"
#include "function.h"
#include "ggc.h"
#include "diagnostic-core.h"
#include "target.h"
#include "pointer-set.h"
#include "splay-tree.h"
#include "vec.h"
#include "gimple.h"

#include "langhooks-def.h"      /* FIXME: for lhd_set_decl_assembler_name */
#include "tree-pass.h"          /* FIXME: only for PROP_gimple_any */


so that comment predates anything I did to it.   I specifically left any 
comments that existed as I refactored the core bits.

Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: FIXME in gcc/gimplify.c
  2019-04-01 17:54     ` Andrew MacLeod
@ 2019-04-01 21:17       ` nick
  2019-04-02 13:33         ` Andrew MacLeod
  0 siblings, 1 reply; 6+ messages in thread
From: nick @ 2019-04-01 21:17 UTC (permalink / raw)
  To: Andrew MacLeod, Martin Liška; +Cc: GCC Development



On 2019-04-01 1:54 p.m., Andrew MacLeod wrote:
> On 4/1/19 12:49 PM, nick wrote:
>>
>> On 2019-04-01 4:21 a.m., Martin Liška wrote:
>>> On 3/29/19 11:29 PM, nick wrote:
>>>> Greetings all,
>>>>
>>>> Not sure why this exists still as tree-eh.h is including in tree-eh.c which defines this header
>>>> as used for this FIXME:
>>>>   #include "tree-pass.h"          /* FIXME: only for PROP_gimple_any */
>>>>
>>>> Unless there is something in the build ordering that would cause issues it's indirectly including
>>>> that way so this header inclusion should now be removed. Unless I'm missing something else
>>>> which is fine.
>>>>
>>>> If not just let me known and I will just send a patch for it,
>>>> Nick
>>>>
>>> Hi.
>>>
>>> Using following patch:
>>>
>>> diff --git a/gcc/gimplify.c b/gcc/gimplify.c
>>> index e264700989f..ede679b311c 100644
>>> --- a/gcc/gimplify.c
>>> +++ b/gcc/gimplify.c
>>> @@ -31,7 +31,6 @@ along with GCC; see the file COPYING3.  If not see
>>>   #include "tm_p.h"
>>>   #include "gimple.h"
>>>   #include "gimple-predict.h"
>>> -#include "tree-pass.h"        /* FIXME: only for PROP_gimple_any */
>>>   #include "ssa.h"
>>>   #include "cgraph.h"
>>>   #include "tree-pretty-print.h"
>>>
>>> I get:
>>>
>>> g++ -fno-PIE -c   -g -O2 -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/marxin/Programming/gcc/gcc -I/home/marxin/Programming/gcc/gcc/. -I/home/marxin/Programming/gcc/gcc/../include -I/home/marxin/Programming/gcc/gcc/../libcpp/include  -I/home/marxin/Programming/gcc/gcc/../libdecnumber -I/home/marxin/Programming/gcc/gcc/../libdecnumber/bid -I../libdecnumber -I/home/marxin/Programming/gcc/gcc/../libbacktrace   -o gimplify.o -MT gimplify.o -MMD -MP -MF ./.deps/gimplify.TPo /home/marxin/Programming/gcc/gcc/gimplify.c
>>> /home/marxin/Programming/gcc/gcc/gimplify.c: In function ‘gbind* gimplify_body(tree, bool)’:
>>> /home/marxin/Programming/gcc/gcc/gimplify.c:13636:17: error: ‘TV_TREE_GIMPLIFY’ was not declared in this scope
>>>     timevar_push (TV_TREE_GIMPLIFY);
>>>                   ^~~~~~~~~~~~~~~~
>>> /home/marxin/Programming/gcc/gcc/gimplify.c:13636:3: error: ‘timevar_push’ was not declared in this scope
>>>     timevar_push (TV_TREE_GIMPLIFY);
>>>     ^~~~~~~~~~~~
>>> /home/marxin/Programming/gcc/gcc/gimplify.c:13636:3: note: suggested alternative: ‘timeval’
>>>     timevar_push (TV_TREE_GIMPLIFY);
>>>     ^~~~~~~~~~~~
>>>     timeval
>>> /home/marxin/Programming/gcc/gcc/gimplify.c:13726:3: error: ‘timevar_pop’ was not declared in this scope
>>>     timevar_pop (TV_TREE_GIMPLIFY);
>>>     ^~~~~~~~~~~
>>> /home/marxin/Programming/gcc/gcc/gimplify.c:13726:3: note: suggested alternative: ‘timeval’
>>>     timevar_pop (TV_TREE_GIMPLIFY);
>>>     ^~~~~~~~~~~
>>>     timeval
>>> /home/marxin/Programming/gcc/gcc/gimplify.c: In function ‘void gimplify_function_tree(tree)’:
>>> /home/marxin/Programming/gcc/gcc/gimplify.c:13792:28: error: ‘PROP_gimple_lva’ was not declared in this scope
>>>     cfun->curr_properties |= PROP_gimple_lva;
>>>                              ^~~~~~~~~~~~~~~
>>> /home/marxin/Programming/gcc/gcc/gimplify.c:13792:28: note: suggested alternative: ‘is_gimple_val’
>>>     cfun->curr_properties |= PROP_gimple_lva;
>>>                              ^~~~~~~~~~~~~~~
>>>                              is_gimple_val
>>> /home/marxin/Programming/gcc/gcc/gimplify.c:13895:28: error: ‘PROP_gimple_any’ was not declared in this scope
>>>     cfun->curr_properties |= PROP_gimple_any;
>>>                              ^~~~~~~~~~~~~~~
>>> /home/marxin/Programming/gcc/gcc/gimplify.c:13895:28: note: suggested alternative: ‘walk_gimple_op’
>>>     cfun->curr_properties |= PROP_gimple_any;
>>>                              ^~~~~~~~~~~~~~~
>>>                              walk_gimple_op
>>> /home/marxin/Programming/gcc/gcc/gimplify.c: In function ‘gimplify_status gimplify_va_arg_expr(tree_node**, gimple**, gimple**)’:
>>> /home/marxin/Programming/gcc/gcc/gimplify.c:13988:29: error: ‘PROP_gimple_lva’ was not declared in this scope
>>>     cfun->curr_properties &= ~PROP_gimple_lva;
>>>                               ^~~~~~~~~~~~~~~
>>> /home/marxin/Programming/gcc/gcc/gimplify.c:13988:29: note: suggested alternative: ‘is_gimple_val’
>>>     cfun->curr_properties &= ~PROP_gimple_lva;
>>>                               ^~~~~~~~~~~~~~~
>>>                               is_gimple_val
>>>
>>> Martin
>>>
>> Martin,
>>
>> Seems this was refactored in commit id,7c29e30e. Andrew MacLeaod seems to be the author so I'm asking him
>> for why this fixme was added during his major reordering and refactoring of included headers in various .c
>> or .cc files in gcc.
>>
>> Nick
> 
> Presumably because I didn't add it?  I just refactored the major spaghetti-interdependencies, not all the include files.
> If you look back into 2012 before I did any refactoring, that file looked like:
> 
> #include "config.h"
> #include "system.h"
> #include "coretypes.h"
> #include "tm.h"
> #include "tree.h"
> #include "gimple.h"
> #include "tree-iterator.h"
> #include "tree-inline.h"
> #include "tree-pretty-print.h"
> #include "langhooks.h"
> #include "tree-flow.h"
> #include "cgraph.h"
> #include "timevar.h"
> #include "hashtab.h"
> #include "flags.h"
> #include "function.h"
> #include "ggc.h"
> #include "diagnostic-core.h"
> #include "target.h"
> #include "pointer-set.h"
> #include "splay-tree.h"
> #include "vec.h"
> #include "gimple.h"
> 
> #include "langhooks-def.h"      /* FIXME: for lhd_set_decl_assembler_name */
> #include "tree-pass.h"          /* FIXME: only for PROP_gimple_any */
> 
> 
> so that comment predates anything I did to it.   I specifically left any comments that existed as I refactored the core bits.
> 
> Andrew
> 
Andrew,

I assumed so but it was the last commit and have your names. I will leave this thread open for discussion if anyone knows what
the outstanding issues with header refactoring as required for fixing those comments. If someone comments and is able to give
me a heads up about what needs refactoring I will be glad to do it in a patch or probably patch series.

Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: FIXME in gcc/gimplify.c
  2019-04-01 21:17       ` nick
@ 2019-04-02 13:33         ` Andrew MacLeod
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew MacLeod @ 2019-04-02 13:33 UTC (permalink / raw)
  To: nick, Martin Liška; +Cc: GCC Development

On 4/1/19 5:17 PM, nick wrote:
>
> On 2019-04-01 1:54 p.m., Andrew MacLeod wrote:
>>
>> #include "tree-flow.h"
>> #include "cgraph.h"
>> #include "timevar.h"
>> #include "hashtab.h"
>> #include "flags.h"
>> #include "function.h"
>> #include "ggc.h"
>> #include "diagnostic-core.h"
>> #include "target.h"
>> #include "pointer-set.h"
>> #include "splay-tree.h"
>> #include "vec.h"
>> #include "gimple.h"
>>
>> #include "langhooks-def.h"      /* FIXME: for lhd_set_decl_assembler_name */
>> #include "tree-pass.h"          /* FIXME: only for PROP_gimple_any */
>>
>>
>> so that comment predates anything I did to it.   I specifically left any comments that existed as I refactored the core bits.
>>
>> Andrew
>>
> Andrew,
>
> I assumed so but it was the last commit and have your names. I will leave this thread open for discussion if anyone knows what
> the outstanding issues with header refactoring as required for fixing those comments. If someone comments and is able to give
> me a heads up about what needs refactoring I will be glad to do it in a patch or probably patch series.
>
> Nick
Once upon a  time someone went thru the compiler and added comments to a 
few of thesecomments to  #include's when there were only one or two 
dependencies.

I'm not sure what the original intention was, or why it was tagged as 
"FIXME".    The problem with this approach is it can rapidly get out of 
date.. as can be seen by the other undefined messages that caused the 
compilation issue when the #Include is removed.  There is actually half 
a dozen things required from this include file.

We almost removed all those comments when the re-factoring was being 
performed, but it was automated and there were other comments that were 
relevant, so we elected to just preserve all comments.

I don't see any particular reason or need to fix these includes. I think 
the comments are out of date and unnecessary, but won't lose any sleep 
over them.

tree-pass.h is required to compile this file. It is not included by any 
other include file, so there is no ordering issue I can see, nor any 
need to remove the #include.

Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-04-02 13:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-29 22:29 FIXME in gcc/gimplify.c nick
2019-04-01  8:21 ` Martin Liška
2019-04-01 16:50   ` nick
2019-04-01 17:54     ` Andrew MacLeod
2019-04-01 21:17       ` nick
2019-04-02 13:33         ` Andrew MacLeod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).