[AArch64][3/14] Refactor option override code
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Tue, 4 Aug 2015 09:52:52 +0000 (09:52 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Tue, 4 Aug 2015 09:52:52 +0000 (09:52 +0000)
commit0cfff2a1d966f7c5eebd6b94b214101ca67c6895
treea4b781bbb05b0a75112f6fd7881a81d05559c02d
parent393ae126e488d3b8d7f6f650752e7f26a2feb2ce
[AArch64][3/14] Refactor option override code

* config/aarch64/aarch64.opt (aarch64_arch_string): Delete.
(aarch64_cpu_string): Likewise.
(aarch64_tune_string): Likewise.
* config/aarch64/aarch64.c (aarch64_parse_opt_result): New enum.
(aarch64_parse_extension): Return aarch64_parse_opt_result.
Add extra argument to put result into.
(aarch64_parse_arch): Likewise.  Do not set selected_cpu.
(aarch64_parse_cpu): Add arguments to put results into. Return
aarch64_parse_opt_result.
(aarch64_parse_tune): Likewise.
(aarch64_override_options_after_change_1): New function.
(aarch64_override_options_internal): New function.
(aarch64_validate_mcpu): Likewise.
(aarch64_validate_march): Likewise.
(aarch64_validate_mtune): Likewise.
(aarch64_override_options): Update to reflect above changes.
Move some logic into aarch64_override_options_internal.
Initialize target_option_default_node and target_option_current_node.
(aarch64_override_options_after_change): Move logic into
aarch64_override_options_after_change_1 and call it with global_options.
(initialize_aarch64_code_model): Take a gcc_options pointer and use the
flag values from that.

* gcc.target/aarch64/cpu-diagnostics-3.c: Update expected error
message.

From-SVN: r226554
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/aarch64.opt
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-3.c