diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-26 10:06:56 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-26 10:06:56 +0000 |
commit | 16d83c02b51c0e5f9f43d28477013f44afda81d0 (patch) | |
tree | 8a2e3d3e02ca429c89dc152311efede46fcf29ac /gcc/emit-rtl.c | |
parent | faf67f0c4508f805dbda667f2f984485d1625702 (diff) | |
download | gcc-16d83c02b51c0e5f9f43d28477013f44afda81d0.tar.gz |
gcc/
* rtl.h (emit): Add an optional boolean parameter to control
whether barriers are emitted.
* emit-rtl.c (emit): Likewise.
* gensupport.c (get_emit_function): Return null rather than "emit".
* genemit.c (gen_emit_seq): Handle the null return value.
Don't emit barriers after the final instruction in the sequence.
* gentarget-def.c (main): Don't emit barriers after the instruction.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225000 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index e7f7eab4fe2..80c0adb1a35 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -5303,11 +5303,14 @@ set_dst_reg_note (rtx insn, enum reg_note kind, rtx datum, rtx dst) return NULL_RTX; } -/* Emit the rtl pattern X as an appropriate kind of insn. +/* Emit the rtl pattern X as an appropriate kind of insn. Also emit a + following barrier if the instruction needs one and if ALLOW_BARRIER_P + is true. + If X is a label, it is simply added into the insn chain. */ rtx_insn * -emit (rtx x) +emit (rtx x, bool allow_barrier_p) { enum rtx_code code = classify_insn (x); @@ -5320,7 +5323,8 @@ emit (rtx x) case JUMP_INSN: { rtx_insn *insn = emit_jump_insn (x); - if (any_uncondjump_p (insn) || GET_CODE (x) == RETURN) + if (allow_barrier_p + && (any_uncondjump_p (insn) || GET_CODE (x) == RETURN)) return emit_barrier (); return insn; } |