summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix various issues (or do cleanups) found by enabling certain MSVC warnings.Ahmed Charles2012-02-131-1/+0
| | | | | | | | | - Use unsigned literals when the desired result is unsigned. This mostly allows unsigned/signed mismatch warnings to be less noisy even if they aren't on by default. - Remove misplaced llvm_unreachable. - Add static to a declaration of a function on MSVC x86 only. - Change some instances of calling a static function through a variable to simply calling that function while removing the unused variable. llvm-svn: 150364
* Expose the ELFObjectFile class directly in the Object/ELF.h header, similarlyEli Bendersky2012-02-121-0/+388
| | | | | | | | | | to what's done for MachO and COFF. This allows advanced uses of the class to be implemented outside the Object library. In particular, the DyldELFObject subclass is now moved into its logical home - ExecutionEngine/RuntimeDyld. This patch was reviewed by Michael Spencer. llvm-svn: 150327
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-076-19/+12
| | | | llvm-svn: 149967
* [unwind removal] We no longer have 'unwind' instructions being generated, soBill Wendling2012-02-062-19/+0
| | | | | | remove the code that handles them. llvm-svn: 149901
* Explain to the compiler why TargetAddr is not used uninitialized later.Duncan Sands2012-02-051-2/+2
| | | | llvm-svn: 149832
* Add a new MachineJumpTableInfo entry type, EK_GPRel64BlockAddress, which isAkira Hatanaka2012-02-031-0/+3
| | | | | | | | needed to emit a 64-bit gp-relative relocation entry. Make changes necessary for emitting jump tables which have entries with directive .gpdword. This patch does not implement the parts needed for direct object emission or JIT. llvm-svn: 149668
* SwitchInst refactoring.Stepan Dyatkovskiy2012-02-011-2/+2
| | | | | | | | | | | | | | | | | The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want. What was done: 1. Changed semantics of index inside the getCaseValue method: getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous. 2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned. 3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment. 4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst. 4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor. 4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor. Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang. llvm-svn: 149481
* add more support for ConstantDataSequentialChris Lattner2012-01-241-11/+27
| | | | llvm-svn: 148802
* Remove extraneous ';'s.Bill Wendling2012-01-231-1/+1
| | | | llvm-svn: 148740
* Split the lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h header to ↵Eli Bendersky2012-01-226-135/+373
| | | | | | | | | | smaller logical headers. ELF and MachO implementations of RuntimeDyldImpl go into their own header files now. Reviewed on llvm-commits llvm-svn: 148652
* RuntimeDyld alignment adjustment from MachO file.Jim Grosbach2012-01-211-2/+4
| | | | | | | | The MachO file stores section alignment as log2(alignment-in-bytes). The allocation routines want the raw alignment-in-bytes value, so adjust for that. llvm-svn: 148604
* Fix inverted condition.Jim Grosbach2012-01-201-1/+1
| | | | llvm-svn: 148593
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-206-8/+0
| | | | llvm-svn: 148578
* Fix MCJIT memory leak of owned TargetMachine.Jim Grosbach2012-01-171-0/+1
| | | | | | | The JIT is expected to take ownership of the TM that's passed in. The MCJIT wasn't freeing it, resulting in leaks. llvm-svn: 148356
* Tidy up.Jim Grosbach2012-01-164-5/+5
| | | | llvm-svn: 148265
* ExecutionEngine interface to re-map addresses for engines that support it.Jim Grosbach2012-01-164-1/+31
| | | | llvm-svn: 148264
* MCJIT handle a few more simple x86 relocations for MachO.Jim Grosbach2012-01-161-4/+5
| | | | llvm-svn: 148263
* MCJIT support for non-function sections.Jim Grosbach2012-01-166-266/+447
| | | | | | | | | | | | | | | | Move to a by-section allocation and relocation scheme. This allows better support for sections which do not contain externally visible symbols. Flesh out the relocation address vs. local storage address separation a bit more as well. Remote process JITs use this to tell the relocation resolution code where the code will live when it executes. The startFunctionBody/endFunctionBody interfaces to the JIT and the memory manager are deprecated. They'll stick around for as long as the old JIT does, but the MCJIT doesn't use them anymore. llvm-svn: 148258
* A fix for the previous commit: "integer constant is too large for ‘long’ ↵Eli Bendersky2012-01-161-2/+2
| | | | | | type" error on some 32-bit bots llvm-svn: 148232
* Adding a basic ELF dynamic loader and MC-JIT for ELF. Functionality is ↵Eli Bendersky2012-01-164-5/+373
| | | | | | | | currently basic and will be enhanced with future patches. Patch developed by Andy Kaylor and Daniel Malea. Reviewed on llvm-commits. llvm-svn: 148231
* Fix typo in stringEli Bendersky2012-01-061-1/+1
| | | | llvm-svn: 147654
* Remove the old ELF writer.Rafael Espindola2012-01-054-355/+3
| | | | llvm-svn: 147615
* A small re-factored JIT/MCJIT::getPointerToNamedFunction(), so it could be ↵Danil Malyshev2012-01-053-4/+10
| | | | | | called with the base class. llvm-svn: 147610
* Fix up the CMake build for the new files added in r146960, they'reChandler Carruth2011-12-201-0/+1
| | | | | | likely to stay either way that discussion ends up resolving itself. llvm-svn: 146966
* Unweaken vtables as per ↵David Blaikie2011-12-202-0/+15
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146960
* LLVMBuild: Introduce a common section which currently has a list of theDaniel Dunbar2011-12-121-0/+3
| | | | | | | | | | | subdirectories to traverse into. - Originally I wanted to avoid this and just autoscan, but this has one key flaw in that new subdirectories can not automatically trigger a rerun of the llvm-build tool. This is particularly a pain when switching back and forth between trees where one has added a subdirectory, as the dependencies will tend to be wrong. This will also eliminates FIXME implicitly. llvm-svn: 146436
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-125-5/+0
| | | | llvm-svn: 146409
* ExecutionEngine: refactor interfaceDylan Noblesmith2011-12-126-35/+28
| | | | | | | | 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. llvm-svn: 146355
* EngineBuilder: support for custom TargetOptions. Fixes thePeter Collingbourne2011-12-072-2/+5
| | | | | | ExceptionDemo example. llvm-svn: 146108
* Add bundle aware API for querying instruction properties and switch the codeEvan Cheng2011-12-071-1/+1
| | | | | | | | | | | | | | generator to it. For non-bundle instructions, these behave exactly the same as the MC layer API. For properties like mayLoad / mayStore, look into the bundle and if any of the bundled instructions has the property it would return true. For properties like isPredicable, only return true if *all* of the bundled instructions have the property. For properties like canFoldAsLoad, isCompare, conservatively return false for bundles. llvm-svn: 146026
* Move global variables in TargetMachine into new TargetOptions class. As an APINick Lewycky2011-12-023-5/+13
| | | | | | | | | | | | 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. llvm-svn: 145714
* ExecutionEngine: honor optimization levelDylan Noblesmith2011-12-013-8/+9
| | | | | | | | | | 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. llvm-svn: 145633
* build/CMake: Finish removal of add_llvm_library_dependencies.Daniel Dunbar2011-11-295-38/+0
| | | | llvm-svn: 145420
* Sink codegen optimization level into MCCodeGenInfo along side relocation modelEvan Cheng2011-11-161-1/+1
| | | | | | | and code model. This eliminates the need to pass OptLevel flag all over the place and makes it possible for any codegen pass to use this information. llvm-svn: 144788
* Remove all remaining uses of Value::getNameStr().Benjamin Kramer2011-11-152-4/+5
| | | | llvm-svn: 144648
* Fixed the MCJIT so that it can emit not only instanceSean Callanan2011-11-121-6/+6
| | | | | | | | | | | | | | methods but also class methods for Objective-C. Clang emits Objective-C method names with '\1' at the beginning, and the JIT has pre-existing logic to try prepending a '\1' when searching a module for an instance method (that is, a method whose name begins with '-'). I simply extended it to do the same thing when it encountered a class method (a method whose name begins with '+'). llvm-svn: 144451
* build: Attempt to rectify inconsistencies between CMake and LLVMBuild ↵Daniel Dunbar2011-11-122-2/+3
| | | | | | | | versions of explicit dependencies. - The hope is that we have a tool/test to verify these are accurate (and tight) soon. llvm-svn: 144444
* build: Add initial cut at LLVMBuild.txt files.Daniel Dunbar2011-11-035-0/+115
| | | | llvm-svn: 143634
* rename getHostTriple into getDefaultTargetTripleSebastian Pop2011-11-011-1/+1
| | | | llvm-svn: 143502
* Ignore MachO symbol flags in the upper nibble of n_desc.Jim Grosbach2011-11-011-2/+4
| | | | | | They don't impact the MCJIT rtdyld, so just mask them off for now. llvm-svn: 143472
* Adding dependencies to allow -DBUILD_SHARED_LIBS=true to complete.Joe Abbey2011-10-191-0/+1
| | | | llvm-svn: 142464
* The MCJITMemoryManager takes ownership of the JMM, so don't leak it.Jim Grosbach2011-10-181-0/+2
| | | | llvm-svn: 142410
* MCJIT initialization TargetDataDanil Malyshev2011-09-301-0/+1
| | | | llvm-svn: 140856
* Clean up uses of switch instructions so they are not dependent on the ↵Eli Friedman2011-09-291-7/+10
| | | | | | operand ordering. Patch by Stepan Dyatkovskiy. llvm-svn: 140803
* Fix the asserts in lib/Target/X86/X86ELFWriterInfo.cpp andRichard Trieu2011-09-101-1/+1
| | | | | | | | | | | | lib/ExecutionEngine/MCJIT/MCJIT.cpp from: assert("error"); to: assert(0 && "error"); llvm-svn: 139456
* Don't tack "Instruction not interpretable yet!" onto the end ofDuncan Sands2011-09-091-1/+1
| | | | | | the instruction. llvm-svn: 139398
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-241-3/+3
| | | | | | These are strictly utilities for registering targets and components. llvm-svn: 138450
* EE: Provide the symbol "lseek64" explicitly with <unistd.h> on Linux glibc.NAKAMURA Takumi2011-08-142-0/+2
| | | | | | With libcxx, it seems <unistd.h> would not be provided. Thanks to Ryuta Suzuki. llvm-svn: 137567
* Silence a bunch (but not all) "variable written but not read" warningsDuncan Sands2011-08-121-0/+1
| | | | | | when building with assertions disabled. llvm-svn: 137460
* Rewrite the CMake build to use explicit dependencies between libraries,Chandler Carruth2011-07-295-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified in the same file that the library itself is created. This is more idiomatic for CMake builds, and also allows us to correctly specify dependencies that are missed due to bugs in the GenLibDeps perl script, or change from compiler to compiler. On Linux, this returns CMake to a place where it can relably rebuild several targets of LLVM. I have tried not to change the dependencies from the ones in the current auto-generated file. The only places I've really diverged are in places where I was seeing link failures, and added a dependency. The goal of this patch is not to start changing the dependencies, merely to move them into the correct location, and an explicit form that we can control and change when necessary. This also removes a serialization point in the build because we don't have to scan all the libraries before we begin building various tools. We no longer have a step of the build that regenerates a file inside the source tree. A few other associated cleanups fall out of this. This isn't really finished yet though. After talking to dgregor he urged switching to a single CMake macro to construct libraries with both sources and dependencies in the arguments. Migrating from the two macros to that style will be a follow-up patch. Also, llvm-config is still generated with GenLibDeps.pl, which means it still has slightly buggy dependencies. The internal CMake 'llvm-config-like' macro uses the correct explicitly specified dependencies however. A future patch will switch llvm-config generation (when using CMake) to be based on these deps as well. This may well break Windows. I'm getting a machine set up now to dig into any failures there. If anyone can chime in with problems they see or ideas of how to solve them for Windows, much appreciated. llvm-svn: 136433
OpenPOWER on IntegriCloud