About some confusion to the GIMPLE grammar

sean yang seanatpurdue@hotmail.com
Fri Apr 21 02:19:00 GMT 2006


Hi Jason and other experts,

I am reading the paper (GCC summit 2003 
http://gcc.fyxm.net/summit/2003/GENERIC%20and%20GIMPLE.pdf) about GIMPLE 
grammar, after reading the GCC internal doc about this topic. There are 
something confusing and here I list a couple of my  questions:

(1) The item for "switch-stmt" in GCC doc is different from the one in the 
paper-- I guess "op1" might be stmt-list rather than NULL(in the doc) and 
stmt (in the paper).

(2) The item for "arg-list" in GCC doc is different from the one in the 
paper --I think the definition in the paper is correct and the one in the 
doc might be wrong.

The reason is that definition in the doc allows the arg-list to lead another 
call-stmt. But the GIMPLE IR should not allow that, i.e., after 
GIMPLIFICATION, statement like [ foo (bar(2), 3); //extern int bar(int)] 
should have been flattened to temp = bar(2); foo(temp, 3);

---------------------------------------------------
with-size-arg: addressable
                     | call-stmt (-----this leads to another call-stmt----)
lhs          : addressable
                     | bitfieldref
                     | WITH_SIZE_EXPR (-----this leads with-size-arg------)
                             op0 -> with-size-arg
                             op1 -> val
call-arg-list: TREE_LIST
                             members -> lhs | CONST (------this leads to 
with lhs---------)
call-stmt    : CALL_EXPR
                             op0 -> val | OBJ_TYPE_REF
                             op1 -> call-arg-list (this leads to 
call-arg-list)
------------------------------------------

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



More information about the Gcc mailing list