This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] PR rtl-optimization/66790: uninitialized registers handling in REE


On 10/13/2015 05:17 PM, Pierre-Marie de Rodat wrote:
The first attached patch is the second attempt to fix PR
rtl-optimization/66790 (see
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66790>).

The second one is a fix for some inconsistency noticed while working on
the original bug. This specific patch fixes no known bug, but anywayâ

Both were bootstrapped and regtested on x86_64-linux. Ok to commit?
Thank you in advance!

[PATCH 1/2] REE: fix uninitialized registers handling

This one is OK with minor changes. I ran some tests with it, and the mir sets look good this time. Code generation still seems unaffected by it on all my example code (which is as expected).

+
+  /* Ignoring artificial defs is intentionnal: these often pretend that some

"intentional".

+      if ((!bitmap_equal_p (&problem_data->in[bb->index], DF_MIR_IN (bb)))
+	  || (!bitmap_equal_p (&problem_data->out[bb->index], DF_MIR_OUT (bb))))
+	{
+	  /*df_dump (stderr);*/
+	  gcc_unreachable ();
+	}

Please remove the commented out code and then also the unnecessary braces. In general we avoid commented out code in gcc, but when doing it, #if 0 is generally a better method.

+      const rtx reg = XEXP (src, 0);

Drop the const maybe? It doesn't seem to add much and the idiom is to just use rtx.

From ff694bf70e0b1ebd336c684713ce6153cc26b3d6 Mon Sep 17 00:00:00 2001
From: Pierre-Marie de Rodat<derodat@adacore.com>
Date: Tue, 22 Sep 2015 16:02:41 +0200
Subject: [PATCH 2/2] DF_LIVE: make clobbers cancel effect of previous GENs in
  the same BBs

gcc/ChangeLog:

	* df-problems.c (df_live_bb_local_compute): Clear GEN bits for
	DF_REF_MUST_CLOBBER references.

This one is probably ok too; I still want to experiment with it a little.


Bernd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]