diff options
author | vries <vries@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-12 07:31:30 +0000 |
---|---|---|
committer | vries <vries@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-12 07:31:30 +0000 |
commit | 89e9bb5d3306c7af5693ea3a46a4bbea07251e68 (patch) | |
tree | a3794097b0d2a26707ab0d7c561fed53c1987ba0 /gcc | |
parent | dc0fce2906ef94311ee2376d65896b2615095682 (diff) | |
download | gcc-89e9bb5d3306c7af5693ea3a46a4bbea07251e68.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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230211 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/gen-pass-instances.awk | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fa468c8e9e4..f35859552e7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2015-11-12 Tom de Vries <tom@codesourcery.com> + * gen-pass-instances.awk (handle_line): Add comments. + +2015-11-12 Tom de Vries <tom@codesourcery.com> + * gen-pass-instances.awk (handle_line): Rename len_of_end to len_of_close. 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], |