summaryrefslogtreecommitdiff
path: root/gcc/lcm.c
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-12 03:05:20 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-12 03:05:20 +0000
commit2027d2d27693ee46db98fb7d407b8856d64fb864 (patch)
tree9f2ee440767bb3cd740aecbb2cc28f4fd9dfb61d /gcc/lcm.c
parent73f5175372153d23afa2b9424ba46e9a13a303fa (diff)
downloadgcc-2027d2d27693ee46db98fb7d407b8856d64fb864.tar.gz
* lcm.c (optimize_mode_switching): Free ptr even when mode_set
is NULL_RTX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92044 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lcm.c')
-rw-r--r--gcc/lcm.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/lcm.c b/gcc/lcm.c
index 2c4f3fad847..25df2e63cb6 100644
--- a/gcc/lcm.c
+++ b/gcc/lcm.c
@@ -1274,17 +1274,17 @@ optimize_mode_switching (FILE *file)
mode_set = get_insns ();
end_sequence ();
- /* Do not bother to insert empty sequence. */
- if (mode_set == NULL_RTX)
- continue;
-
- emited = true;
- if (NOTE_P (ptr->insn_ptr)
- && (NOTE_LINE_NUMBER (ptr->insn_ptr)
- == NOTE_INSN_BASIC_BLOCK))
- emit_insn_after (mode_set, ptr->insn_ptr);
- else
- emit_insn_before (mode_set, ptr->insn_ptr);
+ /* Insert MODE_SET only if it is nonempty. */
+ if (mode_set != NULL_RTX)
+ {
+ emited = true;
+ if (NOTE_P (ptr->insn_ptr)
+ && (NOTE_LINE_NUMBER (ptr->insn_ptr)
+ == NOTE_INSN_BASIC_BLOCK))
+ emit_insn_after (mode_set, ptr->insn_ptr);
+ else
+ emit_insn_before (mode_set, ptr->insn_ptr);
+ }
}
free (ptr);