[PATCH] [Annotalysis] Add support for arrays in lock expressions

Delesley Hutchins delesley@google.com
Thu Nov 10 19:10:00 GMT 2011


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

I'm not sure what you mean.  The expression  array[i+1]  compiles to
the following (courtesy of dump-tree-ssa):

D.2095_4 = (long unsigned int) i_1;
D.2096_5 = D.2095_4 + 1;
D.2097_6 = D.2096_5 * 4;
D.2098_8 = array_7(D) + D.2097_6;

Annotalysis canonicalizes this gimple code into a tree that includes a
PLUS_EXPR, a MULT_EXPR, and a POINTER_PLUS_EXPR.

  -DeLesley



More information about the Gcc-patches mailing list