[PATCH] Fix PR33642, unrecognizable insn for -frtl-abstract-sequences

Gábor Lóki loki@inf.u-szeged.hu
Thu Mar 13 18:10:00 GMT 2008


Hi,

This patch fixes the PR33642 for rtl-factoring.c.

It contains the following modifications:

- Redesign the cost computation (based on 'get_attr_length'),
because the previous one fails on many targets.

- The generation of indirect jump sequence has been also modified.
An intermediate register move have been inserted before indirect jump
if the target requires it.

- Use constant pool if the target doesn't allow to store a symbol
reference directly to a register.

- Detect the need of intermediate register and constant pool during
initialization.


Bootstrapped on i686-linux, x86_64-linux.
Regtested on i686-linux, x86_64-linux, arm-eabi, mips-elf, powerpc-elf, sh-elf.


It has a known deficiency: fails into an 'unrecognizable insn' error on arm-eabi
with '-O0 -fPIC -frtl-abstract-sequences' flags.

Currently I don't know why, but I will look into it.

Ok for trunk?

--Gabor



2008-03-13  Gabor Loki  <loki@gcc.gnu.org>

	PR gcc/33642
	* rtl-factoring.c (get_default_length, compute_rtx_length): New.
	Computes the length of INSNs.
	(compute_rtx_cost): Use COMPUTE_RTX_LENGTH instead of GET_ATTR_LENGTH.
	(match_seqs): Initialize IJMP_REG field.
	(recompute_gain_for_pattern_seq): Find a register for IJMP_REG.
	(gen_symbol_ref_rtx_for_label): Force constant to memory if necessary.
	(split_pattern_seq): Use IJMP_REG for indirect jump.
	(compute_init_costs): Detect the need of intermediate register and
	constant pool.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR33642_0313.patch
Type: text/x-patch
Size: 9354 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080313/ab98762d/attachment.bin>


More information about the Gcc-patches mailing list