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]

Re: genrecog patch: kill enforce_mode


On Sat, Sep 11, 1999 at 02:43:44PM -0700, Zack Weinberg wrote:
> While staring at genrecog for other reasons I noticed that there are
> two flags in "struct decision" with the same purpose: ignore_mode and
> enforce_mode.

If you'll look closer, you'll find that they are not quite
symmetric.  Enforce mode is used for merging trees, while
ignore_mode is used for generating code.

> insn-recog.c comes out dramatically different, but it appears to
> function just the same - at least on x86;

There was one place that made the asymmetry obvious --

		if (! allows_const_int)
		  new->enforce_mode = new->ignore_mode = 1;

You changed that to 

		if (! allows_const_int)
		  new->ignore_mode = 1;

if you'd set that to 0 instead, you'd have seen differences like

-  if (reg_not_elim_operand (x4, SImode))
+  if (GET_MODE (x4) == SImode && reg_not_elim_operand (x4, SImode))

which makes the light click on for me as to what this rats nest
of code is trying to do.

> Per the discussion of a few days ago, I also made the generated code
> use 'recog_operand' explicitly throughout.  We can't get rid of the
> #define operands recog_operand line until all the md files are changed
> to match.

Actually, this is trivial to do *without* changing md files -- instead
of having a local variable

  register rtx *ro = &recog_data.operand[0];

instead have

  register rtx * const operands = &recog_data.operand[0];



r~


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