diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-05 12:14:27 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-05 12:14:27 +0000 |
commit | 84b574d2ea704527e2da7dcd24aa233b8aba3313 (patch) | |
tree | 8c769246fc064bcf589bbd7310157cfab45d3fbc /gcc/final.c | |
parent | cc1bb56d0e6443719b3a69f6aad88dbc53928438 (diff) | |
download | gcc-84b574d2ea704527e2da7dcd24aa233b8aba3313.tar.gz |
Add a no_register_allocation target hook.
* target.def (no_register_allocation): New data hook.
* doc/tm.texi.in: Add @hook TARGET_NO_REGISTER_ALLOCATION.
* doc/tm.texi: Regenerate.
* ira.c (gate_ira): New function.
(pass_data_ira): Set has_gate.
(pass_ira): Add a gate function.
(pass_data_reload): Likewise.
(pass_reload): Add a gate function.
(pass_ira): Use it.
* reload1.c (eliminate_regs): If reg_eliminate_is NULL, assert that
no register allocation happens on the target and return.
* final.c (alter_subreg): Ensure register is not a pseudo before
calling simplify_subreg.
(output_operand): Assert that x isn't a pseudo only if doing
register allocation.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217122 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/final.c b/gcc/final.c index f7ede57da44..e958a520246 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -3189,7 +3189,7 @@ alter_subreg (rtx *xp, bool final_p) else *xp = adjust_address_nv (y, GET_MODE (x), offset); } - else + else if (REG_P (y) && HARD_REGISTER_P (y)) { rtx new_rtx = simplify_subreg (GET_MODE (x), y, GET_MODE (y), SUBREG_BYTE (x)); @@ -3857,7 +3857,8 @@ output_operand (rtx x, int code ATTRIBUTE_UNUSED) x = alter_subreg (&x, true); /* X must not be a pseudo reg. */ - gcc_assert (!x || !REG_P (x) || REGNO (x) < FIRST_PSEUDO_REGISTER); + if (!targetm.no_register_allocation) + gcc_assert (!x || !REG_P (x) || REGNO (x) < FIRST_PSEUDO_REGISTER); targetm.asm_out.print_operand (asm_out_file, x, code); |