summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Host.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make host ARM CPU feature detection independent of the vendorTobias Grosser2013-06-111-30/+20
| | | | | | | | | | | | For ARM on linux we use /proc/cpuinfo to detect the host CPU's features. Linux derives these values without ever looking at the vendor of the specific CPU implementation. Hence, it adds little value, if we parse the output of /proc/cpuinfo only for certain vendors. This patch enables us to derive the correct feature flags e.g. for Qualcomm CPUs. llvm-svn: 183790
* Allow host triple to be correctly overridden in CMake buildsTim Northover2013-05-041-1/+1
| | | | | | | | | | | The intended semantics mirror autoconf, where the user is able to specify a host triple, but if it's left to the build system then "config.guess" is invoked for the default. This also renames the LLVM_HOSTTRIPLE define to LLVM_HOST_TRIPLE to fit in with the style of the surrounding defines. llvm-svn: 181112
* X86: Add target description for btver2; make autodetection logic aware of AVX.Benjamin Kramer2013-05-031-3/+8
| | | | llvm-svn: 181005
* Testing for _XCR_XFEATURE_ENABLED_MASK instead of a specific MSVC version ↵Aaron Ballman2013-04-231-1/+1
| | | | | | because some MSVC 2010 SP1 installations do not have the _xgetbv intrinsic. Patch thanks to Serge Pavlov! llvm-svn: 180125
* Convert windows line endings to linux/unix line endings.Craig Topper2013-04-221-13/+13
| | | | llvm-svn: 179995
* Ensuring that both bits are set, and not just a combination of one or the other.Aaron Ballman2013-04-031-1/+2
| | | | llvm-svn: 178674
* Testing for Visual Studio 2010 SP1 or greater before calling the _xgetbv ↵Aaron Ballman2013-04-031-2/+2
| | | | | | intrinsic. This also fixes a minor code formatting issue. llvm-svn: 178666
* Second pass at addressing PR15351 by explicitly checking for AVX supportAaron Ballman2013-04-031-2/+25
| | | | | | when getting the host processor information. It emits a .byte sequence on GNUC compilers to work around lack of xgetbv support with older assemblers, and resolves a comment typo found in the previous patch. llvm-svn: 178636
* Rolling back the AVX support patch due to breaking a gcc 4.6 build bot that ↵Aaron Ballman2013-04-031-23/+2
| | | | | | doesn't understand the xgetbv instruction for some reason. Will revisit when time permits. llvm-svn: 178614
* Attempting to fix the build on older GCC versions.Aaron Ballman2013-04-031-1/+2
| | | | llvm-svn: 178604
* This patch addresses PR15351 by explicitly checking for AVX supportAaron Ballman2013-04-031-2/+22
| | | | | | when getting the host processor information. llvm-svn: 178598
* Add support for autodetection of ADM bdver2.Roman Divacky2013-02-261-1/+4
| | | | llvm-svn: 176130
* Introduce llvm::sys::getProcessTriple() function.Peter Collingbourne2013-01-161-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | In r143502, we renamed getHostTriple() to getDefaultTargetTriple() as part of work to allow the user to supply a different default target triple at configure time. This change also affected the JIT. However, it is inappropriate to use the default target triple in the JIT in most circumstances because this will not necessarily match the current architecture used by the process, leading to illegal instruction and other such errors at run time. Introduce the getProcessTriple() function for use in the JIT and its clients, and cause the JIT to use it. On architectures with a single bitness, the host and process triples are identical. On other architectures, the host triple represents the architecture of the host CPU, while the process triple represents the architecture used by the host CPU to interpret machine code within the current process. For example, when executing 32-bit code on a 64-bit Linux machine, the host triple may be 'x86_64-unknown-linux-gnu', while the process triple may be 'i386-unknown-linux-gnu'. This fixes JIT for the 32-on-64-bit (and vice versa) build on non-Apple platforms. Differential Revision: http://llvm-reviews.chandlerc.com/D254 llvm-svn: 172627
* Define getHostCPUFeatures for ARM Linux platformHao Liu2012-12-131-0/+58
| | | | llvm-svn: 170085
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-2/+2
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Add support for Cortex-A15 host recognition.James Molloy2012-10-311-0/+1
| | | | | | No testcase, as this is only testable on a C-A15 board. llvm-svn: 167108
* Add support for detecting some corei7-class Xeons.Benjamin Kramer2012-09-261-0/+2
| | | | llvm-svn: 164714
* Add support for AMD Geode.Roman Divacky2012-09-121-0/+1
| | | | llvm-svn: 163710
* Adds the family codes for the Midview Atom processors so that thePreston Gurd2012-07-191-3/+2
| | | | | | Atom buildbot will auto-detect Atom. llvm-svn: 160521
* This patch fixes 8 out of 20 unexpected failures in "make check"Preston Gurd2012-07-181-0/+3
| | | | | | | | | | | | | | | when run on an Intel Atom processor. The failures have arisen due to changes elsewhere in the trunk over the past 8 weeks or so. These failures were not detected by the Atom buildbot because the CPU on the Atom buildbot was not being detected as an Atom CPU. The fix for this problem is in Host.cpp and X86Subtarget.cpp, but shall remain commented out until the current set of Atom test failures are fixed. Patch by Andy Zhang and Tyler Nowicki! llvm-svn: 160451
* Implement getHostCPUName for ARM/linux. This will be used to implement ↵Benjamin Kramer2012-06-261-0/+55
| | | | | | | | | | -march=native in clang. The cpuid registers are only available in privileged mode so we don't have an OS-independent way of implementing this. ARM doesn't provide a list of processor IDs so the list is somewhat incomplete. llvm-svn: 159228
* Fixes for PPC host detection and features.Hal Finkel2012-06-121-1/+1
| | | | | | | | | POWER4 is a 64-bit CPU (better matched to the 970). The g3 is really the 750 (no altivec), the g4+ is the 74xx (not the 750). Patch by Andreas Tobler. llvm-svn: 158363
* Reapply r158337, this time properly protect Darwin/PPC host CPU use with ↵Hal Finkel2012-06-121-0/+130
| | | | | | | | | | | | | __ppc__. Original commit message: Move PPC host-CPU detection logic from PPCSubtarget into sys::getHostCPUName(). Both the new Linux functionality and the old Darwin functions have been moved. This change also allows this information to be queried directly by clang and other frontends (clang, for example, will now have real -mcpu=native support). llvm-svn: 158349
* Revert r158337 "Move PPC host-CPU detection logic from PPCSubtarget into ↵Jakob Stoklund Olesen2012-06-121-130/+0
| | | | | | | | | sys::getHostCPUName()." This commit broke most of the PowerPC unit tests when running on Intel/Apple. llvm-svn: 158345
* Move PPC host-CPU detection logic from PPCSubtarget into sys::getHostCPUName().Hal Finkel2012-06-111-0/+130
| | | | | | | | Both the new Linux functionality and the old Darwin functions have been moved. This change also allows this information to be queried directly by clang and other frontends (clang, for example, will now have real -mcpu=native support). llvm-svn: 158337
* Use the cpuid 64 bit flag to pick the default CPU name for an unknown model.Bob Wilson2012-05-091-1/+1
| | | | | | | | | | | For the Family 6 switch in sys::getHostCPUName, an unrecognized model was reported as "i686". That's a really bad default since it means that new CPUs will be treated as if they can only use 32-bit code. This just looks at the cpuid extended feature flag for 64 bit support, and if that is set, it uses a default x86-64 cpu. Similar logic is already used for the Family 15 code. <rdar://problem/11314502> llvm-svn: 156486
* Change the Intel Atom detection code to recognizePreston Gurd2012-05-021-2/+3
| | | | | | Lincroft and Medfield. llvm-svn: 156025
* Add a missing cpu subtype.Evan Cheng2012-04-231-0/+4
| | | | llvm-svn: 155402
* Remove unreachable code. (replace with llvm_unreachable to help GCC where ↵David Blaikie2012-01-171-1/+8
| | | | | | necessary) llvm-svn: 148284
* Add definitions for AMD's bobcat (aka btver1)Benjamin Kramer2012-01-101-0/+2
| | | | llvm-svn: 147846
* Autodetect bulldozers.Benjamin Kramer2011-12-011-0/+2
| | | | llvm-svn: 145607
* Intel family 6 model 44 is Gulftown/Westmere-EP and doesn't have AVX.Benjamin Kramer2011-08-251-2/+2
| | | | llvm-svn: 138573
* Update comments for SandyBridge CPU identifiers.Bob Wilson2011-07-081-2/+6
| | | | llvm-svn: 134759
* Recognize Intel CPUs with Family=6 and Model=44.Bob Wilson2011-07-081-0/+1
| | | | | | | | According to Intel Application Note 485, this value is used for "Intel Core i7 and Intel Xeon processor". Just include it with the other "corei7-avx" entries. llvm-svn: 134750
* add another sandybridge alias.Chris Lattner2011-06-091-0/+1
| | | | llvm-svn: 132772
* Rename the "sandybridge" subtarget to "corei7-avx", for GCC compatibility.Benjamin Kramer2011-05-201-1/+1
| | | | llvm-svn: 131730
* Add support for detection of Intel SandyBridge.Roman Divacky2011-04-051-0/+2
| | | | llvm-svn: 128920
* Merge System into Support.Michael J. Spencer2010-11-291-0/+307
llvm-svn: 120298
OpenPOWER on IntegriCloud