[PATCH] [Polly][Unfinished][NFC] Restructure the command line options

David Peixotto dpeixott at codeaurora.org
Tue Oct 14 10:11:20 PDT 2014


This looks like a nice cleanup to me. I think centralizing the available options for polly makes sense. The major downside in my opinion is that we now have a bunch of global variables. Previously you could look at a command line option that is declared static (without external storage) and know it is only used in that file. Now we are exposing these all as global variables.

As for the implementation, maybe we should consider using an `opt` or `options` namespace inside polly for all the command line options. This would make it clear when reading the code that we are referencing a command line option and we know where to look for the definition if needed.

Something like


```
namespace polly {
namespace opt {
  bool DisablTiling
}}

...
if (opt::DisableTiling) 
 ...
```

You are already essentially namespacing the variables by adding a `Polly` prefix. 

We should also be aware of how llvm is changing command line options to move away from using static initializers: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-August/075886.html. I'm not sure exactly what conclusion they came to, but we don't want to come with a design that will be incompatible with where the llvm community is headed.

http://reviews.llvm.org/D5762






More information about the llvm-commits mailing list