This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] gen-pass-instances.awk: Add comments in handle_line
- From: Tom de Vries <Tom_deVries at mentor dot com>
- To: "gcc-patches at gnu dot org" <gcc-patches at gnu dot org>
- Date: Thu, 12 Nov 2015 09:27:23 +0100
- Subject: [committed] gen-pass-instances.awk: Add comments in handle_line
- Authentication-results: sourceware.org; auth=none
Hi,
this patch adds some comments in handle_line in gen-pass-instances.awk.
Committed to trunk as trivial.
Thanks,
- Tom
gen-pass-instances.awk: Add comments in handle_line
2015-11-11 Tom de Vries <tom@codesourcery.com>
* gen-pass-instances.awk (handle_line): Add comments.
---
gcc/gen-pass-instances.awk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/gen-pass-instances.awk b/gcc/gen-pass-instances.awk
index 7624959..3d5e8b6 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],