diff mbox

[committed] gen-pass-instances.awk: Simplify match regexp in handle_line

Message ID 56446540.5040808@mentor.com
State New
Headers show

Commit Message

Tom de Vries Nov. 12, 2015, 10:09 a.m. UTC
Hi,

this patch simplifies the match regexp in handle_line in 
gen-pass-instances.awk.

Committed to trunk as trivial.

Thanks,
- Tom

Comments

Thomas Schwinge Nov. 13, 2015, 8:58 a.m. UTC | #1
Hi Tom!

As I happend to see this, and have a number of older build trees around:

On Thu, 12 Nov 2015 11:09:04 +0100, Tom de Vries <Tom_deVries@mentor.com> wrote:
> this patch [and another dozen of such patches before] simplifies [...] in 
> gen-pass-instances.awk.
> 
> Committed to trunk as trivial.

Supposing this was the intention, just to confirm: the generated
gcc/pass-instances.def files that I looked at did not change after your
recent gcc/gen-pass-instances.awk changes.


Grüße
 Thomas
Tom de Vries Nov. 13, 2015, 10:28 a.m. UTC | #2
On 13/11/15 09:58, Thomas Schwinge wrote:
> Hi Tom!
>
> As I happend to see this, and have a number of older build trees around:
>
> On Thu, 12 Nov 2015 11:09:04 +0100, Tom de Vries <Tom_deVries@mentor.com> wrote:
>> this patch [and another dozen of such patches before] simplifies [...] in
>> gen-pass-instances.awk.
>>
>> Committed to trunk as trivial.
>
> Supposing this was the intention, just to confirm: the generated
> gcc/pass-instances.def files that I looked at did not change after your
> recent gcc/gen-pass-instances.awk changes.
>

Hi Thomas,

thanks for double-checking and letting me know.

Indeed, that was the intention. I intend to change 
gen-pass-instances.awk for PR68247 - "Remove pass_first_instance", and 
I'm trying to achieve a minimal diff that contains functional changes, 
by splitting of trivial improvements that do not contain functional changes.

And agreed, comparing the gcc/pass-instances.def buildarea file before 
and after gcc/gen-pass-instances.awk non-functional changes is 
sufficient testing. That's also what I'm doing.

Thanks,
- Tom
diff mbox

Patch

gen-pass-instances.awk: Simplify match regexp in handle_line

2015-11-12  Tom de Vries  <tom@codesourcery.com>

	* gen-pass-instances.awk (handle_line): Simplify match regexp.

---
 gcc/gen-pass-instances.awk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/gen-pass-instances.awk b/gcc/gen-pass-instances.awk
index 08d4a37..cbfaa86 100644
--- a/gcc/gen-pass-instances.awk
+++ b/gcc/gen-pass-instances.awk
@@ -43,7 +43,7 @@  function handle_line()
 	line = $0;
 
 	# Find call expression.
-	call_starts_at = match(line, /NEXT_PASS \((.+)\)/);
+	call_starts_at = match(line, /NEXT_PASS \(.+\)/);
 	if (call_starts_at == 0)
 	{
 		print line;