aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
* Add new ExecutionEngine::getGlobalValueAtAddress method, which can efficientlyChris Lattner2003-12-311-5/+21
| | | | | | | | | | | turn a memory address back into the LLVM global object that starts at that address. Note that this won't cause any additional datastructures to be built for clients of the EE that don't need this information. Also modified some code to not access the GlobalAddress map directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10674 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up a lot of the code I added yesterday by exposing the IntrinsicLoweringChris Lattner2003-12-281-1/+0
| | | | | | | implementation from the TargetMachine directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10636 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass around IntrinsicLowering instances as appropriate.Chris Lattner2003-12-287-50/+74
| | | | | | | Reimplement the Interpreters implementation of va_* to be more direct. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10627 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor code out of LLIChris Lattner2003-12-261-0/+54
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10616 91177308-0d34-0410-b5e6-96231b3b80d8
* No longer run atExit functions from run()Chris Lattner2003-12-263-23/+27
| | | | | | | | rename run to runFunction Genericize the runFunction code a little bit, though it still stinks git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10610 91177308-0d34-0410-b5e6-96231b3b80d8
* No longer run atExit functions from run()Chris Lattner2003-12-262-10/+6
| | | | | | | rename run to runFunction git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10609 91177308-0d34-0410-b5e6-96231b3b80d8
* This should not be needed anymoreChris Lattner2003-12-201-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10558 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement PR135, lazy emission of global variablesChris Lattner2003-12-204-19/+85
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10549 91177308-0d34-0410-b5e6-96231b3b80d8
* Simple refactorings to prepare for lazy global emissionChris Lattner2003-12-201-2/+16
| | | | | | | Also, add a stat for the number of globals emitted git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10547 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup the JIT as per PR176. This renames the VM class to JIT, and merges theChris Lattner2003-12-207-315/+217
| | | | | | | | VM.cpp and JIT.cpp files into JIT.cpp. This also splits some nasty code out into TargetSelect.cpp so that people hopefully won't notice it. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10544 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for changes in the JITChris Lattner2003-12-201-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10543 91177308-0d34-0410-b5e6-96231b3b80d8
* Rip JIT specific stuff out of TargetMachine, as per PR176Chris Lattner2003-12-204-16/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10542 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2003-12-142-24/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10465 91177308-0d34-0410-b5e6-96231b3b80d8
* Dynamically get the right-sized member of a GenericValue to hold a size_t, andBrian Gaeke2003-12-121-2/+8
| | | | | | | use it to return the result of strlen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10433 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the ExecutionEngine::getPointerToFunctionOrStub by forwarding theChris Lattner2003-12-123-0/+29
| | | | | | | request on to the TargetMachine if it supports the getJITStubForFunction method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10431 91177308-0d34-0410-b5e6-96231b3b80d8
* Since we are using a gep_type_iterator, we apparently must get the typeBrian Gaeke2003-12-121-2/+1
| | | | | | | | index by using I.getOperand() here. This was failing an assertion on basically every struct access. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10426 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in comment. Add prototype for getConstantExprValue().Brian Gaeke2003-12-111-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10390 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for --debug-only=interpreter, to print out instrs beforeBrian Gaeke2003-12-111-40/+144
| | | | | | | | | | | | | | | | | | | interpreting them. Move support for getting the value of a ConstantExpr into getConstantExprValue(), and add support for the rest of the different kinds of ConstantExprs. (I don't think I like ConstantExprs!) This requires separate procedures executeShlInst() and executeShrInst(). Reduce the number of references to TheEE. Get rid of an old comment mentioning annotations. Fix exitCalled(), which was crashing the Interpreter. This was a leftover from the return-value code refactoring. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10389 91177308-0d34-0410-b5e6-96231b3b80d8
* implement methodChris Lattner2003-12-081-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10321 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new method, though noone currently implements it any better than beforeChris Lattner2003-12-081-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10320 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2003-12-084-17/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10318 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit constants to one contiguous block, but this time, respect alignment ↵Chris Lattner2003-11-301-5/+27
| | | | | | | | | constraints. If this doesn't work Misha, feel free to revert it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10267 91177308-0d34-0410-b5e6-96231b3b80d8
* Go back to allocating memory for each constant separately. Since SPARCs do notMisha Brukman2003-11-301-20/+5
| | | | | | | | | allow unaligned loads, that is probably the problem I've been seeing in numerous SPARC test cases failing. X86, on the other hand, just slows down unaligned accesses, since it must make 2 aligned accesses for each unaligned one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10266 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not depend on structure elements being of type UByteTyChris Lattner2003-11-252-22/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10224 91177308-0d34-0410-b5e6-96231b3b80d8
* Fine grainify namespaceificationChris Lattner2003-11-191-5/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10093 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit the MachineConstantPool constants in one contiguous memory `pool'.Misha Brukman2003-11-171-5/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10060 91177308-0d34-0410-b5e6-96231b3b80d8
* * Order #includes as per style guideMisha Brukman2003-11-171-8/+7
| | | | | | | | * Delete blank comment lines * Eliminate space between function name and open-paren ( to be consistent git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10059 91177308-0d34-0410-b5e6-96231b3b80d8
* Change LLI's internal representation of va_list to a pointer to the nextBrian Gaeke2003-11-133-13/+15
| | | | | | | | | argument to be returned by va_arg. This allows va_lists to be passed between different LLVM procedures (though it is unlikely that an LLI va_list would make sense to an external function, except by chance.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9965 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-1111-1/+44
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove #include of PassManager.h which was marked FIXME, and apparently is noBrian Gaeke2003-11-091-3/+0
| | | | | | | longer used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9823 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement vaarg instruction. This is not quite perfect: 2003-08-11-VaListArgBrian Gaeke2003-11-072-0/+36
| | | | | | | still causes a crash. But it's better than before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9794 91177308-0d34-0410-b5e6-96231b3b80d8
* popStackAndReturnValueToCaller() must advance instruction pointer to normalBrian Gaeke2003-11-071-5/+24
| | | | | | | | | destination, if returning from an invoke. Implement 'unwind' instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9792 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the *BIG UGLY HACK* from the JIT: PreSelection is now a FunctionPass.Misha Brukman2003-11-071-15/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9790 91177308-0d34-0410-b5e6-96231b3b80d8
* Add stub version of unwind supportBrian Gaeke2003-11-072-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9789 91177308-0d34-0410-b5e6-96231b3b80d8
* visitCallInst --> visitCallSite.Brian Gaeke2003-11-072-4/+7
| | | | | | | Use visitCallSite to implement both CallInsts and InvokeInsts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9788 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the operation of visitCallInst() only depend on the CallSite.Brian Gaeke2003-11-071-7/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9787 91177308-0d34-0410-b5e6-96231b3b80d8
* Use CallSites for call sites, instead of CallInsts. A revolutionary concept.Brian Gaeke2003-11-072-9/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9784 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the return-from-function code into popStackAndReturnValueToCaller().Brian Gaeke2003-11-072-37/+42
| | | | | | | Make external function calls slightly less special; now they get a stack frame. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9765 91177308-0d34-0410-b5e6-96231b3b80d8
* Be friendly to gcc 3.4... good compiler. Nice compiler.Chris Lattner2003-11-053-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9726 91177308-0d34-0410-b5e6-96231b3b80d8
* Abort when the user program calls abort, instead of printing a funny message ↵Brian Gaeke2003-11-051-4/+2
| | | | | | and calling exit(1). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9716 91177308-0d34-0410-b5e6-96231b3b80d8
* Use regular old malloc to emulate malloc/alloca instructions.Brian Gaeke2003-11-051-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9713 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a comment which no longer applies.Brian Gaeke2003-11-051-5/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9712 91177308-0d34-0410-b5e6-96231b3b80d8
* In VM::create(), comment out almost the whole function if NO_JITS_ENABLED,Brian Gaeke2003-10-291-3/+4
| | | | | | | because the Arch variable will likely be undefined. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9576 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak the buildChris Lattner2003-10-251-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9502 91177308-0d34-0410-b5e6-96231b3b80d8
* ExecutionEngine::create no longer takes a TraceMode argument.Brian Gaeke2003-10-241-18/+4
| | | | | | | | | | | CurFrame, TraceMode, and the CachedWriter are history. The ExecutionAnnotations (SlotNumber, InstNumber, and FunctionInfo) are history. ExecutionContext now keeps Values for each stack frame in a std::map. printValue() and print() are history. executeInstruction() is now part of run(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9493 91177308-0d34-0410-b5e6-96231b3b80d8
* ExecutionEngine::create no longer takes a TraceMode argument.Brian Gaeke2003-10-241-13/+7
| | | | | | | CurFrame, TraceMode, and the CachedWriter are history. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9492 91177308-0d34-0410-b5e6-96231b3b80d8
* The ExecutionAnnotations (SlotNumber, InstNumber, and FunctionInfo) are history.Brian Gaeke2003-10-241-71/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9490 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce the number of #includes.Brian Gaeke2003-10-241-186/+22
| | | | | | | | | | | | | | CurFrame, TraceMode, and the CachedWriter are history. ArrayChecksEnabled and non-QuietMode are history. The ExecutionAnnotations (SlotNumber, InstNumber, and FunctionInfo) are history. ExecutionContext now keeps Values for each stack frame in a std::map. Stop pre-initializing Values on the stack to 42. Remove some dead variables, excess whitespace and commented-out code. executeInstruction() is now part of run(). printValue() and print() are history. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9489 91177308-0d34-0410-b5e6-96231b3b80d8
* ExecutionEngine::create no longer takes a TraceMode argument.Brian Gaeke2003-10-241-5/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9488 91177308-0d34-0410-b5e6-96231b3b80d8
* Destroy MachineFunction for any Function that we are about toBrian Gaeke2003-10-241-0/+2
| | | | | | | | recompile and relink. This keeps it from failing an assertion when it goes and tries to construct a new MachineFunction for that Function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9459 91177308-0d34-0410-b5e6-96231b3b80d8