aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-dfa.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2017-02-09 00:34:00 +0000
committerAndrew Burgess <aburgess@gcc.gnu.org>2017-02-09 00:34:00 +0000
commitc3bde35a56de3692c3b61caa0340dc80ee5abfcc (patch)
treef4c0cbf7ef5494a5b18c16e139c14879568096db /gcc/tree-dfa.c
parent5896a41da8cb6cd887d9af86d81047e38c3df4f1 (diff)
downloadgcc-c3bde35a56de3692c3b61caa0340dc80ee5abfcc.zip
gcc-c3bde35a56de3692c3b61caa0340dc80ee5abfcc.tar.gz
gcc-c3bde35a56de3692c3b61caa0340dc80ee5abfcc.tar.bz2
gcc/arc: Make arc_selected_cpu global
Currently we only make the base_architecture globally available, this means we can tell if we have selected arc700/archs/etc but it's not possible to tell if the user has selected a specific cpu variant, for example nps400. One problem this causes is, for example, in arc-c.def, if we want to add an __NPS400__ define then we need a flag we can check to determine if this is the right thing to do. In this commit the arc_selected_cpu variable (previously local within arc.c) has been made global. Two other variables arc_base_cpu and arc_selected_arch have been deleted, all of this information can be found within (or through) arc_selected_cpu. All uses of arc_base_cpu and arc_selected_arch have been updated. This commit does not introduce any new defines (like __NPS400__), this is just a restructuring commit. The declaration of arc_selected_cpu has moved into arc-arch.h, in contrast to the declaration of arc_base_cpu which was previously in arc.h. This avoids a compilation issue when building libgcc, as the structure and enums declared in arc-arch.h are not included for libgcc then declaring an arc_selected_cpu (a struct type) in arc.h would result in an unknown struct error. We got away with this for arc_base_cpu as that was an enum type. The declaration of arc_selected_cpu in arc.h could have been wrapped in a '#ifndef IN_LIBGCC2 ... #endif', but it felt neater to simply move the declaration into arc-arch.h. gcc/ChangeLog: * config/arc/arc-arch.h (arc_arch_t): Move unchanged to earlier in file. (arc_cpu_t): Change base_architecture field, arch, to a arc_arc_t pointer, arch_info. (arc_cpu_types): Fill the arch_info field with a pointer into the arc_arch_types table. (arc_selected_cpu): Declare. * config/arc/arc.c (arc_selected_cpu): Make global. (arc_selected_arch): Delete. (arc_base_cpu): Delete. (arc_override_options): Remove references to deleted variables, update access to arch information. (ARC_OPT): Update access to arch information. (ARC_OPTX): Likewise. * config/arc/arc.h (arc_base_cpu): Remove declaration. (TARGET_ARC600): Update access to arch information. (TARGET_ARC601): Likewise. (TARGET_ARC700): Likewise. (TARGET_EM): Likewise. (TARGET_HS): Likewise. * config/arc/driver-arc.c (arc_cpu_to_as): Update access to arch information. From-SVN: r245293
Diffstat (limited to 'gcc/tree-dfa.c')
0 files changed, 0 insertions, 0 deletions