Discussion:
[patch] Turn 1 lra_assert into 1 gcc_assert
Eric Botcazou
2014-10-06 10:02:15 UTC
Permalink
Hi,

we have run into a case on the ARM where LRA silently generates wrong code in
release mode, while reload (-mno-lra) would stop with the usual spill failure.

Tested on x86_64-suse-linux, OK for the mainline?


2014-10-06 Eric Botcazou <***@adacore.com>

* lra-assigns.c (assign_by_spills): Turn lra_assert into gcc_assert.
--
Eric Botcazou
Richard Biener
2014-10-06 11:35:28 UTC
Permalink
Post by Eric Botcazou
Hi,
we have run into a case on the ARM where LRA silently generates wrong code in
release mode, while reload (-mno-lra) would stop with the usual spill failure.
Tested on x86_64-suse-linux, OK for the mainline?
The docs on the asm_p flags say there is sth wrong with the asm constraints
so maybe better do

if (!asm_p)
error_at (loc, "....");

with an appropriate message and location?

Richard.
Post by Eric Botcazou
* lra-assigns.c (assign_by_spills): Turn lra_assert into gcc_assert.
--
Eric Botcazou
Eric Botcazou
2014-10-07 07:52:31 UTC
Permalink
Post by Richard Biener
The docs on the asm_p flags say there is sth wrong with the asm constraints
so maybe better do
if (!asm_p)
error_at (loc, "....");
with an appropriate message and location?
OK, I guess I can copy-and-paste reload1.c:spill_failure there.
--
Eric Botcazou
Eric Botcazou
2014-10-09 09:39:59 UTC
Permalink
Post by Eric Botcazou
OK, I guess I can copy-and-paste reload1.c:spill_failure there.
This generates the same error message than reload1.c:spill_failure (modulo the
class of the spill register, but it's not mentioned in the asm case either).

Tested on x86_64-suse-linux, OK for the mainline?


2014-10-09 Eric Botcazou <***@adacore.com>

* lra-assigns.c (assign_by_spills): Error out on spill failure.
--
Eric Botcazou
Richard Biener
2014-10-09 10:42:13 UTC
Permalink
Post by Eric Botcazou
Post by Eric Botcazou
OK, I guess I can copy-and-paste reload1.c:spill_failure there.
This generates the same error message than reload1.c:spill_failure (modulo the
class of the spill register, but it's not mentioned in the asm case either).
Tested on x86_64-suse-linux, OK for the mainline?
Ok.

Thanks,
Richard.
Post by Eric Botcazou
* lra-assigns.c (assign_by_spills): Error out on spill failure.
--
Eric Botcazou
Loading...