This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GIMPLE issues and status of gimple-tuples


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.





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]