diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-12-19 16:32:57 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:06:11 -0700 |
commit | 03aa6219fd8c79d4872ee88a72d8c16237269782 (patch) | |
tree | 2d7eaa9d490d21445f7ed1ed29a2baa504c53732 /example.c | |
parent | Make "fill_reg" do somewhat the right thing when we take the (diff) | |
download | sparse-03aa6219fd8c79d4872ee88a72d8c16237269782.tar.gz sparse-03aa6219fd8c79d4872ee88a72d8c16237269782.tar.bz2 sparse-03aa6219fd8c79d4872ee88a72d8c16237269782.zip |
Make output_insn() tell where it was called from, and avoid
doing unnecessary register->sameregister moves.
Diffstat (limited to 'example.c')
-rw-r--r-- | example.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -262,6 +262,9 @@ static void output_insn(struct bb_state *state, const char *fmt, ...) output_line(state, "\t%s\n", buffer); } +#define output_insn(state, fmt, arg...) \ + output_insn(state, fmt "\t\t# %s" , ## arg , __FUNCTION__) + static void output_comment(struct bb_state *state, const char *fmt, ...) { static char buffer[512]; @@ -647,6 +650,10 @@ static struct hardreg *copy_reg(struct bb_state *state, struct hardreg *src, pse int i; struct hardreg *reg; + /* If the container has been killed off, just re-use it */ + if (!src->contains) + return src; + /* If "src" only has one user, and the contents are dead, we can re-use it */ if (src->busy == 1 && src->dead == 1) return src; |