[llvm-commits] [polly] r142773 - in /polly/trunk: lib/RegisterPasses.cpp www/example_load_Polly_into_clang.html
Tobias Grosser
grosser at fim.uni-passau.de
Wed Nov 16 03:28:12 PST 2011
On 11/15/2011 10:42 PM, Sebastian Pop wrote:
> On Sun, Oct 23, 2011 at 3:59 PM, Tobias Grosser
> <grosser at fim.uni-passau.de> wrote:
>> Author: grosser
>> Date: Sun Oct 23 15:59:35 2011
>> New Revision: 142773
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=142773&view=rev
>> Log:
>> Add an option to run the PoCC optimizer
>>
>> Modified:
>> polly/trunk/lib/RegisterPasses.cpp
>> polly/trunk/www/example_load_Polly_into_clang.html
>>
>> Modified: polly/trunk/lib/RegisterPasses.cpp
>> URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/RegisterPasses.cpp?rev=142773&r1=142772&r2=142773&view=diff
>> ==============================================================================
>> --- polly/trunk/lib/RegisterPasses.cpp (original)
>> +++ polly/trunk/lib/RegisterPasses.cpp Sun Oct 23 15:59:35 2011
>> @@ -37,6 +37,10 @@
>> cl::desc("Disable Polly Code Generation"), cl::Hidden,
>> cl::init(false));
>> static cl::opt<bool>
>> +UsePocc("polly-use-pocc",
>> + cl::desc("Use the PoCC optimizer instead of the one in isl"), cl::Hidden,
>> + cl::init(false));
>> +static cl::opt<bool>
>> PollyViewer("polly-show",
>> cl::desc("Enable the Polly DOT viewer in -O3"), cl::Hidden,
>> cl::value_desc("Run the Polly DOT viewer at -O3"),
>> @@ -124,8 +128,21 @@
>> if (PollyOnlyPrinter)
>> PM.add(polly::createDOTOnlyPrinterPass());
>>
>> - if (!DisableScheduler)
>> - PM.add(polly::createIslScheduleOptimizerPass());
>> + if (!DisableScheduler) {
>
> Could you please avoid double negation: what about declaring
> a bool EnableScheduler and then use that?
>
>> + if (!UsePocc)
>> + PM.add(polly::createIslScheduleOptimizerPass());
>> + else {
>
> Also here, please use the positive condition to avoid the negation:
>
> if (UsePocc) {
> #ifdef SCOPLIB_FOUND
> etc.
> } else {
> PM.add(polly::createIslScheduleOptimizerPass());
> }
>
>> +#ifdef SCOPLIB_FOUND
>> + PM.add(polly::createPoccPass());
>> +#else
>> + errs()<< "Polly is compiled without scoplib support. As scoplib is"
>> +<< "required to run PoCC, PoCC is also not available. Falling"
>> +<< "back to the isl optimizer.\n";
>> + PM.add(polly::createIslScheduleOptimizerPass());
>> +#endif
>> + }
>> +
>> + }
>>
>> if (!DisableCodegen)
>> PM.add(polly::createCodeGenerationPass());
All fixed in "RegisterPasses: Avoid double negation"
Thanks for this pointer
Tobi
More information about the llvm-commits
mailing list