diff mbox

[4/5] Remove recog_data.enabled_alternatives

Message ID 87r3y6agug.fsf@e105548-lin.cambridge.arm.com
State New
Headers show

Commit Message

Richard Sandiford Oct. 17, 2014, 2:52 p.m. UTC
After the previous patches, this one gets rid of
recog_data.enabled_alternatives and its one remaining use.

Richard


gcc/
	* recog.h (recog_data_d): Remove enabled_alternatives.
	* recog.c (extract_insn): Don't set it.
	* reload.c (find_reloads): Call get_enabled_alternatives.

Comments

Vladimir Makarov Oct. 21, 2014, 2:57 p.m. UTC | #1
On 10/17/2014 10:52 AM, Richard Sandiford wrote:
> After the previous patches, this one gets rid of
> recog_data.enabled_alternatives and its one remaining use.
>
>
Ok for me, too.  Pretty obvious patch although I have no power to
approve it all.
Jeff Law Oct. 21, 2014, 3:34 p.m. UTC | #2
On 10/17/14 14:52, Richard Sandiford wrote:
> After the previous patches, this one gets rid of
> recog_data.enabled_alternatives and its one remaining use.
>
> Richard
>
>
> gcc/
> 	* recog.h (recog_data_d): Remove enabled_alternatives.
> 	* recog.c (extract_insn): Don't set it.
> 	* reload.c (find_reloads): Call get_enabled_alternatives.
This is fine once the prerequisites are approved.

jeff
diff mbox

Patch

Index: gcc/recog.h
===================================================================
--- gcc/recog.h	2014-10-17 15:50:02.627695847 +0100
+++ gcc/recog.h	2014-10-17 15:51:59.662308095 +0100
@@ -250,12 +250,6 @@  struct recog_data_d
   /* True if insn is ASM_OPERANDS.  */
   bool is_asm;
 
-  /* Specifies whether an insn alternative is enabled using the `enabled'
-     attribute in the insn pattern definition.  For back ends not using
-     the `enabled' attribute the bits are always set to 1 in expand_insn.
-     Bits beyond the last alternative are also set to 1.  */
-  alternative_mask enabled_alternatives;
-
   /* In case we are caching, hold insn data was generated for.  */
   rtx insn;
 };
Index: gcc/recog.c
===================================================================
--- gcc/recog.c	2014-10-17 15:50:02.627695847 +0100
+++ gcc/recog.c	2014-10-17 15:51:59.662308095 +0100
@@ -2339,8 +2339,6 @@  extract_insn (rtx_insn *insn)
 
   gcc_assert (recog_data.n_alternatives <= MAX_RECOG_ALTERNATIVES);
 
-  recog_data.enabled_alternatives = get_enabled_alternatives (insn);
-
   recog_data.insn = NULL;
   which_alternative = -1;
 }
Index: gcc/reload.c
===================================================================
--- gcc/reload.c	2014-10-17 15:50:02.627695847 +0100
+++ gcc/reload.c	2014-10-17 15:51:59.666308048 +0100
@@ -2997,13 +2997,14 @@  find_reloads (rtx_insn *insn, int replac
 
      First loop over alternatives.  */
 
+  alternative_mask enabled = get_enabled_alternatives (insn);
   for (this_alternative_number = 0;
        this_alternative_number < n_alternatives;
        this_alternative_number++)
     {
       int swapped;
 
-      if (!TEST_BIT (recog_data.enabled_alternatives, this_alternative_number))
+      if (!TEST_BIT (enabled, this_alternative_number))
 	{
 	  int i;