{
/* i/count/tmp are counters */
/* toOverwrite is used while loop hierarchie is built (see below) */
- int i, count, header, toOverwrite, tmp, len;
+ int i, header, toOverwrite, tmp, len;
/* first/last are used during topological sort to build ordered loop list */
struct LoopContainer *first, *last, *start, *t, *temp;
{
basicblock bp;
instruction *ip;
- int ic, i, j, access;
+ int ic, i, access;
struct depthElement *d;
struct Trace *t;
case ICMD_ASTORE:
c_var_modified[ip->op1] = 1;
break;
-
- default:
- }
}
+ }
d = c_dTable[node];
while (d != NULL) { /* check all successors of block */
*/
int analyze_or_exceptions(int head, struct LoopContainer *lc)
{
- struct depthElement *d, *tmp, *tmp2;
- int i, j, k, value, flag, count;
+ struct depthElement *d;
+ int i, k, value, flag, count;
struct LoopElement *le;
d = c_dTable[head];
*/
int insert_static(int arrayRef, struct Trace *index, struct Changes *varChanges, int special)
{
- struct Constraint *tc;
struct LoopVar *lv;
int varRef;
int high, low;
c_stat_no_opt++;
#endif
return OPT_NONE;
- }
+ }
+
+ /* keep compiler happy */
+ return 0;
}
LOAD_ARRAYLENGTH(c_rightside->var); \
break; \
default: \
- printf("C_ERROR: illegal trace on rightside of loop-header\n"); \
- exit; \
- } \
+ panic("C_ERROR: illegal trace on rightside of loop-header"); \
+ } \
}
/* Patch jumps in original loop and in copied loop, add gotos in copied loop.
case ICMD_LOOKUPSWITCH:
{
- s4 i, l, val, *s4ptr;
+ s4 i, l, *s4ptr;
void **tptr;
tptr = (void **) inst->target;
}
}
break;
-
- }
}
+ }
/* if node is part of loop and has fall through to original start, that */
/* must be redirected. Unfortunately the instructions have to be copied */
case ICMD_LOOKUPSWITCH:
{
- s4 i, l, val, *s4ptr;
+ s4 i, l, *s4ptr;
void **copy_ptr, **base_ptr;
void **tptr;
void patch_handler(struct LoopContainer *lc, basicblock *bptr, basicblock *original_head, basicblock *new_head)
{
instruction *ip;
- s4 *s4ptr;
- void **tptr;
- int high, low, count, i;
+ int i;
/* If node is not part of exception handler or has been visited, exit */
if (!(bptr->lflags & HANDLER_PART) || (bptr->lflags & HANDLER_VISITED))
case ICMD_LOOKUPSWITCH:
{
- s4 i, l, val, *s4ptr;
+ s4 i, l, *s4ptr;
void **tptr;
void **copy_ptr, **base_ptr;
instruction *ip;
s4 *s4ptr;
void **tptr;
- int high, low, count, cnt;
+ int high, low, count;
struct LoopElement *le;
basicblock *new;
*/
void create_static_checks(struct LoopContainer *lc)
{
- int i, j, stackdepth, cnt;
- struct Changes **c;
- struct Constraint *tc1, *tc2;
+ int i, stackdepth, cnt;
+ struct Constraint *tc1;
struct LoopElement *le;
/* loop_head points to the newly inserted loop_head, original_start to */
/* tos and newstack are needed by the macros, that insert instructions into */
/* the new loop head */
- stackptr newstack, tos, sptr;
+ stackptr newstack, tos;
xtable *ex;
#ifdef STATISTICS
/* functions perform this task. */
update_internal_exceptions(lc, loop_head, original_start);
update_external_exceptions(lc->parent, lc->loop_head);
-
}
{
basicblock bp;
instruction *ip;
- int i, j, count, ignore, degrade_checks, opt_level;
+ int i, count, ignore, degrade_checks, opt_level;
struct depthElement *d;
- struct Changes **t1, **t2, **tmp, *t;
+ struct Changes **t1, **tmp, *t;
struct Trace *t_array, *t_index;
/* printf("remove_bc called: %d - %d - %d\n", node, from, special); */
int i, head, node;
struct Changes **changes;
- struct LoopVar *lv;
-
if ((changes = (struct Changes **) malloc(maxlocals * sizeof(struct Changes *))) == NULL)
c_mem_error();
if (analyze_for_array_access(head) > 0) {/* loop contains array access */
#ifdef LOOP_DEBUG
+ struct LoopVar *lv;
+
printf("analyze for array access finished and found\n");
fflush(stdout);
lv = c_loopvars;