aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Added LLVM copyright header.John Criswell2003-10-214-0/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9321 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM copyright notice to Makefiles.John Criswell2003-10-203-0/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9312 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-208-0/+56
| | | | | | | Header files will be on the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
* Hrm, a relic from the past. How cute :)Chris Lattner2003-10-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9283 91177308-0d34-0410-b5e6-96231b3b80d8
* Interpret the new varargs intrinsics correctlyChris Lattner2003-10-183-28/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9222 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't release the Module, as that invalidates the Module* within theMisha Brukman2003-10-171-2/+2
| | | | | | | | ModuleProvider, which has bad consequences in lli::callAsMain() which tries to access that same Module*. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9205 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up doxygen comment for getPointerToFunction().Brian Gaeke2003-10-172-0/+20
| | | | | | | Add prototypes for recompileAndRelinkFunction() and runJITOnFunction(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9200 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor running the JIT passes on a single function into the new method,Brian Gaeke2003-10-171-7/+35
| | | | | | | | | | runJITOnFunction(). Add new method for recompiling and patching in new versions of functions, recompileAndRelinkFunction(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9199 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo in a comment, and zap a blank line.Brian Gaeke2003-10-161-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9184 91177308-0d34-0410-b5e6-96231b3b80d8
* JIT.cpp:Misha Brukman2003-10-162-5/+7
| | | | | | | | | | | | | * #include "llvm/ModuleProvider" * alphabetize #includes * omit extraneous parens in pointer expressions VM.cpp: * #include "llvm/ModuleProvider" * alphabetize #includes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9182 91177308-0d34-0410-b5e6-96231b3b80d8
* * Reorder includes as per the style guideMisha Brukman2003-10-161-6/+22
| | | | | | | | | * Move the constructors from .h file here * Document ExecutionEngine::create() * Catch exception possibly thrown by ModuleProvider::releaseModule() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9181 91177308-0d34-0410-b5e6-96231b3b80d8
* Order #includes as per the style guide.Misha Brukman2003-10-141-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9128 91177308-0d34-0410-b5e6-96231b3b80d8
* Enabling incremental bytecode loading in the JIT:Misha Brukman2003-10-144-9/+17
| | | | | | | * The VM is now constructed with a ModuleProvider git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9125 91177308-0d34-0410-b5e6-96231b3b80d8
* Enabling incremental bytecode loading in the JIT:Misha Brukman2003-10-141-4/+5
| | | | | | | * ExecutionEngine and VM can be constructed using a ModuleProvider. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9124 91177308-0d34-0410-b5e6-96231b3b80d8
* Make mmap's fd for anonymous memory acquisition default to -1, except onBrian Gaeke2003-10-111-2/+7
| | | | | | | | Linux. This is consistent with what FreeBSD and Solaris both want. This makes the JIT work on FreeBSD 5.1-RELEASE. Whee. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9045 91177308-0d34-0410-b5e6-96231b3b80d8