This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix rtx_equal_p and similar predicates on ASM_OPERANDS/ASM_INPUT (PR rtl-optimization/46865)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Chung-Lin Tang <cltang at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 10 Dec 2010 13:56:31 +0100
- Subject: Re: [PATCH] Fix rtx_equal_p and similar predicates on ASM_OPERANDS/ASM_INPUT (PR rtl-optimization/46865)
- References: <20101209220639.GL29412@tyan-ft48-01.lab.bos.redhat.com> <4D022224.4000407@codesourcery.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Dec 10, 2010 at 08:50:44PM +0800, Chung-Lin Tang wrote:
> On 2010/12/10 06:06, Jakub Jelinek wrote:
> >The last operand of ASM_OPERANDS and ASM_INPUT is a RTL locator,
> >for which we unfortunately don't guarantee uniqueness. One has
> >to call locator_eq to actually compare them.
> >On the testcases below, without -save-temps the locators are equal
> >while without them some other location_t got a locator in between.
>
> Actually, I think the issue is not just about comparing locators,
> but rather: why do you need locator equality for
> ASM_INPUT/ASM_OPERANDS to be equivalent? The checking of the other
Because then you regress in debug info quality, we emit the location
with .loc before the asm. Though, for -O0 we hopefully don't perform
crossjumping and similar optimizations, and for -O1+ the code quality is
more important than debug info quality.
If we'd want to ignore it, the right fix wouldn't be your patch,
but just making that operand use 0 format instead of i and adjust
print-rtl.c etc.
Jakub