summaryrefslogtreecommitdiff
path: root/lib/Support/Host.cpp
Commit message (Collapse)AuthorAge
* Add support for ppc64/power8 as a hostWill Schmidt2014-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211781 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix .cpp files claiming to be header filesHans Wennborg2014-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211334 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typosAlp Toker2014-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209982 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixup sys::getHostCPUFeatures crypto names so it doesn't clash with kernel ↵Bradley Smith2014-05-23
| | | | | | headers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209506 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend sys::getHostCPUFeatures to work on AArch64 platformsBradley Smith2014-05-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209420 91177308-0d34-0410-b5e6-96231b3b80d8
* Select bdver2 instead of bdver1 if TBM support is present on models < 0x10.Kaelyn Takata2014-05-05
| | | | | | | | | | Tested that the right -target-cpu is set in the clang -cc1 command line when running "clang -march=native -E -v - </dev/null" on both an FX-8150 and an FX-8350. Both are family 15h; the FX-8150 (Bulldozer processor) reports a model number of 1, and the FX-8350 (Piledriver processor) reports a model number of 2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207973 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a description for AMD's bdver4 (aka Excavator).Benjamin Kramer2014-05-02
| | | | | | This is just bdver3 + AVX2 + BMI2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207847 91177308-0d34-0410-b5e6-96231b3b80d8
* [Modules] Followup to r206822 to add a DEBUG_TYPE which is used on ARMChandler Carruth2014-04-21
| | | | | | and PPC, but not x86. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206830 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for krait cpu in llvm::sys::getHostCPUName()Kai Nacke2013-12-20
| | | | | | | Recently, support for krait cpu was added. This commit extends getHostCPUName() to return krait as cpu for the APQ8064 (a Krait 300). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197792 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Typo.Rafael Espindola2013-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197168 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the other getHostByName implementations to StringRef.Rafael Espindola2013-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197166 91177308-0d34-0410-b5e6-96231b3b80d8
* Return a StringRef from getHostCPUName.Rafael Espindola2013-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197158 91177308-0d34-0410-b5e6-96231b3b80d8
* Make helper function static.Benjamin Kramer2013-11-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195650 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: enable AVX2 under Haswell native compilationTim Northover2013-11-25
| | | | | | Patch by Adam Strzelecki git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195632 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: Add a description for AMD bdver3 aka Steamroller.Benjamin Kramer2013-11-04
| | | | | | This is just bdver2 + FSGSBase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193984 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Automatically detect zEC12 and z196 hostsRichard Sandiford2013-10-31
| | | | | | | | | | | As on other hosts, the CPU identification instruction is priveleged, so we need to look through /proc/cpuinfo. I copied the PowerPC way of handling "generic". Several tests were implicitly assuming z10 and so failed on z196. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193742 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds support for Atom Silvermont (SLM) - -march=slmPreston Gurd2013-09-13
| | | | | | | | | | | | | | Implements Instruction scheduler latencies for Silvermont, using latencies from the Intel Silvermont Optimization Guide. Auto detects SLM. Turns on post RA scheduler when generating code for SLM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190717 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: Add a description of the Intel Atom Silvermont CPU.Benjamin Kramer2013-08-30
| | | | | | Currently this is just the atom model with SSE4.2 enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189669 91177308-0d34-0410-b5e6-96231b3b80d8
* Actually, use GNU inline asm for cpuid with clangReid Kleckner2013-08-16
| | | | | | | Clang doesn't support the MSVC __cpuid intrinsic yet, and fixing that is blocked on some fairly complicated issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188584 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the MSVC __cpuid intrinsic instead of inline asmReid Kleckner2013-08-14
| | | | | | This works around PR16830 in LLVM when self-hosting clang on Windows. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188397 91177308-0d34-0410-b5e6-96231b3b80d8
* Some Intel Penryn CPUs come with SSE4 disabled. Detect them as core 2.Benjamin Kramer2013-07-29
| | | | | | PR16721. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187350 91177308-0d34-0410-b5e6-96231b3b80d8
* Ensure sys::getProcessTriple always uses a normalized triple. Patch byDuncan Sands2013-07-17
| | | | | | | Thomas B. Jablin, from PR16636. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186501 91177308-0d34-0410-b5e6-96231b3b80d8
* Make host ARM CPU feature detection independent of the vendorTobias Grosser2013-06-11
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183790 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow host triple to be correctly overridden in CMake buildsTim Northover2013-05-04
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181112 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: Add target description for btver2; make autodetection logic aware of AVX.Benjamin Kramer2013-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181005 91177308-0d34-0410-b5e6-96231b3b80d8
* Testing for _XCR_XFEATURE_ENABLED_MASK instead of a specific MSVC version ↵Aaron Ballman2013-04-23
| | | | | | because some MSVC 2010 SP1 installations do not have the _xgetbv intrinsic. Patch thanks to Serge Pavlov! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180125 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert windows line endings to linux/unix line endings.Craig Topper2013-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179995 91177308-0d34-0410-b5e6-96231b3b80d8
* Ensuring that both bits are set, and not just a combination of one or the other.Aaron Ballman2013-04-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178674 91177308-0d34-0410-b5e6-96231b3b80d8
* Testing for Visual Studio 2010 SP1 or greater before calling the _xgetbv ↵Aaron Ballman2013-04-03
| | | | | | intrinsic. This also fixes a minor code formatting issue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178666 91177308-0d34-0410-b5e6-96231b3b80d8
* Second pass at addressing PR15351 by explicitly checking for AVX supportAaron Ballman2013-04-03
| | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178636 91177308-0d34-0410-b5e6-96231b3b80d8
* Rolling back the AVX support patch due to breaking a gcc 4.6 build bot that ↵Aaron Ballman2013-04-03
| | | | | | doesn't understand the xgetbv instruction for some reason. Will revisit when time permits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178614 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempting to fix the build on older GCC versions.Aaron Ballman2013-04-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178604 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch addresses PR15351 by explicitly checking for AVX supportAaron Ballman2013-04-03
| | | | | | when getting the host processor information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178598 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for autodetection of ADM bdver2.Roman Divacky2013-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176130 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce llvm::sys::getProcessTriple() function.Peter Collingbourne2013-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172627 91177308-0d34-0410-b5e6-96231b3b80d8
* Define getHostCPUFeatures for ARM Linux platformHao Liu2012-12-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170085 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-03
| | | | | | | | | | | | | | | | | 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. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for Cortex-A15 host recognition.James Molloy2012-10-31
| | | | | | | | No testcase, as this is only testable on a C-A15 board. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167108 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for detecting some corei7-class Xeons.Benjamin Kramer2012-09-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164714 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for AMD Geode.Roman Divacky2012-09-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163710 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds the family codes for the Midview Atom processors so that thePreston Gurd2012-07-19
| | | | | | | | Atom buildbot will auto-detect Atom. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160521 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch fixes 8 out of 20 unexpected failures in "make check"Preston Gurd2012-07-18
| | | | | | | | | | | | | | | | | 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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160451 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement getHostCPUName for ARM/linux. This will be used to implement ↵Benjamin Kramer2012-06-26
| | | | | | | | | | -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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159228 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes for PPC host detection and features.Hal Finkel2012-06-12
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158363 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r158337, this time properly protect Darwin/PPC host CPU use with ↵Hal Finkel2012-06-12
| | | | | | | | | | | | | __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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158349 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r158337 "Move PPC host-CPU detection logic from PPCSubtarget into ↵Jakob Stoklund Olesen2012-06-12
| | | | | | | | | sys::getHostCPUName()." This commit broke most of the PowerPC unit tests when running on Intel/Apple. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158345 91177308-0d34-0410-b5e6-96231b3b80d8
* Move PPC host-CPU detection logic from PPCSubtarget into sys::getHostCPUName().Hal Finkel2012-06-11
| | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158337 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the cpuid 64 bit flag to pick the default CPU name for an unknown model.Bob Wilson2012-05-09
| | | | | | | | | | | 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> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156486 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the Intel Atom detection code to recognizePreston Gurd2012-05-02
| | | | | | | | Lincroft and Medfield. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156025 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a missing cpu subtype.Evan Cheng2012-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155402 91177308-0d34-0410-b5e6-96231b3b80d8