Richard Guenther wrote:

>> OK, great.  Here's a draft patch for the trick; this works on the test
>> case I had, and I'll be testing it now.  If it passes testing, and I add
>> testcases, does this look OK to you?

Thanks for the speedy and accurate review!

>> +  bool noalias;
> 
> it's an int.

Doh, fixed.

>> +  /* For each incoming pointer argument arg, ARG = ESCAPED_VARS or a
>> +     dummy variable if flag_argument_noalias > 2. */
> 
> What's this comment for?

Brain leakage.  I cut-and-paste that from an older version; sorry, will
remove.

>> +      if (POINTER_TYPE_P (TREE_TYPE (t)) && noalias)
> 
> noalias > 0 I suppose.

If you like.  (Since noalias is never negative, this is logically
equivalent.)  I've made the change.

>>         {
>>           varinfo_t vi;
>>           tree heapvar = heapvar_lookup (t);
>> @@ -4579,7 +4583,7 @@ intra_create_variable_infos (void)
>>               heapvar_insert (t, heapvar);
>>
>>               ann = get_var_ann (heapvar);
>> -             if (flag_argument_noalias == 1)
>> +             if (flag_argument_noalias <= 1)
>>                 ann->noalias_state = NO_ALIAS;
>>               else if (flag_argument_noalias == 2)
>>                 ann->noalias_state = NO_ALIAS_GLOBAL;
> 
> That looks wrong.  Shouldn't this just replace flag_argument_noalias
> for noalias everywhere?

Either will work, but you're right; using noalias is clearer.  (In an
earlier version I'd not organized things in the same way, so that
wouldn't have worked.)  I'll make those changes too.

As you suggest, I'll finish up testing and wait for Danny's comments.

Thanks!

-- 
Mark Mitchell
CodeSourcery
[EMAIL PROTECTED]
(650) 331-3385 x713

Reply via email to