diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2004-05-10 22:28:50 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2004-05-10 15:28:50 -0700 |
commit | 0c196bf9d84c1d3b638bb4cd5f9e088b861afa08 (patch) | |
tree | 7a09be609b6e643706d2fb5ae859c16713ba8528 /gcc/gcse.c | |
parent | 16cfa3dc57a18490554abf3d1c02fa5e26c4c669 (diff) | |
download | gcc-0c196bf9d84c1d3b638bb4cd5f9e088b861afa08.zip gcc-0c196bf9d84c1d3b638bb4cd5f9e088b861afa08.tar.gz gcc-0c196bf9d84c1d3b638bb4cd5f9e088b861afa08.tar.bz2 |
gcse.c (eliminate_partially_redundant_loads): Instead of returning early, goto a cleanup label.
2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
* gcse.c (eliminate_partially_redundant_loads): Instead of returning early,
goto a cleanup label. After the cleanup, free the allocated memory.
From-SVN: r81682
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -8401,14 +8401,14 @@ eliminate_partially_redundant_loads (basic_block bb, rtx insn, if (npred_ok == 0 /* No load can be replaced by copy. */ || (optimize_size && npred_ok > 1)) /* Prevent exploding the code. */ - return; + goto cleanup; /* Check if it's worth applying the partial redundancy elimination. */ if (ok_count < GCSE_AFTER_RELOAD_PARTIAL_FRACTION * not_ok_count) - return; + goto cleanup; if (ok_count < GCSE_AFTER_RELOAD_CRITICAL_FRACTION * critical_count) - return; + goto cleanup; /* Generate moves to the loaded register from where the memory is available. */ @@ -8461,6 +8461,22 @@ eliminate_partially_redundant_loads (basic_block bb, rtx insn, delete_insn (insn); else a_occr->deleted_p = 1; + +cleanup: + + while (unavail_occrs) + { + struct unoccr *temp = unavail_occrs->next; + free (unavail_occrs); + unavail_occrs = temp; + } + + while (avail_occrs) + { + struct unoccr *temp = avail_occrs->next; + free (avail_occrs); + avail_occrs = temp; + } } /* Performing the redundancy elimination as described before. */ |