Commit 92a8cd23 authored by Matthias Braun's avatar Matthias Braun
Browse files

fix bugs introduced in last commit

[r28339]
parent 9d4e2306
......@@ -622,7 +622,7 @@ static void handle_const_Calls(env_t *ctx)
ctx->n_calls_Sel = 0;
/* all calls of const functions can be transformed */
for (i = 0, n = get_irp_n_irgs(); i < 0; ++i) {
for (i = 0, n = get_irp_n_irgs(); i < n; ++i) {
ir_graph *irg = get_irp_irg(i);
ctx->float_const_call_list = NULL;
......
......@@ -149,7 +149,7 @@ static void garbage_collect_in_segment(ir_type *segment)
void garbage_collect_entities(void)
{
size_t i, n;
ssize_t i;
ir_segment_t s;
FIRM_DBG_REGISTER(dbg, "firm.opt.garbagecollect");
......@@ -169,7 +169,7 @@ void garbage_collect_entities(void)
/* remove graphs of non-visited functions
* (we have to count backwards so we can safely call remove_irp_irg
* while iterating) */
for (i = 0, n = get_irp_n_irgs(); i < n; ++i) {
for (i = get_irp_n_irgs()-1; i >= 0; --i) {
ir_graph *irg = get_irp_irg(i);
ir_entity *entity = get_irg_entity(irg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment