summaryrefslogtreecommitdiff
path: root/gcc/gen-pass-instances.awk
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2015-11-12 07:31:30 +0000
committerTom de Vries <vries@gcc.gnu.org>2015-11-12 07:31:30 +0000
commit9fa1a402555054e2db3c1d9860d5132ce460b73a (patch)
treea3794097b0d2a26707ab0d7c561fed53c1987ba0 /gcc/gen-pass-instances.awk
parent7d3e64f727b96bd6bb5e9819ed5b091b60cb97f0 (diff)
downloadgcc-9fa1a402555054e2db3c1d9860d5132ce460b73a.tar.gz
gen-pass-instances.awk: Add comments in handle_line
2015-11-12 Tom de Vries <tom@codesourcery.com> * gen-pass-instances.awk (handle_line): Add comments. From-SVN: r230211
Diffstat (limited to 'gcc/gen-pass-instances.awk')
-rw-r--r--gcc/gen-pass-instances.awk5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/gen-pass-instances.awk b/gcc/gen-pass-instances.awk
index 76249590830..3d5e8b6817a 100644
--- a/gcc/gen-pass-instances.awk
+++ b/gcc/gen-pass-instances.awk
@@ -56,13 +56,18 @@ function handle_line()
len_of_start = length("NEXT_PASS (");
len_of_close = length(")");
+ # Find pass_name argument
len_of_pass_name = len_of_call - (len_of_start + len_of_close);
pass_starts_at = where + len_of_start;
pass_name = substr(line, pass_starts_at, len_of_pass_name);
+
+ # Set pass_counts
if (pass_name in pass_counts)
pass_counts[pass_name]++;
else
pass_counts[pass_name] = 1;
+
+ # Print call expression with extra pass_num argument
printf "%s, %s%s\n",
substr(line, 1, pass_starts_at + len_of_pass_name - 1),
pass_counts[pass_name],