[LLVMdev] how to set -pre-ra-sched from code?

Andrew Friedley afriedle at indiana.edu
Wed Apr 21 05:25:41 PDT 2010


Paul Melis wrote:

> You can programmatically pass command-line options using something like:
> 
> #include "llvm/Support/CommandLine.h"
> 
> int main()
> {
> 
>     ...
> 
>     char *opts[] = {
>         "dummy",
>         "-fast-isel",
>         "-fast-isel-verbose",
>         "-pre-RA-sched=fast",       
>     };
> 
>     cl::ParseCommandLineOptions(4, opts, "Blah");
> 
>     ...
> }
> 
> Could be that you need to include more headers, as I cut this piece from
> my own more extensive code.

Excellent, this really helps!  Thanks!

Andrew



More information about the llvm-dev mailing list