[polly] r177831 - RegisterPasses: Improve comments

Tobias Grosser tobias at grosser.es
Sun Mar 24 16:33:13 PDT 2013


On 03/24/2013 11:49 PM, Sebastian Pop wrote:
> Tobias Grosser wrote:
>>
>> -  // Polly is only enabled at -O3
>> +  // We only run Polly at optimization level '-O3'.
>> +  //
>> +  // This is to ensure that scalar overhead that may be introduced by Polly is
>> +  // properly cleaned up by LLVM later on. We may reinvestigate this decision
>> +  // later on.
>>     if (Builder.OptLevel != 3) {
>>       errs() << "Polly should only be run with -O3. Disabling Polly.\n";
>
> I don't think that polly should enforce this with an error: it's not erroneous
> to want to try the code generated by polly at a different opt level than -O3.
> What about removing this check and allow polly to execute at any opt level?

I agree that we should remove this check. However, if we want to remove 
it we should verify that the scalar code introduced by Polly is properly 
removed even at low optimization levels. This may involve adding one or 
two cleanup passes after the Polly code generation. I don't have the 
time to do this immediately, but plan to reevaluate this after enabling 
scev based code generation. Scev based code generation should avoid most 
of the redundancies that today would require specific cleanup passes.

Cheers,
Tobi




More information about the llvm-commits mailing list