mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-16 11:24:39 +00:00
Make llc use getHostCPUFeatures when 'native' is specified for cpu.
This is necessary for x86 where not all Sandybridge, Ivybrige, Haswell, and Broadwell CPUs support AVX. Currently we modify the CPU name back to Nehalem for this case, but that turns off additional features for these CPUs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233673 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -81,11 +81,12 @@ static std::string Join(const std::vector<std::string> &V) {
|
||||
}
|
||||
|
||||
/// Adding features.
|
||||
void SubtargetFeatures::AddFeature(StringRef String) {
|
||||
void SubtargetFeatures::AddFeature(StringRef String, bool Enable) {
|
||||
// Don't add empty features.
|
||||
if (!String.empty())
|
||||
// Convert to lowercase, prepend flag if we don't already have a flag.
|
||||
Features.push_back(hasFlag(String) ? String.lower() : "+" + String.lower());
|
||||
Features.push_back(hasFlag(String) ? String.lower()
|
||||
: (Enable ? "+" : "-") + String.lower());
|
||||
}
|
||||
|
||||
/// Find KV in array using binary search.
|
||||
|
Reference in New Issue
Block a user