This is the mail archive of the gcc-patches@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]

[jit] Drop the disabled debugging code within handle_locations


On Tue, 2014-11-04 at 15:21 -0700, Jeff Law wrote:
> On 10/31/14 11:02, David Malcolm wrote:
> > This files implements the gcc::jit::playback internal API, called by
> > the dummy "frontend" to replay the public API calls made to the
> > library.  A thin wrapper around trees.
> >
> > gcc/jit/
> >     * jit-playback.c: New.
> 
> 
> > +  /* line_table should now be populated; every playback::location should
> > +     now have an m_srcloc.  */
> > +
> > +  if (0)
> > +    line_table_dump (stderr,
> > +                         line_table,
> > +                                LINEMAPS_ORDINARY_USED (line_table),
> > +                                                            LINEMAPS_MACRO_USED (line_table));
> > +
> > +  /* Now assign them to tree nodes as appropriate.  */
> > +  std::pair<tree, location *> *cached_location;
> > +
> > +  FOR_EACH_VEC_ELT (m_cached_locations, i, cached_location)
> > +    {
> > +      tree t = cached_location->first;
> > +      source_location srcloc = cached_location->second->m_srcloc;
> > +#if 0
> > +      inform (srcloc, "location of ");
> > +      debug_tree (t);
> > +#endif
> Put the if () #if0 under some kind of debugging control or remove them. 
>   Similarly for later instances.
> 
> With that change, this is good for the trunk.

Thanks.  I removed them in the following commit (on the branch):

gcc/jit/ChangeLog.jit:
	* jit-playback.c (gcc::jit::playback::context::handle_locations):
	Drop the disabled debugging code.
---
 gcc/jit/ChangeLog.jit  |  5 +++++
 gcc/jit/jit-playback.c | 16 ----------------
 2 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/gcc/jit/ChangeLog.jit b/gcc/jit/ChangeLog.jit
index 8de64ac..6212b53 100644
--- a/gcc/jit/ChangeLog.jit
+++ b/gcc/jit/ChangeLog.jit
@@ -1,5 +1,10 @@
 2014-11-05  David Malcolm  <dmalcolm@redhat.com>
 
+	* jit-playback.c (gcc::jit::playback::context::handle_locations):
+	Drop the disabled debugging code.
+
+2014-11-05  David Malcolm  <dmalcolm@redhat.com>
+
 	* docs/topics/expressions.rst (Type-coercion): Casts between
 	pointer types are valid.
 	* libgccjit.c: Document that gcc_jit_context et al are actually
diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
index dc1b468..1dbb778 100644
--- a/gcc/jit/jit-playback.c
+++ b/gcc/jit/jit-playback.c
@@ -1858,12 +1858,6 @@ handle_locations ()
   /* line_table should now be populated; every playback::location should
      now have an m_srcloc.  */
 
-  if (0)
-    line_table_dump (stderr,
-		     line_table,
-		     LINEMAPS_ORDINARY_USED (line_table),
-		     LINEMAPS_MACRO_USED (line_table));
-
   /* Now assign them to tree nodes as appropriate.  */
   std::pair<tree, location *> *cached_location;
 
@@ -1871,10 +1865,6 @@ handle_locations ()
     {
       tree t = cached_location->first;
       source_location srcloc = cached_location->second->m_srcloc;
-#if 0
-      inform (srcloc, "location of ");
-      debug_tree (t);
-#endif
 
       /* This covers expressions: */
       if (CAN_HAVE_LOCATION_P (t))
@@ -1884,12 +1874,6 @@ handle_locations ()
       else
 	{
 	  /* Don't know how to set location on this node.  */
-	  if (0)
-	    {
-	      fprintf (stderr, "can't set location on:");
-	      debug_tree (t);
-	      fprintf (stderr, "\n");
-	    }
 	}
     }
 }
-- 
1.7.11.7


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