This is the mail archive of the gcc-patches@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: [PATCH] [Annotalysis] Add support for arrays in lock expressions


On 11-11-10 13:05 , Delesley Hutchins wrote:
Why PLUS_EXPR and MULT_EXPR?  Pointer arithmetic should use
POINTER_PLUS_EXPR exclusively.  I don't think you should be seeing
PLUS_EXPRs here.  The MULT_EXPR show up in scaling expressions?

MULT_EXPR shows up in array indexing, since the index is multiplied by the size of the element; gcc converts everything to bytes before lowering. I added PLUS_EXPR for completeness, since I'm sure someone will write an expression like array[i+1] at some point. :-)

But you should not see such an expression in gimple. The array index is always a gimple_val.



Diego.



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