summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/TargetSelect.cpp
Commit message (Collapse)AuthorAge
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-15
| | | | | | instead of comparing to nullptr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206252 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up some usage of Triple. The base class has methods for determining ↵Cameron Esfahani2013-08-29
| | | | | | if the target is iOS and Linux. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189604 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable FastISel on ARM for Linux and NaCl, not MCJITJF Bastien2013-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a resubmit of r182877, which was reverted because it broken MCJIT tests on ARM. The patch leaves MCJIT on ARM as it was before: only enabled for iOS. I've CC'ed people from the original review and revert. FastISel was only enabled for iOS ARM and Thumb2, this patch enables it for ARM (not Thumb2) on Linux and NaCl, but not MCJIT. Thumb2 support needs a bit more work, mainly around register class restrictions. The patch punts to SelectionDAG when doing TLS relocation on non-Darwin targets. I will fix this and other FastISel-to-SelectionDAG failures in a separate patch. The patch also forces FastISel to retain frame pointers: iOS always keeps them for backtracking (so emitted code won't change because of this), but Linux was getting much worse code that was incorrect when using big frames (such as test-suite's lencod). I'll also fix this in a later patch, it will probably require a peephole so that FastISel doesn't rematerialize frame pointers back-to-back. The test changes are straightforward, similar to: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130513/174279.html They also add a vararg test that got dropped in that change. I ran all of lnt test-suite on A15 hardware with --optimize-option=-O0 and all the tests pass. All the tests also pass on x86 make check-all. I also re-ran the check-all tests that failed on ARM, and they all seem to pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183966 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
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-02
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust JIT target triple on OS X to match the current architecture.Bob Wilson2012-12-05
| | | | | | | | | For OS X builds, we generate one version of config.h but then build for multiple architectures. This means that the LLVM_HOSTTRIPLE setting may have the wrong architecture. Adjust it dynamically to match the current architecture. <rdar://problem/12715470> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169405 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
* Support for generating ELF objects on Windows.Andrew Kaylor2012-10-02
| | | | | | This adds 'elf' as a recognized target triple environment value and overrides the default generated object format on Windows platforms if that value is present. This patch also enables MCJIT tests on Windows using the new environment value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165030 91177308-0d34-0410-b5e6-96231b3b80d8
* ExecutionEngine/TargetSelect.cpp: Override default triple as LLVM_HOSTTRIPLE.NAKAMURA Takumi2012-07-22
| | | | | | In current implementation, JIT should run only on host. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160610 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it so that the MArch, MCPU, MAttrs passed to EngineBuilder are actually ↵Owen Anderson2012-05-21
| | | | | | | | | used. Patch by Jose Fonseca. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157191 91177308-0d34-0410-b5e6-96231b3b80d8
* ExecutionEngine: Check for NULL ErrorStr before using it.Jim Grosbach2012-05-10
| | | | | | Patch by Yury Mikhaylov <yury.mikhaylov@gmail.com>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156523 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it feasible for clients using EngineBuilder to capture the ↵Owen Anderson2012-03-23
| | | | | | | | | TargetMachine that is created as part of selecting the appropriate target. This is necessary if the client wants to be able to mutate TargetOptions (for example, fast FP math mode) after the initial creation of the ExecutionEngine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153342 91177308-0d34-0410-b5e6-96231b3b80d8
* ExecutionEngine: refactor interfaceDylan Noblesmith2011-12-12
| | | | | | | | The OptLevel is now redundant with the TargetMachine*. And selectTarget() isn't really JIT-specific and could probably get refactored into one of the lower level libraries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146355 91177308-0d34-0410-b5e6-96231b3b80d8
* EngineBuilder: support for custom TargetOptions. Fixes thePeter Collingbourne2011-12-07
| | | | | | ExceptionDemo example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146108 91177308-0d34-0410-b5e6-96231b3b80d8
* Move global variables in TargetMachine into new TargetOptions class. As an APINick Lewycky2011-12-02
| | | | | | | | | | | | | change, now you need a TargetOptions object to create a TargetMachine. Clang patch to follow. One small functionality change in PTX. PTX had commented out the machine verifier parts in their copy of printAndVerify. That now calls the version in LLVMTargetMachine. Users of PTX who need verification disabled should rely on not passing the command-line flag to enable it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145714 91177308-0d34-0410-b5e6-96231b3b80d8
* ExecutionEngine: honor optimization levelDylan Noblesmith2011-12-01
| | | | | | | | | | It was getting ignored after r144788. Also fix an accidental implicit cast from the OptLevel enum to an optional bool argument. MSVC warned on this, but gcc didn't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145633 91177308-0d34-0410-b5e6-96231b3b80d8
* rename getHostTriple into getDefaultTargetTripleSebastian Pop2011-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143502 91177308-0d34-0410-b5e6-96231b3b80d8
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-24
| | | | | | | These are strictly utilities for registering targets and components. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138450 91177308-0d34-0410-b5e6-96231b3b80d8
* - Move CodeModel from a TargetMachine global option to MCCodeGenInfo.Evan Cheng2011-07-20
| | | | | | | | | - Introduce JITDefault code model. This tells targets to set different default code model for JIT. This eliminates the ugly hack in TargetMachine where code model is changed after construction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135580 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce MCCodeGenInfo, which keeps information that can affect codegenEvan Cheng2011-07-19
| | | | | | | | (including compilation, assembly). Move relocation model Reloc::Model from TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135468 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the ridiculous SubtargetFeatures API where it implicitly expects CPU name toEvan Cheng2011-06-30
| | | | | | | | | | | be the first encoded as the first feature. It then uses the CPU name to look up features / scheduling itineray even though clients know full well the CPU name being used to query these properties. The fix is to just have the clients explictly pass the CPU name! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134127 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink SubtargetFeature and TargetInstrItineraries (renamed ↵Evan Cheng2011-06-29
| | | | | | MCInstrItineraries) into MC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134049 91177308-0d34-0410-b5e6-96231b3b80d8
* ExecutionEngine: fix JIT/MCJIT selectTarget() duplication (v2)Dylan Noblesmith2011-05-13
| | | | | | | | | This prepares for making JITCtor/MCJITCtor take a TargetMachine* directly from clients like EngineBuilder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131316 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert ExecutionEngine patches, they either failed to build or broke unit tests.Jakob Stoklund Olesen2011-05-07
| | | | | | Please ensure the build is clean and tests are passing when recommitting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131044 91177308-0d34-0410-b5e6-96231b3b80d8
* ExecutionEngine: add missing fileDylan Noblesmith2011-05-06
From revision 131025. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131029 91177308-0d34-0410-b5e6-96231b3b80d8