diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2013-01-24 10:30:26 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2013-01-24 10:30:26 +0000 |
commit | e86c0101ae59b32c3f10edcca78398cbf8848eaa (patch) | |
tree | b1143716a295f25f560b0b981e81d773c0b72fc8 /gcc/lra-assigns.c | |
parent | 0e128cdc670e73b5834f3ce72f6ff66f470dc7a3 (diff) | |
download | gcc-e86c0101ae59b32c3f10edcca78398cbf8848eaa.tar.gz |
re PR inline-asm/55934 (LRA inline asm error recovery)
gcc/
PR inline-asm/55934
* lra-assigns.c (assign_by_spills): Throw away the pattern of asms
that have operands with impossible constraints.
Add a FIXME for a speed-up opportunity.
* lra-constraints.c (process_alt_operands): Verify that a class
selected from constraints on asms is valid for the operand mode.
(curr_insn_transform): Remove incorrect comment.
testsuite/
PR inline-asm/55934
* gcc.target/i386/pr55934.c: New test.
From-SVN: r195420
Diffstat (limited to 'gcc/lra-assigns.c')
-rw-r--r-- | gcc/lra-assigns.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c index 578bcaeda89..33666fd07b1 100644 --- a/gcc/lra-assigns.c +++ b/gcc/lra-assigns.c @@ -1240,6 +1240,23 @@ assign_by_spills (void) asm_p = true; error_for_asm (insn, "%<asm%> operand has impossible constraints"); + /* Avoid further trouble with this insn. + For asm goto, instead of fixing up all the edges + just clear the template and clear input operands + (asm goto doesn't have any output operands). */ + if (JUMP_P (insn)) + { + rtx asm_op = extract_asm_operands (PATTERN (insn)); + ASM_OPERANDS_TEMPLATE (asm_op) = ggc_strdup (""); + ASM_OPERANDS_INPUT_VEC (asm_op) = rtvec_alloc (0); + ASM_OPERANDS_INPUT_CONSTRAINT_VEC (asm_op) = rtvec_alloc (0); + lra_update_insn_regno_info (insn); + } + else + { + PATTERN (insn) = gen_rtx_USE (VOIDmode, const0_rtx); + lra_set_insn_deleted (insn); + } } } lra_assert (asm_p); @@ -1263,6 +1280,9 @@ assign_by_spills (void) bitmap_ior_into (&changed_insns, &lra_reg_info[sorted_pseudos[i]].insn_bitmap); } + + /* FIXME: Look up the changed insns in the cached LRA insn data using + an EXECUTE_IF_SET_IN_BITMAP over changed_insns. */ FOR_EACH_BB (bb) FOR_BB_INSNS (bb, insn) if (bitmap_bit_p (&changed_insns, INSN_UID (insn))) |