SUIF bug
Charles R. Hardnett
hardnett@cc.gatech.edu
Fri, 23 Jun 2000 16:27:11 -0400 (EDT)
Hi,
I am hoping this is not an omen of bad things to come. I am using SUIF,
and I am particularly interested in the loop transformations. I was
just doing some simple experiments based on the "loop tranformations" ps
document. Unfortunately, I have gotten some bizzare results:
1. I tried to get SUIF to transform a loop nesting similar to one of the
examples(loop interchange), but it did not transform the loop.
2. When I tried to permute the i and j of the array access expressions,
the compiler crashed in 2 different ways
First Scenario:
This uses the following simple code: int main()
int i, j;{
const int N = 100;
int A[101][101],B[101][101];
for (i = 0; i <= N; i++)
for (j = i+1; j <= N; j++)
A[j][i] = B[j][i];
}
These loops should be interchanged if row-major order is assumed, However
skweel fails:
pscc -option SKWEEL "-i -p -W" -s2c -parallel -V -.skw loop-interchange2.c
CPP: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/cpp -D__SCC__
-D__GNUC__=2 -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Di386 -D__i386__
-Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__ -D__unix
-D__i386 -D__linux -Di386 -D__i386 -D__i386__ -D__tune_i386__
-I/home/hardnett/suifhome/i586-linux/include -nostdinc -I/usr/include
loop-interchange2.c /tmp/pscc31785_0.i SNOOT:
/home/hardnett/suifhome/i586-linux/bin/snoot /tmp/pscc31785_0.i
/tmp/pscc31785_1.snt PORKY_PRE_DEFAULTS:
/home/hardnett/suifhome/i586-linux/bin/porky -defaults
/tmp/pscc31785_1.snt /tmp/pscc31785_2.0 PORKY_DEFAULTS:
/home/hardnett/suifhome/i586-linux/bin/porky -defaults /tmp/pscc31785_2.0
/tmp/pscc31785_3.1 PORKY_LINE_FIX:
/home/hardnett/suifhome/i586-linux/bin/porky -kill-redundant-line-marks
/tmp/pscc31785_3.1 /tmp/pscc31785_4.spd P_CONST0:
/home/hardnett/suifhome/i586-linux/bin/porky -const-prop
/tmp/pscc31785_4.spd /tmp/pscc31785_5.2 PORKY_SCALARIZE:
/home/hardnett/suifhome/i586-linux/bin/porky -scalarize /tmp/pscc31785_5.2
/tmp/pscc31785_6.3 PORKY_FORWARD_PROP4:
/home/hardnett/suifhome/i586-linux/bin/porky -forward-prop
/tmp/pscc31785_6.3 /tmp/pscc31785_7.spf P_CONST1:
/home/hardnett/suifhome/i586-linux/bin/porky -const-prop
/tmp/pscc31785_7.spf /tmp/pscc31785_8.4 NORMALIZE:
/home/hardnett/suifhome/i586-linux/bin/predep -normalize
/tmp/pscc31785_8.4 /tmp/pscc31785_9.5 P_IVAR1:
/home/hardnett/suifhome/i586-linux/bin/porky -ivar /tmp/pscc31785_9.5
/tmp/pscc31785_10.6 P_IVAR2: /home/hardnett/suifhome/i586-linux/bin/porky
-ivar /tmp/pscc31785_10.6 /tmp/pscc31785_11.7 P_IVAR3:
/home/hardnett/suifhome/i586-linux/bin/porky -ivar /tmp/pscc31785_11.7
/tmp/pscc31785_12.8 P_KNOW_BOUNDS:
/home/hardnett/suifhome/i586-linux/bin/porky -know-bounds
/tmp/pscc31785_12.8 /tmp/pscc31785_13.9 P_CONST2:
/home/hardnett/suifhome/i586-linux/bin/porky -const-prop
/tmp/pscc31785_13.9 /tmp/pscc31785_14.10 P_FOLD1:
/home/hardnett/suifhome/i586-linux/bin/porky -fold /tmp/pscc31785_14.10
/tmp/pscc31785_15.11 SCE0: /home/hardnett/suifhome/i586-linux/bin/moo
-Psce /tmp/pscc31785_15.11 /tmp/pscc31785_16.sce REDUCTIONS:
/home/hardnett/suifhome/i586-linux/bin/reduction /tmp/pscc31785_16.sce
/tmp/pscc31785_17.12 EMPTY_FORS:
/home/hardnett/suifhome/i586-linux/bin/porky -no-empty-fors
/tmp/pscc31785_17.12 /tmp/pscc31785_18.13 PREDEP:
/home/hardnett/suifhome/i586-linux/bin/predep -presc /tmp/pscc31785_18.13
/tmp/pscc31785_19.spr P_DEAD_CODE:
/home/hardnett/suifhome/i586-linux/bin/porky -dead-code
/tmp/pscc31785_19.spr /tmp/pscc31785_20.14 SKWEEL:
/home/hardnett/suifhome/i586-linux/bin/skweel -2 -i -p -W
/tmp/pscc31785_20.14 loop-interchange2.skw
/home/hardnett/suifhome/i586-linux/bin/skweel -2 -i -p -W
/tmp/pscc31785_20.14 loop-interchange2.skw
FAILED (wait code 0x8b)
Second Scenario:
The code was altered slightly:
int main()
int i, j;{
const int N = 100;
int A[101][101],B[101][101];
for (i = 0; i <= N; i++)
for (j = i+1; j <= N; j++)
A[i][j] = B[j][i];
}
This fails differently
The Output:
CPP: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/cpp -D__SCC__
-D__GNUC__=2 -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Di386 -D__i386__
-Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__ -D__unix
-D__i386 -D__linux -Di386 -D__i386 -D__i386__ -D__tune_i386__
-I/home/hardnett/suifhome/i586-linux/include -nostdinc -I/usr/include
loop-interchange2.c /tmp/pscc31837_0.i SNOOT:
/home/hardnett/suifhome/i586-linux/bin/snoot /tmp/pscc31837_0.i
/tmp/pscc31837_1.snt PORKY_PRE_DEFAULTS:
/home/hardnett/suifhome/i586-linux/bin/porky -defaults
/tmp/pscc31837_1.snt /tmp/pscc31837_2.0 PORKY_DEFAULTS:
/home/hardnett/suifhome/i586-linux/bin/porky -defaults /tmp/pscc31837_2.0
/tmp/pscc31837_3.1 PORKY_LINE_FIX:
/home/hardnett/suifhome/i586-linux/bin/porky -kill-redundant-line-marks
/tmp/pscc31837_3.1 /tmp/pscc31837_4.spd P_CONST0:
/home/hardnett/suifhome/i586-linux/bin/porky -const-prop
/tmp/pscc31837_4.spd /tmp/pscc31837_5.2 PORKY_SCALARIZE:
/home/hardnett/suifhome/i586-linux/bin/porky -scalarize /tmp/pscc31837_5.2
/tmp/pscc31837_6.3 PORKY_FORWARD_PROP4:
/home/hardnett/suifhome/i586-linux/bin/porky -forward-prop
/tmp/pscc31837_6.3 /tmp/pscc31837_7.spf P_CONST1:
/home/hardnett/suifhome/i586-linux/bin/porky -const-prop
/tmp/pscc31P_CONST1: /home/hardnett/suifhome/i586-linux/bin/porky
-const-prop /tmp/pscc31837_7.spf /tmp/pscc31837_8.4 NORMALIZE:
/home/hardnett/suifhome/i586-linux/bin/predep -normalize
/tmp/pscc31837_8.4 /tmp/pscc31837_9.5 P_IVAR1:
/home/hardnett/suifhome/i586-linux/bin/porky -ivar /tmp/pscc31837_9.5
/tmp/pscc31837_10.6 P_IVAR2: /home/hardnett/suifhome/i586-linux/bin/porky
-ivar /tmp/pscc31837_10.6 /tmp/pscc31837_11.7 P_IVAR3:
/home/hardnett/suifhome/i586-linux/bin/porky -ivar /tmp/pscc31837_11.7
/tmp/pscc31837_12.8 P_KNOW_BOUNDS:
/home/hardnett/suifhome/i586-linux/bin/porky -know-bounds
/tmp/pscc31837_12.8 /tmp/pscc31837_13.9 P_CONST2:
/home/hardnett/suifhome/i586-linux/bin/porky -const-prop
/tmp/pscc31837_13.9 /tmp/pscc31837_14.10 P_FOLD1:
/home/hardnett/suifhome/i586-linux/bin/porky -fold /tmp/pscc31837_14.10
/tmp/pscc31837_15.11 SCE0: /home/hardnett/suifhome/i586-linux/bin/moo
-Psce /tmp/pscc31837_15.11 /tmp/pscc31837_16.sce REDUCTIONS:
/home/hardnett/suifhome/i586-linux/bin/reduction /tmp/pscc31837_16.sce
/tmp/pscc31837_17.12 EMPTY_FORS:
/home/hardnett/suifhome/i586-linux/bin/porky -no-empty-fors /tmp/pP_FOLD1:
/home/hardnett/suifhome/i586-linux/bin/porky -fold /tmp/pscc31837_14.10
/tmp/pscc31837_15.11 SCE0: /home/hardnett/suifhome/i586-linux/bin/moo
-Psce /tmp/pscc31837_15.11 /tmp/pscc31837_16.sce REDUCTIONS:
/home/hardnett/suifhome/i586-linux/bin/reduction /tmp/pscc31837_16.sce
/tmp/pscc31837_17.12 EMPTY_FORS:
/home/hardnett/suifhome/i586-linux/bin/porky -no-empty-fors
/tmp/pscc31837_17.12 /tmp/pscc31837_18.13 PREDEP:
/home/hardnett/suifhome/i586-linux/bin/predep -presc /tmp/pscc31837_18.13
/tmp/pscc31837_19.spr P_DEAD_CODE:
/home/hardnett/suifhome/i586-linux/bin/porky -dead-code
/tmp/pscc31837_19.spr /tmp/pscc31837_20.14 SKWEEL:
/home/hardnett/suifhome/i586-linux/bin/skweel -2 -i -p -W
/tmp/pscc31837_20.14 loop-interchange2.skw **** Program:
/home/hardnett/suifhome/i586-linux/bin/skweel **** Assertion failure in
file "order.cc" at line 1069 **** False expression: vl->count() == 1
/home/hardnett/suifhome/i586-linux/bin/skweel -2 -i -p -W
/tmp/pscc31837_20.14 loop-interchange2.skw
FAILED (wait code
0x86)