@@ -46,6 +46,7 @@ static const char opts[] =
46
46
" -O, --optimize={0,1,2,3} Set the optimization level (default 2 if unspecified or 3 if specified as -O)\n"
47
47
" --inline={yes|no} Control whether inlining is permitted (overrides functions declared as @inline)\n"
48
48
" --check-bounds={yes|no} Emit bounds checks always or never (ignoring declarations)\n"
49
+ " --polly={yes|no} Enable or disable the polyhedral optimizer Polly (overrides @polly declaration)\n"
49
50
" --math-mode={ieee,fast} Disallow or enable unsafe floating point optimizations (overrides @fastmath declaration)\n\n"
50
51
51
52
// error and warning options
@@ -83,6 +84,7 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp)
83
84
opt_output_bc ,
84
85
opt_depwarn ,
85
86
opt_inline ,
87
+ opt_polly ,
86
88
opt_math_mode ,
87
89
opt_worker ,
88
90
opt_bind_to ,
@@ -125,6 +127,7 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp)
125
127
{ "output-incremental" ,required_argument , 0 , opt_incremental },
126
128
{ "depwarn" , required_argument , 0 , opt_depwarn },
127
129
{ "inline" , required_argument , 0 , opt_inline },
130
+ { "polly" , required_argument , 0 , opt_polly },
128
131
{ "math-mode" , required_argument , 0 , opt_math_mode },
129
132
{ "handle-signals" , required_argument , 0 , opt_handle_signals },
130
133
// hidden command line options
@@ -398,6 +401,15 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp)
398
401
jl_errorf ("julia: invalid argument to --inline (%s)" , optarg );
399
402
}
400
403
break ;
404
+ case opt_polly :
405
+ if (!strcmp (optarg ,"yes" ))
406
+ jl_options .polly = JL_OPTIONS_POLLY_ON ;
407
+ else if (!strcmp (optarg ,"no" ))
408
+ jl_options .polly = JL_OPTIONS_POLLY_OFF ;
409
+ else {
410
+ jl_errorf ("julia: invalid argument to --polly (%s)" , optarg );
411
+ }
412
+ break ;
401
413
case opt_math_mode :
402
414
if (!strcmp (optarg ,"ieee" ))
403
415
jl_options .fast_math = JL_OPTIONS_FAST_MATH_OFF ;
0 commit comments