diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-08 16:18:49 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-08 16:18:49 +0000 |
commit | 71fd77c9b4b3398097c48d6c1d3be7296d670f89 (patch) | |
tree | ca77b69e8b4f032f1066c6a31847233f9db7f8e5 /gcc/rtlanal.c | |
parent | 313793ac30b7208dfb273ab1823bed6b0c20deb4 (diff) | |
download | gcc-71fd77c9b4b3398097c48d6c1d3be7296d670f89.tar.gz |
2008-07-08 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r137620
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@137632 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index dec7daf0e3d..d569ff04b2b 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -1842,6 +1842,34 @@ find_regno_fusage (const_rtx insn, enum rtx_code code, unsigned int regno) } +/* Add register note with kind KIND and datum DATUM to INSN. */ + +void +add_reg_note (rtx insn, enum reg_note kind, rtx datum) +{ + rtx note; + + switch (kind) + { + case REG_CC_SETTER: + case REG_CC_USER: + case REG_LABEL_TARGET: + case REG_LABEL_OPERAND: + /* These types of register notes use an INSN_LIST rather than an + EXPR_LIST, so that copying is done right and dumps look + better. */ + note = alloc_INSN_LIST (datum, REG_NOTES (insn)); + PUT_REG_NOTE_KIND (note, kind); + break; + + default: + note = alloc_EXPR_LIST (kind, datum, REG_NOTES (insn)); + break; + } + + REG_NOTES (insn) = note; +} + /* Remove register note NOTE from the REG_NOTES of INSN. */ void |