Hi Andrew, sorry for replying only now but yesterday was public holiday here and I am still only in the process of recovering from a long weekend.
While the only objection I have is the C++ style comment in config/gcn/gcn.c, another problem, for me at least... On Fri, Apr 28, 2017 at 06:06:39PM +0100, Andrew Stubbs wrote: > This patch, for the "gcn" branch, does three things: > > 1. Add specs to drive the LLVM assembler and linker. It requires them to be > installed as "as" and "ld", under $target/bin, but then the compiler Just > Works with these specs. ...is that I do not have llvm linker at hand and without it I did not manage to make the patch produce loadable code. Because ROCm 1.5 has been released today, I will update our environment, which is a bit obsolete, get llvm ld and try again. This might take me a few days, so please bear with me for a little more, I would like to make sure it works on carrizos. Thanks, Martin > > 2. Switch to HSACO format version 2, and have the assembler auto-set the > architecture flags from -mcpu. This means the amdphdr utility is no longer > required. > > 3. Add -mgpu option and corresponding --with-gpu. I've deliberately used > "gpu" instead of "cpu" because I want offloading compilers to be able to say > "-mcpu=foo -foffload=-mgpu=bar", or even have the host compiler just > understand -mgpu and DTRT. > > The patch also removes the unused and unwritten "arch" and "tune" settings. > They can be added back when useful, but the assembler requires a GPU name, I > think, so we need that as input. > > OK to commit to GCN branch? > 2017-04-28 Andrew Stubbs <a...@codesourcery.com> > > gcc/ > * config.gcc (amdgcn): Remove --with-arch and --with-tune. > Add --with-gpu, and set default to "carrizo" > (add_defaults): Add "gpu". > * config/gcn/gcn-opts.h: New file. > * config/gcn/gcn.c (output_file_start): Switch to HSACO version > 2 and auto-detection of GPU type (from -mcpu). > (gcn_arch, gcn_tune): Remove. > * config/gcn/gcn.h: Include gcn-opts.h. > (enum processor_type): Move to gcn-opts.h. > (LIBGCC_SPEC, ASM_SPEC, LINK_SPEC): Define. > (gcn_arch, gcn_tune): Remove. > (OPTION_DEFAULT_SPECS): Remove "arch" and "tune"; add "gpu". > * config/gcn/gcn.opt: Include gcn-opts.h. > (gpu_type): New Enum. > (mgpu): New option. >