public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Daniel Berlin" <dberlin@dberlin.org>
To: "GCC Patches" <gcc-patches@gcc.gnu.org>
Subject: [PATCH]: Add more timevars to aliasing
Date: Sat, 28 Jul 2007 09:41:00 -0000	[thread overview]
Message-ID: <4aca3dc20707280054s373bc979we3cabc8692cc3e23@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

The following splits "tree alias analysis"'s pieces into more
fine-grained timevars, since each individual piece of what it does can
take a very long time, and because it's really performing a bunch of
separate passes.

Bootstrapped and regtested on i686-darwin
Committed to mainline

2007-07-28  Daniel Berlin  <dberlin@dberlin.org>

	* timevar.def: Add TV_CALL_CLOBBER, TV_FLOW_SENSITIVE,
	TV_FLOW_INSENSITIVE.

	* tree-ssa-alias.c (compute_call_clobbered): Push/pop
	TV_CALL_CLOBBER.
	(compute_flow_sensitive_aliasing): Ditto for TV_FLOW_SENSITIVE.
	(compute_flow_insensitive_aliasing): Ditto for
	TV_FLOW_INSENSITIVE.

[-- Attachment #2: timevars.diff --]
[-- Type: text/x-diff, Size: 2203 bytes --]

Index: tree-ssa-alias.c
===================================================================
--- tree-ssa-alias.c	(revision 127012)
+++ tree-ssa-alias.c	(working copy)
@@ -573,6 +573,7 @@ compute_call_clobbered (struct alias_inf
   VEC (tree, heap) *worklist = NULL;
   VEC(int,heap) *worklist2 = NULL;
   
+  timevar_push (TV_CALL_CLOBBER);
   set_initial_properties (ai);
   init_transitive_clobber_worklist (&worklist, &worklist2);
   while (VEC_length (tree, worklist) != 0)
@@ -586,6 +587,7 @@ compute_call_clobbered (struct alias_inf
   VEC_free (tree, heap, worklist);
   VEC_free (int, heap, worklist2);
   compute_tag_properties ();
+  timevar_pop (TV_CALL_CLOBBER);
 }
 
 
@@ -2206,6 +2208,7 @@ compute_flow_sensitive_aliasing (struct 
   size_t i;
   tree ptr;
   
+  timevar_push (TV_FLOW_SENSITIVE);
   set_used_smts ();
   
   for (i = 0; VEC_iterate (tree, ai->processed_ptrs, i, ptr); i++)
@@ -2241,6 +2244,7 @@ compute_flow_sensitive_aliasing (struct 
 	    }
 	}
     }
+  timevar_pop (TV_FLOW_SENSITIVE);
 }
 
 
@@ -2276,6 +2280,7 @@ compute_flow_insensitive_aliasing (struc
 {
   size_t i;
 
+  timevar_push (TV_FLOW_INSENSITIVE);
   /* For every pointer P, determine which addressable variables may alias
      with P's symbol memory tag.  */
   for (i = 0; i < ai->num_pointers; i++)
@@ -2384,6 +2389,7 @@ compute_flow_insensitive_aliasing (struc
 	}
 
     }
+  timevar_pop (TV_FLOW_INSENSITIVE);
 }
 
 
Index: timevar.def
===================================================================
--- timevar.def	(revision 127012)
+++ timevar.def	(working copy)
@@ -87,6 +87,9 @@ DEFTIMEVAR (TV_TREE_STORE_COPY_PROP  , "
 DEFTIMEVAR (TV_FIND_REFERENCED_VARS  , "tree find ref. vars")
 DEFTIMEVAR (TV_TREE_PTA		     , "tree PTA")
 DEFTIMEVAR (TV_TREE_MAY_ALIAS        , "tree alias analysis")
+DEFTIMEVAR (TV_CALL_CLOBBER          , "tree call clobbering")
+DEFTIMEVAR (TV_FLOW_SENSITIVE        , "tree flow sensitive alias")
+DEFTIMEVAR (TV_FLOW_INSENSITIVE      , "tree flow insensitive alias")
 DEFTIMEVAR (TV_MEMORY_PARTITIONING   , "tree memory partitioning")
 DEFTIMEVAR (TV_TREE_INSERT_PHI_NODES , "tree PHI insertion")
 DEFTIMEVAR (TV_TREE_SSA_REWRITE_BLOCKS, "tree SSA rewrite")

                 reply	other threads:[~2007-07-28  7:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4aca3dc20707280054s373bc979we3cabc8692cc3e23@mail.gmail.com \
    --to=dberlin@dberlin.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).