[PATCH] D14661: [ARM] Allow TargetParser to accurately target architectures
Bradley Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 13 09:32:20 PST 2015
bsmith created this revision.
bsmith added a reviewer: rengolin.
bsmith added a subscriber: llvm-commits.
bsmith set the repository for this revision to rL LLVM.
Herald added subscribers: rengolin, aemerson.
This patch changes the TargetParser to properly handle the generic CPU.
Currently generic is handled by having a row in the CPU lists mapping it to ARMv8.1-A since this is the only architecture without a supported CPU. There are two problems with this. Firstly, it stops us from properly targeting architectures, we would ideally like -mcpu=generic to mean target the specified architecture, rather than ARMv8.1-A. Secondly, it prevents us from having more than one architecture in the TargetParser without a supported CPU, whilst the CPU list will allow multiple 'generic' entries, the TargetParser iterates through the list finding only a first one, never a second.
To achieve this change we add a default FPU for each architecture, so that we can fall back to it when the CPU is generic. We also change the API such that an architecture is specified for fetching of defaults for extensions and FPU, for use when a generic CPU is specified.
To co-inside with the generic support improved in D14660 we also default to 'generic' instead of an empty string in the cases of no valid default CPU being found but the architecture is valid.
Repository:
rL LLVM
http://reviews.llvm.org/D14661
Files:
include/llvm/Support/ARMTargetParser.def
include/llvm/Support/TargetParser.h
lib/Support/TargetParser.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14661.40157.patch
Type: text/x-patch
Size: 7882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151113/351aa420/attachment.bin>
More information about the llvm-commits
mailing list