This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GIMPLE issues and status of gimple-tuples
- From: "Daniel Berlin" <dberlin at dberlin dot org>
- To: "nkavv at physics dot auth dot gr" <nkavv at physics dot auth dot gr>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 18 Nov 2006 10:54:20 -0500
- Subject: Re: GIMPLE issues and status of gimple-tuples
- References: <1163861984.455f1fe00bd1a@mail.physics.auth.gr>
a a. Conditional jumps in GIMPLE are not true three-address-code since they
specify two (2) branch targets (in their general form). E.g.:
if (cond) then
goto target1;
else
goto target2;
IMHO, this should be split (or at least made splittable) into:
if (cond) then
goto target1;
if (!cond) then
goto target2;
It seems redundant but it's really clean.
Branches are already special in a lot of ways, so whether they have
one argument or two doesn't seem to make any real difference.
b. Are LOOP_EXPRs decomposable to combinations of if-then-else and gotos? It
would help for VM (virtual machine) execution of GIMPLE IR. Ideally, a GIMPLE
representation of a program should be possible without use of LOOP_EXPRs.
Errr, LOOP_EXPR doesn't actually exist anymore :)
Loops are always lowered to if-then-else and gotos.
c. It would be interesting to support simple if-then statements in GIMPLE. I.e.
that do not contain blocks of statements with size larger than one.
Now *this* would be ugly, IMHO, because you'd have to special case
these everywhere.