This is the mail archive of the gcc@gcc.gnu.org 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: FIXME in gcc/gimplify.c


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


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