aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine/ExecutionEngine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change APFloat::convertFromInteger to take the incomingDale Johannesen2007-09-211-3/+5
| | | | | | | | | | | | bit width instead of number of words allocated, which makes it actually work for int->APF conversions. Adjust callers. Add const to one of the APInt constructors to prevent surprising match when called with const argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42210 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement x86 long double in jit (not reallyDale Johannesen2007-09-171-3/+83
| | | | | | | | complete, but common cases work) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42043 91177308-0d34-0410-b5e6-96231b3b80d8
* Next round of APFloat changes.Dale Johannesen2007-09-061-2/+2
| | | | | | | | | | | | | | | Use APFloat in UpgradeParser and AsmParser. Change all references to ConstantFP to use the APFloat interface rather than double. Remove the ConstantFP double interfaces. Use APFloat functions for constant folding arithmetic and comparisons. (There are still way too many places APFloat is just a wrapper around host float/double, but we're getting there.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41747 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a comment typo noticed by Sandro Magi.Reid Spencer2007-08-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41018 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comments to fallsthrough cases. Also, this fixes PR1492Anton Korobeynikov2007-06-031-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37405 91177308-0d34-0410-b5e6-96231b3b80d8
* Check arguments & return types of main(). Abort in case of no match.Anton Korobeynikov2007-06-031-0/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37404 91177308-0d34-0410-b5e6-96231b3b80d8
* Compute the correct word number.Zhou Sheng2007-05-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37322 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak C++ build.Jeff Cohen2007-03-121-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35067 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix all of last night's JIT failures in Prolangs-C++ by finishing theReid Spencer2007-03-061-42/+151
| | | | | | | implementation of getConstantValue(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34988 91177308-0d34-0410-b5e6-96231b3b80d8
* 1. Make StoreValueToMemory a little more efficient by not requiring callerReid Spencer2007-03-061-2/+2
| | | | | | | | | to make a copy of the GenericValue. 2. Fix a copy & paste bug in StoreValueToMemory where 64-bit values were truncated to 32 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34958 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify things significantly because GenericValue now has a single integerReid Spencer2007-03-061-281/+72
| | | | | | | | | | field, of type APInt, instead of multiple integer fields. Also, get rid of the special endianness code in StoreValueToMemory and LoadValueToMemory. ExecutionEngine is always used to execute on the host platform so this is now unnecessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34946 91177308-0d34-0410-b5e6-96231b3b80d8
* Deal with error handling better.Reid Spencer2007-03-031-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34887 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid memory leakage by having caller construct the APInt for theReid Spencer2007-03-031-5/+4
| | | | | | | destination value of LoadValueFromMemory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34883 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement loading and storing of APInt values from memory.Reid Spencer2007-03-031-8/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34874 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1195:Reid Spencer2007-02-151-1/+1
| | | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
* From Dan Gohman:Chris Lattner2007-02-141-2/+2
| | | | | | | | | | | While preparing http://llvm.org/PR1198 I noticed several asserts protecting unprepared code from i128 types that weren't actually failing when they should because they were written as assert("foo") instead of something like assert(0 && "foo"). This patch fixes all the cases that a quick grep found. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34267 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate use of TargetData::getIndexedOffset that takes a vectorChris Lattner2007-02-101-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34163 91177308-0d34-0410-b5e6-96231b3b80d8
* Privatize StructLayout::MemberOffsets, adding an accessorChris Lattner2007-02-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34156 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR411:Reid Spencer2007-02-051-1/+1
| | | | | | | | | Adjust to changes in Module interface: getMainFunction() -> getFunction("main") getNamedFunction(X) -> getFunction(X) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33922 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-4/+4
| | | | | | | confusion with external linkage types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1043:Reid Spencer2007-01-191-6/+2
| | | | | | | | | | | | | | | This is the final patch for this PR. It implements some minor cleanup in the use of IntegerType, to wit: 1. Type::getIntegerTypeMask -> IntegerType::getBitMask 2. Type::Int*Ty changed to IntegerType* from Type* 3. ConstantInt::getType() returns IntegerType* now, not Type* This also fixes PR1120. Patch by Sheng Zhou. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33370 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a regression in the last patch. When constructing a BitMask, be carefulReid Spencer2007-01-181-0/+4
| | | | | | | | not to overflow 64-bits and end up with a 0 mask. This caused i64 values to always be stored as 0 with lots of consequential damage to nightly test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33335 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure we truncate stored values to their bit width.Reid Spencer2007-01-181-30/+40
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33317 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1064:Reid Spencer2007-01-121-98/+205
| | | | | | | | | | | | | | | | | | | | | | | | Implement the arbitrary bit-width integer feature. The feature allows integers of any bitwidth (up to 64) to be defined instead of just 1, 8, 16, 32, and 64 bit integers. This change does several things: 1. Introduces a new Derived Type, IntegerType, to represent the number of bits in an integer. The Type classes SubclassData field is used to store the number of bits. This allows 2^23 bits in an integer type. 2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and 64-bit integers. These are replaced with just IntegerType which is not a primitive any more. 3. Adjust the rest of LLVM to account for this change. Note that while this incremental change lays the foundation for arbitrary bit-width integers, LLVM has not yet been converted to actually deal with them in any significant way. Most optimization passes, for example, will still only deal with the byte-width integer types. Future increments will rectify this situation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33113 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement review feedback for the ConstantBool->ConstantInt merge. ChrisReid Spencer2007-01-121-1/+1
| | | | | | | | | recommended that getBoolValue be replaced with getZExtValue and that get(bool) be replaced by get(const Type*, uint64_t). This implements those changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33110 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1043:Zhou Sheng2007-01-111-1/+1
| | | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33073 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-12-311-97/+69
| | | | | | | Convert signed integer types to signless ones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32787 91177308-0d34-0410-b5e6-96231b3b80d8
* remove static ctors from Statistic objectsChris Lattner2006-12-191-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32700 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-071-9/+9
| | | | | | | now cerr, cout, and NullStream resp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-2/+2
| | | | | | | is 'unsigned'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
* Introducing external weak linkage. Darwin codegen should be added later.Anton Korobeynikov2006-12-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32052 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed #include <iostream> and replaced streams with llvm streams.Bill Wendling2006-11-271-12/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31949 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-11-271-20/+36
| | | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
* init ivarChris Lattner2006-11-091-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31601 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-10-201-13/+13
| | | | | | | | | This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding dllimport, dllexport and external weak linkage types.Anton Korobeynikov2006-09-141-1/+3
| | | | | | | | | | DLL* linkages got full (I hope) codegeneration support in C & both x86 assembler backends. External weak linkage added for future use, we don't provide any codegeneration, etc. support for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30374 91177308-0d34-0410-b5e6-96231b3b80d8
* initial changes to support JIT'ing from multiple module providers, implicitlyChris Lattner2006-08-161-56/+150
| | | | | | | linking the program on the fly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29721 91177308-0d34-0410-b5e6-96231b3b80d8
* LoadLibraryPermanently can theoretically throw an exception. Do not propagateChris Lattner2006-05-141-1/+4
| | | | | | | it out of 'ExecutionEngine::create'. This fixes a problem reported by coverity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28293 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some methods out of line so that MutexGuard.h isn't needed in a public ↵Chris Lattner2006-05-081-3/+73
| | | | | | header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28179 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor TargetMachine, pushing handling of TargetData into the ↵Owen Anderson2006-05-031-15/+15
| | | | | | | | | target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference. This fixes PR 759. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28074 91177308-0d34-0410-b5e6-96231b3b80d8
* JumpTable support! What this represents is working asm and jit support forNate Begeman2006-04-221-1/+4
| | | | | | | | | x86 and ppc for 100% dense switch statements when relocations are non-PIC. This support will be extended and enhanced in the coming days to support PIC, and less dense forms of jump tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27947 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix JIT support for static ctors, which was apparently completely broken!Chris Lattner2006-04-221-1/+5
| | | | | | | | This allows Prolangs-C++/city and probably a bunch of other stuff to work well with the new front-end git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27941 91177308-0d34-0410-b5e6-96231b3b80d8
* prune #includesChris Lattner2006-03-231-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26975 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the intrinsiclowering hookChris Lattner2006-03-231-7/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26970 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the dependency of ExecutionEngine on the JIT/Interpreter libraries.Chris Lattner2006-03-221-18/+8
| | | | | | | Now you can build a tool with just the JIT or just the interpreter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26946 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a helper method for running static ctors/dtors in the module.Chris Lattner2006-03-081-2/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26619 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the interpreter to handle global variables that are added to a module ↵Jeff Cohen2006-02-071-1/+10
| | | | | | | | | | after interpretation has begun. The JIT already handles this situation correctly, and the interpreter can already handle new functions being added. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26030 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed InitializeMemory to handle ConstantPacked.Robert Bocchino2006-01-201-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25481 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a nasty bug that was causing miscompilation of global variablesChris Lattner2005-10-231-1/+4
| | | | | | | | on big endian 32-bit targets in some cases (e.g. PPC). This fixes several PPC JIT failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23914 91177308-0d34-0410-b5e6-96231b3b80d8