aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-03-29 10:32:13 +0200
committerTom de Vries <tdevries@suse.de>2022-03-29 14:00:25 +0200
commitde0ef04419e90eacf0d1ddb265552a1b08c18d4b (patch)
tree74ab9cacca608e723dd32f40da34d4d644f8927d /gcc/tree.h
parent871266756c7aa6a68e36b89d8d56e3fa593cca5b (diff)
downloadgcc-de0ef04419e90eacf0d1ddb265552a1b08c18d4b.zip
gcc-de0ef04419e90eacf0d1ddb265552a1b08c18d4b.tar.gz
gcc-de0ef04419e90eacf0d1ddb265552a1b08c18d4b.tar.bz2
[nvptx] Add march-map
Say we have an sm_50 board, and we want to run a benchmark using the highest possible march setting. Currently there's march=sm_30, march=sm_35, march=sm_53, but no march=sm_50. So, we'd need to pick march=sm_35. Likewise, for a test script that handles multiple boards, we'd need a mapping from native board sm_xx to march, which might have to be updated with newer gcc releases. Add an option march-map, such that we can just specify march-map=sm_50, and let the compiler map this to the appropriate march. The option is implemented as a list of aliases, such that we have a somewhat lengthy (17 lines in total): ... $ gcc --help=target ... -march-map=sm_30 Same as -misa=sm_30. -march-map=sm_32 Same as -misa=sm_30. ... -march-map=sm_87 Same as -misa=sm_80. -march-map=sm_90 Same as -misa=sm_80. ... This implementation was chosen in the hope that it'll be easier if we end up with some misa multilib. It would be nice to have the mapping list generated from an updated nvptx-sm.def, but for now it's spelled out in nvptx.opt. Tested on nvptx. gcc/ChangeLog: 2022-03-29 Tom de Vries <tdevries@suse.de> PR target/104714 * config/nvptx/nvptx.opt (march-map=*): Add aliases. gcc/testsuite/ChangeLog: 2022-03-29 Tom de Vries <tdevries@suse.de> PR target/104714 * gcc.target/nvptx/march-map.c: New test.
Diffstat (limited to 'gcc/tree.h')
0 files changed, 0 insertions, 0 deletions