| OLD | NEW |
| 1 /* Command line option handling. | 1 /* Command line option handling. |
| 2 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 | 2 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 |
| 3 Free Software Foundation, Inc. | 3 Free Software Foundation, Inc. |
| 4 Contributed by Neil Booth. | 4 Contributed by Neil Booth. |
| 5 | 5 |
| 6 This file is part of GCC. | 6 This file is part of GCC. |
| 7 | 7 |
| 8 GCC is free software; you can redistribute it and/or modify it under | 8 GCC is free software; you can redistribute it and/or modify it under |
| 9 the terms of the GNU General Public License as published by the Free | 9 the terms of the GNU General Public License as published by the Free |
| 10 Software Foundation; either version 3, or (at your option) any later | 10 Software Foundation; either version 3, or (at your option) any later |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 /* Allow even more virtual operators. Max-aliased-vops was set above for | 936 /* Allow even more virtual operators. Max-aliased-vops was set above for |
| 937 -O2, so don't reset it unless we are at -O3. */ | 937 -O2, so don't reset it unless we are at -O3. */ |
| 938 if (opt3) | 938 if (opt3) |
| 939 set_param_value ("max-aliased-vops", 1000); | 939 set_param_value ("max-aliased-vops", 1000); |
| 940 | 940 |
| 941 set_param_value ("avg-aliased-vops", (opt3) ? 3 : initial_avg_aliased_vops); | 941 set_param_value ("avg-aliased-vops", (opt3) ? 3 : initial_avg_aliased_vops); |
| 942 | 942 |
| 943 /* Just -O1/-O0 optimizations. */ | 943 /* Just -O1/-O0 optimizations. */ |
| 944 opt1_max = (optimize <= 1); | 944 opt1_max = (optimize <= 1); |
| 945 align_loops = opt1_max; | 945 align_loops = opt1_max; |
| 946 if (!flag_control_integrity) | |
| 947 { | |
| 948 align_jumps = opt1_max; | 946 align_jumps = opt1_max; |
| 949 align_labels = opt1_max; | 947 align_labels = opt1_max; |
| 950 align_functions = opt1_max; | 948 align_functions = opt1_max; |
| 951 } | |
| 952 | 949 |
| 953 if (optimize_size) | 950 if (optimize_size) |
| 954 { | 951 { |
| 955 /* Inlining of functions reducing size is a good idea regardless of them | 952 /* Inlining of functions reducing size is a good idea regardless of them |
| 956 being declared inline. */ | 953 being declared inline. */ |
| 957 flag_inline_functions = 1; | 954 flag_inline_functions = 1; |
| 958 | 955 |
| 959 /* Basic optimization options. */ | 956 /* Basic optimization options. */ |
| 960 optimize_size = 1; | 957 optimize_size = 1; |
| 961 if (optimize > 2) | 958 if (optimize > 2) |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 flag_sel_sched_pipelining_outer_loops = 0; | 1077 flag_sel_sched_pipelining_outer_loops = 0; |
| 1081 | 1078 |
| 1082 if (!targetm.ira_cover_classes | 1079 if (!targetm.ira_cover_classes |
| 1083 && flag_ira_algorithm == IRA_ALGORITHM_CB) | 1080 && flag_ira_algorithm == IRA_ALGORITHM_CB) |
| 1084 { | 1081 { |
| 1085 inform (input_location, | 1082 inform (input_location, |
| 1086 "-fira-algorithm=CB does not work on this architecture"); | 1083 "-fira-algorithm=CB does not work on this architecture"); |
| 1087 flag_ira_algorithm = IRA_ALGORITHM_PRIORITY; | 1084 flag_ira_algorithm = IRA_ALGORITHM_PRIORITY; |
| 1088 } | 1085 } |
| 1089 | 1086 |
| 1090 /* NativeClient: set the alignment based on command line flags. */ | |
| 1091 if (flag_nacl_align_pow2 != NACL_ALIGN_POW2) | |
| 1092 { | |
| 1093 align_jumps = (1 << flag_nacl_align_pow2); | |
| 1094 align_labels = (1 << flag_nacl_align_pow2); | |
| 1095 align_functions = (1 << flag_nacl_align_pow2); | |
| 1096 } | |
| 1097 | |
| 1098 if (flag_nacl_library_mode) | |
| 1099 { | |
| 1100 align_jumps = 32; | |
| 1101 align_labels = 32; | |
| 1102 align_functions = 32; | |
| 1103 } | |
| 1104 | |
| 1105 /* Save the current optimization options if this is the first call. */ | 1087 /* Save the current optimization options if this is the first call. */ |
| 1106 if (first_time_p) | 1088 if (first_time_p) |
| 1107 { | 1089 { |
| 1108 optimization_default_node = build_optimization_node (); | 1090 optimization_default_node = build_optimization_node (); |
| 1109 optimization_current_node = optimization_default_node; | 1091 optimization_current_node = optimization_default_node; |
| 1110 first_time_p = false; | 1092 first_time_p = false; |
| 1111 } | 1093 } |
| 1112 if (flag_conserve_stack) | 1094 if (flag_conserve_stack) |
| 1113 { | 1095 { |
| 1114 if (!PARAM_SET_P (PARAM_LARGE_STACK_FRAME)) | 1096 if (!PARAM_SET_P (PARAM_LARGE_STACK_FRAME)) |
| (...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2338 diagnostic_classify_diagnostic (global_dc, option_index, kind); | 2320 diagnostic_classify_diagnostic (global_dc, option_index, kind); |
| 2339 | 2321 |
| 2340 /* -Werror=foo implies -Wfoo. */ | 2322 /* -Werror=foo implies -Wfoo. */ |
| 2341 if (cl_options[option_index].var_type == CLVC_BOOLEAN | 2323 if (cl_options[option_index].var_type == CLVC_BOOLEAN |
| 2342 && cl_options[option_index].flag_var | 2324 && cl_options[option_index].flag_var |
| 2343 && kind == DK_ERROR) | 2325 && kind == DK_ERROR) |
| 2344 *(int *) cl_options[option_index].flag_var = 1; | 2326 *(int *) cl_options[option_index].flag_var = 1; |
| 2345 } | 2327 } |
| 2346 free (new_option); | 2328 free (new_option); |
| 2347 } | 2329 } |
| OLD | NEW |