Remove jit_langhook_post_compilation_parsing_cleanups
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 5 Jun 2015 21:20:07 +0000 (21:20 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Fri, 5 Jun 2015 21:20:07 +0000 (21:20 +0000)
gcc/jit/ChangeLog:
* dummy-frontend.c
(jit_langhook_post_compilation_parsing_cleanups): Remove.
(LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove
* jit-playback.c (gcc::jit::playback::context::new_global): Add
call to varpool_node::finalize_decl.
(gcc::jit::playback::context::finalize_global_decls): Remove.
* jit-playback.h
(gcc::jit::playback::context::finalize_global_decls): Remove.

From-SVN: r224173

gcc/jit/ChangeLog
gcc/jit/dummy-frontend.c
gcc/jit/jit-playback.c
gcc/jit/jit-playback.h

index 6610da969d3306b12c9ce96a0e4628519a96310d..32308220b22f67f098280b5e2de91d47e8fb5048 100644 (file)
@@ -1,3 +1,14 @@
+2015-06-05  David Malcolm  <dmalcolm@redhat.com>
+
+       * dummy-frontend.c
+       (jit_langhook_post_compilation_parsing_cleanups): Remove.
+       (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove
+       * jit-playback.c (gcc::jit::playback::context::new_global): Add
+       call to varpool_node::finalize_decl.
+       (gcc::jit::playback::context::finalize_global_decls): Remove.
+       * jit-playback.h
+       (gcc::jit::playback::context::finalize_global_decls): Remove.
+
 2015-06-05  David Malcolm  <dmalcolm@redhat.com>
 
        * dummy-frontend.c (jit_langhook_write_globals): Rename to...
index 4a7966ddd6e68eab997a13b91bb0aa7c3dcfd462..41d14f56a9159c2ef2b854067a43f6a7ddc451bc 100644 (file)
@@ -218,16 +218,6 @@ jit_langhook_getdecls (void)
   return NULL;
 }
 
-static void
-jit_langhook_post_compilation_parsing_cleanups (void)
-{
-  gcc::jit::playback::context *ctxt = gcc::jit::active_playback_ctxt;
-  gcc_assert (ctxt);
-  JIT_LOG_SCOPE (ctxt->get_logger ());
-
-  ctxt->finalize_global_decls ();
-}
-
 #undef LANG_HOOKS_NAME
 #define LANG_HOOKS_NAME                "libgccjit"
 
@@ -255,10 +245,6 @@ jit_langhook_post_compilation_parsing_cleanups (void)
 #undef LANG_HOOKS_GETDECLS
 #define LANG_HOOKS_GETDECLS            jit_langhook_getdecls
 
-#undef LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS
-#define LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS \
-  jit_langhook_post_compilation_parsing_cleanups
-
 struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
 
 #include "gt-jit-dummy-frontend.h"
index 64478b7e5eabb59e472b38a67089513011ec3d06..091a5ce815513b7e0fc860faf82e113dedbbc9ba 100644 (file)
@@ -514,6 +514,8 @@ new_global (location *loc,
 
   varpool_node::get_create (inner);
 
+  varpool_node::finalize_decl (inner);
+
   m_globals.safe_push (inner);
 
   return new lvalue (this, inner);
@@ -668,24 +670,6 @@ as_truth_value (tree expr, location *loc)
   return expr;
 }
 
-/* For use by jit_langhook_post_compilation_parsing_cleanups
-   Calls varpool_node::finalize_decl on each global.  */
-
-void
-playback::context::
-finalize_global_decls ()
-{
-  JIT_LOG_SCOPE (get_logger ());
-
-  int i;
-  tree decl;
-  FOR_EACH_VEC_ELT (m_globals, i, decl)
-    {
-      gcc_assert (TREE_CODE (decl) == VAR_DECL);
-      varpool_node::finalize_decl (decl);
-    }
-}
-
 /* Construct a playback::rvalue instance (wrapping a tree) for a
    unary op.  */
 
index 84d99e4f38eb059f50e078876caeb49e0da52814..a6de5661b4df9cdc1d52198decdb11a38edb8747 100644 (file)
@@ -215,8 +215,6 @@ public:
     return m_recording_ctxt->errors_occurred ();
   }
 
-  void finalize_global_decls ();
-
 private:
   void dump_generated_code ();