[polly] r193652 - ScopInfo: Add support for AssumedContext

Tobias Grosser tobias at grosser.es
Thu Oct 31 04:57:01 PDT 2013


On 10/31/2013 12:20 PM, Sebastian Pop wrote:
> Tobias Grosser wrote:
>> Author: grosser
>> Date: Tue Oct 29 16:05:49 2013
>> New Revision: 193652
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=193652&view=rev
>> Log:
>> ScopInfo: Add support for AssumedContext
>>
>> When constructing a scop sometimes the exact representation of a statement or
>> condition would be very complex, but there is a common case which is a lot
>> simpler, but which is only valid under certain assumptions. The assumed context
>> records the assumptions taken during the construction of this scop and that need
>> to be code generated as a run-time test.
>>
>> At the moment, we do not yet model any assumptions, but only added the
>> AssumedContext as well as the isl-ast generation support. As a next step,
>> this needs to be hooked up with the isl code generation.
>
> I see that you generate the isl-ast for the condition although you don't
> generate LLVM code from that yet.  Do you mind adding a comment close by
> isl_pw_aff_union_max explaining how you generate the condition?

OK, added.

Adding the LLVM code generation should not be that difficult. It would 
basically mean to code generate the expression before the scop, truncate 
it to i1 and then use the result in the branch condition we currently 
generate.

>> if (1) /* run-time condition */
>>    {  /* optimized code */ }
>> else
>>    {  /* original code */ }
>>
>
> Looks like a very useful feature to add runtime alias and dependence checks ;-)
> Thanks for the addition.

;-)

>> +  /// @brief Get the assumped context for this Scop.
>
> s/assumped/assumed/

Fixed.

Cheers,
Tobias




More information about the llvm-commits mailing list