summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* - Move CodeModel from a TargetMachine global option to MCCodeGenInfo.Evan Cheng2011-07-203-7/+7
| | | | | | | | - 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. llvm-svn: 135580
* Extra semi-colon.Eric Christopher2011-07-201-1/+1
| | | | llvm-svn: 135561
* Convert TargetData::getIndexedOffset to use ArrayRef.Jay Foad2011-07-191-2/+1
| | | | llvm-svn: 135478
* Introduce MCCodeGenInfo, which keeps information that can affect codegenEvan Cheng2011-07-193-6/+9
| | | | | | | (including compilation, assembly). Move relocation model Reloc::Model from TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine. llvm-svn: 135468
* Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions forEvan Cheng2011-07-182-8/+6
| | | | | | better location welcome). llvm-svn: 135438
* Add APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ↵Jeffrey Yasskin2011-07-181-1/+1
| | | | | | | | | ambiguity errors like the one corrected by r135261. Migrate all LLVM callers of the old constructor to the new one. llvm-svn: 135431
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-187-107/+107
| | | | llvm-svn: 135375
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-151-2/+1
| | | | llvm-svn: 135265
* Add to RuntimeDyld support different object formatsDanil Malyshev2011-07-134-599/+693
| | | | llvm-svn: 135037
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch brings numerous advantages to LLVM. One way to look at it is through diffstat: 109 files changed, 3005 insertions(+), 5906 deletions(-) Removing almost 3K lines of code is a good thing. Other advantages include: 1. Value::getType() is a simple load that can be CSE'd, not a mutating union-find operation. 2. Types a uniqued and never move once created, defining away PATypeHolder. 3. Structs can be "named" now, and their name is part of the identity that uniques them. This means that the compiler doesn't merge them structurally which makes the IR much less confusing. 4. Now that there is no way to get a cycle in a type graph without a named struct type, "upreferences" go away. 5. Type refinement is completely gone, which should make LTO much MUCH faster in some common cases with C++ code. 6. Types are now generally immutable, so we can use "Type *" instead "const Type *" everywhere. Downsides of this patch are that it removes some functions from the C API, so people using those will have to upgrade to (not yet added) new API. "LLVM 3.0" is the right time to do this. There are still some cleanups pending after this, this patch is large enough as-is. llvm-svn: 134829
* Fix the ridiculous SubtargetFeatures API where it implicitly expects CPU name toEvan Cheng2011-06-301-3/+2
| | | | | | | | | | 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! llvm-svn: 134127
* Sink SubtargetFeature and TargetInstrItineraries (renamed ↵Evan Cheng2011-06-291-1/+1
| | | | | | MCInstrItineraries) into MC. llvm-svn: 134049
* eliminate the Type::getDescription() method, using "<<" instead. This Chris Lattner2011-06-181-2/+2
| | | | | | removes some gunk from LLVMContext. llvm-svn: 133360
* Avoid a Twine that referenced a tmp (which proceded to go out of scope beforeJim Grosbach2011-05-191-5/+3
| | | | | | the Twine was used). llvm-svn: 131612
* Restore sanity to 131601.Jim Grosbach2011-05-181-2/+3
| | | | llvm-svn: 131603
* Objective C functions may use a magic '\1' on the name. Handle that whenJim Grosbach2011-05-182-1/+16
| | | | | | dealing with them in the MCJIT. llvm-svn: 131601
* Be a bit more permissive about symbols we don't understand. Just skip themJim Grosbach2011-05-131-4/+12
| | | | | | rather than throwing an error. llvm-svn: 131322
* ExecutionEngine: move createJIT() definition (v2)Dylan Noblesmith2011-05-132-19/+29
| | | | | | | As an ExecutionEngine class function, its definition really belongs in ExecutionEngine.cpp, not JIT.cpp. llvm-svn: 131320
* ExecutionEngine: push TargetMachine creation into clients (v2)Dylan Noblesmith2011-05-135-58/+28
| | | | | | | | In particular, into EngineBuilder. This should only impact the private API between the EE and EB classes, not external clients, since JITCtor and MCJITCtor are both protected members. llvm-svn: 131317
* ExecutionEngine: fix JIT/MCJIT selectTarget() duplication (v2)Dylan Noblesmith2011-05-139-117/+18
| | | | | | | This prepares for making JITCtor/MCJITCtor take a TargetMachine* directly from clients like EngineBuilder. llvm-svn: 131316
* Teach the RtDyld to tell the memory manager about how much space a functionJim Grosbach2011-05-131-3/+4
| | | | | | | actually takes rather than how much memory was allocated for it. This is more accurate and should help the manager pack things more effectively. llvm-svn: 131305
* MCJIT section loading should just skip non-text sections rather thanJim Grosbach2011-05-121-4/+4
| | | | | | | erroring out completely. Some modules produce sections that aren't referenced, so it's friendlier to clients like LLDB to just skip them, at least for now. llvm-svn: 131243
* The MCJIT memory manager needs to initialize its Module member.Jim Grosbach2011-05-122-2/+2
| | | | llvm-svn: 131234
* Revert ExecutionEngine patches, they either failed to build or broke unit tests.Jakob Stoklund Olesen2011-05-0710-49/+168
| | | | | | Please ensure the build is clean and tests are passing when recommitting. llvm-svn: 131044
* ExecutionEngine: delete duplicated filesDylan Noblesmith2011-05-062-182/+0
| | | | | | Forgot to `svn rm` these in revisions 131025 / 131029. llvm-svn: 131030
* ExecutionEngine: add missing fileDylan Noblesmith2011-05-061-0/+91
| | | | | | From revision 131025. llvm-svn: 131029
* ExecutionEngine: move createJIT() definitionDylan Noblesmith2011-05-062-19/+29
| | | | | | | As an ExecutionEngine class function, its definition really belongs in ExecutionEngine.cpp, not JIT.cpp. llvm-svn: 131027
* ExecutionEngine: push TargetMachine creation into clientsDylan Noblesmith2011-05-065-50/+20
| | | | | | | | In particular, into EngineBuilder. This should only impact the private API between the EE and EB classes, not external clients, since JITCtor and MCJITCtor are both protected members. llvm-svn: 131026
* ExecutionEngine: fix JIT/MCJIT selectTarget() duplicationDylan Noblesmith2011-05-067-20/+12
| | | | | | | This prepares for making JITCtor/MCJITCtor take a TargetMachine* directly from clients like EngineBuilder. llvm-svn: 131025
* Fix a C++0x portability issue with std::make_pair. Explicitly providing ↵Douglas Gregor2011-04-291-1/+1
| | | | | | template arguments no longer works when the call arguments are lvalues. llvm-svn: 130513
* Fix the last -Wnon-pod-memset I'm seeing. This is benign, but appearsChandler Carruth2011-04-281-1/+1
| | | | | | | | | | | | | a bit more sinister as the memset doesn't do what the constructor does. There seems to be a cleaner solution than a cast here though, instead we can point the memset destination into the union its actually trying to clear. An alternative is to point to the Untyped member of this union. Review appreciated, and if that is cleaner I'm happy to switch. All of these should be functionally equivalent to the original code. llvm-svn: 130395
* Remove unused STL header includes.Jay Foad2011-04-231-1/+0
| | | | llvm-svn: 130068
* 80-col fix.Eric Christopher2011-04-221-1/+1
| | | | llvm-svn: 129973
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* MCJIT relocation resolution.Jim Grosbach2011-04-131-0/+2
| | | | llvm-svn: 129445
* Like the coding standards say, do not use "using namespace std".Jay Foad2011-04-131-2/+2
| | | | llvm-svn: 129435
* MCJIT lazy relocation resolution and symbol address re-assignment.Jim Grosbach2011-04-121-98/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add handling for tracking the relocations on symbols and resolving them. Keep track of the relocations even after they are resolved so that if the RuntimeDyld client moves the object, it can update the address and any relocations to that object will be updated. For our trival object file load/run test harness (llvm-rtdyld), this enables relocations between functions located in the same object module. It should be trivially extendable to load multiple objects with mutual references. As a simple example, the following now works (running on x86_64 Darwin 10.6): $ cat t.c int bar() { return 65; } int main() { return bar(); } $ clang t.c -fno-asynchronous-unwind-tables -o t.o -c $ otool -vt t.o t.o: (__TEXT,__text) section _bar: 0000000000000000 pushq %rbp 0000000000000001 movq %rsp,%rbp 0000000000000004 movl $0x00000041,%eax 0000000000000009 popq %rbp 000000000000000a ret 000000000000000b nopl 0x00(%rax,%rax) _main: 0000000000000010 pushq %rbp 0000000000000011 movq %rsp,%rbp 0000000000000014 subq $0x10,%rsp 0000000000000018 movl $0x00000000,0xfc(%rbp) 000000000000001f callq 0x00000024 0000000000000024 addq $0x10,%rsp 0000000000000028 popq %rbp 0000000000000029 ret $ llvm-rtdyld t.o -debug-only=dyld ; echo $? Function sym: '_bar' @ 0 Function sym: '_main' @ 16 Extracting function: _bar from [0, 15] allocated to 0x100153000 Extracting function: _main from [16, 41] allocated to 0x100154000 Relocation at '_main' + 16 from '_bar(Word1: 0x2d000000) Resolving relocation at '_main' + 16 (0x100154010) from '_bar (0x100153000)(pcrel, type: 2, Size: 4). loaded '_main' at: 0x100154000 65 $ llvm-svn: 129388
* Tidy up a bit now that we're using the MemoryManager interface.Jim Grosbach2011-04-121-7/+1
| | | | llvm-svn: 129328
* Just because a GlobalVariable's initializer is [N x { i32, void ()* }] doesn'tNick Lewycky2011-04-111-1/+5
| | | | | | | | | | | | mean that it has to be ConstantArray of ConstantStruct. We might have ConstantAggregateZero, at either level, so don't crash on that. Also, semi-deprecate the sentinal value. The linker isn't aware of sentinals so we end up with the two lists appended, each with their "sentinals" on them. Different parts of LLVM treated sentinals differently, so make them all just ignore the single entry and continue on with the rest of the list. llvm-svn: 129307
* Make error message more useful.Benjamin Kramer2011-04-091-2/+2
| | | | llvm-svn: 129209
* Workaround g++ 4.2.1 warning diagnostic false positive.Jim Grosbach2011-04-081-2/+2
| | | | llvm-svn: 129149
* Refactor MCJIT 32-bit section loading.Jim Grosbach2011-04-082-82/+67
| | | | | | | Teach 32-bit section loading to use the Memory Manager interface, just like the 64-bit loading does. Tidy up a few other things here and there. llvm-svn: 129138
* llvm.global_[cd]tor is defined to be either external, or appending with an arrayNick Lewycky2011-04-081-6/+2
| | | | | | | of { i32, void ()* }. Teach the verifier to verify that, deleting copies of checks strewn about. llvm-svn: 129128
* tidy up.Jim Grosbach2011-04-061-1/+1
| | | | llvm-svn: 129032
* Fix comment to use llvm 2.x syntax.Nick Lewycky2011-04-061-1/+1
| | | | llvm-svn: 129025
* RuntimeDyld should use the memory manager API.Jim Grosbach2011-04-062-91/+88
| | | | | | | | | | Start teaching the runtime Dyld interface to use the memory manager API for allocating space. Rather than mapping directly into the MachO object, we extract the payload for each object and copy it into a dedicated buffer allocated via the memory manager. For now, just do Segment64, so this works on x86_64, but not yet on ARM. llvm-svn: 128973
* Make the virtual destructor out-of-line so we have a key function.Chandler Carruth2011-04-051-0/+3
| | | | llvm-svn: 128964
* Remove extraneous 'return'.Jim Grosbach2011-04-051-2/+1
| | | | llvm-svn: 128959
* Add missing file from r128851.Jim Grosbach2011-04-041-0/+58
| | | | llvm-svn: 128856
* Layer the memory manager between the JIT and the runtime Dyld.Jim Grosbach2011-04-043-18/+21
| | | | | | | | | | | The JITMemory manager references LLVM IR constructs directly, while the runtime Dyld works at a lower level and can handle objects which may not originate from LLVM IR. Introduce a new layer for the memory manager to handle the interface between them. For the MCJIT, this layer will be almost entirely simply a call-through w/ translation between the IR objects and symbol names. llvm-svn: 128851
OpenPOWER on IntegriCloud