summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* It looks like this has been broken for some time -Duncan Sands2007-12-101-2/+2
| | | | | | get it to compile. llvm-svn: 44791
* Adjust VStudio files to add JITMemoryManager files + include <cassert> from ↵Chuck Rose III2007-12-061-0/+1
| | | | | | same. llvm-svn: 44651
* add a new ExecutionEngine::createJIT which can be used if you only want Chris Lattner2007-12-063-8/+33
| | | | | | | to create a JIT. This lets you specify JIT-specific configuration items like the JITMemoryManager to use. llvm-svn: 44647
* simplify creation of the interpreter, make ExecutionEngine ctor protected,Chris Lattner2007-12-066-25/+11
| | | | | | delete one ExecutionEngine ctor, minor cleanup. llvm-svn: 44646
* split the JIT memory management code out from the main JIT logic into itsChris Lattner2007-12-052-411/+454
| | | | | | | own JITMemoryManager interface. There is no functionality change with this patch. llvm-svn: 44640
* for consistency, allow a fallthrough if the final check returns null.Chris Lattner2007-11-281-1/+2
| | | | llvm-svn: 44406
* Add some convenience methods for querying attributes, andDuncan Sands2007-11-281-12/+9
| | | | | | use them. llvm-svn: 44403
* My compiler complains that "x always evaluates to true"Duncan Sands2007-11-281-2/+6
| | | | | | | | | | | | | | | | | | | | | | | in this call: Result.IntVal = APInt(80, 2, x); What is x? uint16_t x[8]; I deduce that the APInt constructor being used is this one: APInt(uint32_t numBits, uint64_t val, bool isSigned = false); rather than this one: APInt(uint32_t numBits, uint32_t numWords, const uint64_t bigVal[]); That doesn't seem right! This fix compiles but is otherwise completely untested. llvm-svn: 44400
* Make this actually work on systems that support ppc long double.Chris Lattner2007-11-271-3/+8
| | | | llvm-svn: 44374
* Unbreak all of the darwin/ppc32 JIT failures having to do Chris Lattner2007-11-271-0/+10
| | | | | | with not being able to find printf. llvm-svn: 44373
* Executive summary: getTypeSize -> getTypeStoreSize / getABITypeSize.Duncan Sands2007-11-014-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The meaning of getTypeSize was not clear - clarifying it is important now that we have x86 long double and arbitrary precision integers. The issue with long double is that it requires 80 bits, and this is not a multiple of its alignment. This gives a primitive type for which getTypeSize differed from getABITypeSize. For arbitrary precision integers it is even worse: there is the minimum number of bits needed to hold the type (eg: 36 for an i36), the maximum number of bits that will be overwriten when storing the type (40 bits for i36) and the ABI size (i.e. the storage size rounded up to a multiple of the alignment; 64 bits for i36). This patch removes getTypeSize (not really - it is still there but deprecated to allow for a gradual transition). Instead there is: (1) getTypeSizeInBits - a number of bits that suffices to hold all values of the type. For a primitive type, this is the minimum number of bits. For an i36 this is 36 bits. For x86 long double it is 80. This corresponds to gcc's TYPE_PRECISION. (2) getTypeStoreSizeInBits - the maximum number of bits that is written when storing the type (or read when reading it). For an i36 this is 40 bits, for an x86 long double it is 80 bits. This is the size alias analysis is interested in (getTypeStoreSize returns the number of bytes). There doesn't seem to be anything corresponding to this in gcc. (3) getABITypeSizeInBits - this is getTypeStoreSizeInBits rounded up to a multiple of the alignment. For an i36 this is 64, for an x86 long double this is 96 or 128 depending on the OS. This is the spacing between consecutive elements when you form an array out of this type (getABITypeSize returns the number of bytes). This is TYPE_SIZE in gcc. Since successive elements in a SequentialType (arrays, pointers and vectors) need to be aligned, the spacing between them will be given by getABITypeSize. This means that the size of an array is the length times the getABITypeSize. It also means that GEP computations need to use getABITypeSize when computing offsets. Furthermore, if an alloca allocates several elements at once then these too need to be aligned, so the size of the alloca has to be the number of elements multiplied by getABITypeSize. Logically speaking this doesn't have to be the case when allocating just one element, but it is simpler to also use getABITypeSize in this case. So alloca's and mallocs should use getABITypeSize. Finally, since gcc's only notion of size is that given by getABITypeSize, if you want to output assembler etc the same as gcc then getABITypeSize is the size you want. Since a store will overwrite no more than getTypeStoreSize bytes, and a read will read no more than that many bytes, this is the notion of size appropriate for alias analysis calculations. In this patch I have corrected all type size uses except some of those in ScalarReplAggregates, lib/Codegen, lib/Target (the hard cases). I will get around to auditing these too at some point, but I could do with some help. Finally, I made one change which I think wise but others might consider pointless and suboptimal: in an unpacked struct the amount of space allocated for a field is now given by the ABI size rather than getTypeStoreSize. I did this because every other place that reserves memory for a type (eg: alloca) now uses getABITypeSize, and I didn't want to make an exception for unpacked structs, i.e. I did it to make things more uniform. This only effects structs containing long doubles and arbitrary precision integers. If someone wants to pack these types more tightly they can always use a packed struct. llvm-svn: 43620
* add a mechanism for the JIT to invoke a function to lazily create functions ↵Chris Lattner2007-10-222-2/+7
| | | | | | as they are referenced. llvm-svn: 43210
* llvm-gcc3 is dead, along with it __main.Chris Lattner2007-10-221-12/+0
| | | | llvm-svn: 43209
* LoadLibraryPermanently doesn't throw.Chris Lattner2007-10-211-3/+3
| | | | llvm-svn: 43207
* Add a convenience method for creating EE's.Chris Lattner2007-10-211-0/+4
| | | | llvm-svn: 43206
* Switching TargetMachineRegistry to use the new generic Registry.Gordon Henriksen2007-10-171-2/+3
| | | | llvm-svn: 43094
* Add removeModuleProvider()Devang Patel2007-10-151-0/+15
| | | | llvm-svn: 43002
* Fix an assertion abort on sparc. malloc(0) is allowed toGabor Greif2007-10-111-1/+3
| | | | | | return NULL. llvm-svn: 42871
* convertFromInteger, as originally written, expected sign-extendedNeil Booth2007-10-071-2/+2
| | | | | | | | input. APInt unfortunately zero-extends signed integers, so Dale modified the function to expect zero-extended input. Make this assumption explicit in the function name. llvm-svn: 42732
* Constant fold int-to-long-double conversions;Dale Johannesen2007-09-301-2/+2
| | | | | | | | use APFloat for int-to-float/double; use round-to-nearest for these (implementation-defined, seems to match gcc). llvm-svn: 42484
* 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. llvm-svn: 42210
* #ifdef out unsafe tracing code, which fixes PR1689Chris Lattner2007-09-211-15/+17
| | | | llvm-svn: 42205
* Implement x86 long double in jit (not reallyDale Johannesen2007-09-172-4/+93
| | | | | | complete, but common cases work) llvm-svn: 42043
* Next round of APFloat changes.Dale Johannesen2007-09-062-4/+6
| | | | | | | | | | | | | | 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.) llvm-svn: 41747
* rename APInt::toString -> toStringUnsigned for symmetry with toStringSigned()Chris Lattner2007-08-231-2/+3
| | | | | | Add an APSInt::toString() method. llvm-svn: 41309
* move assertion into mutex guard, a partial fix for PR1606.Chris Lattner2007-08-131-1/+1
| | | | llvm-svn: 41050
* Fix a comment typo noticed by Sandro Magi.Reid Spencer2007-08-111-1/+1
| | | | llvm-svn: 41018
* eliminate redundant conditions from the signless types conversion.Chris Lattner2007-08-081-7/+4
| | | | llvm-svn: 40927
* New CallInst interface to address GLIBCXX_DEBUG errors caused byDavid Greene2007-08-011-1/+1
| | | | | | | | indexing an empty std::vector. Updates to all clients. llvm-svn: 40660
* Add a comment: don't expect from external function resolver in interpreterAnton Korobeynikov2007-07-301-0/+5
| | | | | | things, it wasn't designed to handle. llvm-svn: 40608
* Add detection of __dso_handle presence during configure. Use this ↵Anton Korobeynikov2007-07-301-15/+20
| | | | | | | | | information in the JITer (short path is added for darwin). This is needed to properly JIT llvm-gcc-4.2-built binaries, since cxa_atexit is enabled by default on much more targets. llvm-svn: 40600
* More explicit keywords.Dan Gohman2007-07-301-1/+1
| | | | llvm-svn: 40589
* VStudio compiler errors and placing Function*->ExFunc map under ↵Chuck Rose III2007-07-271-4/+5
| | | | | | | | | | | | | ManagedStatic control. This commit fixes two things. One is a pair of VStudio compiler errors stemming from variables which defined within the for loop statement and also within the body of the for loop. I fixed these by renaming one of the two variables. Additionally, I've made the Function*->ExFunc map in ExternalFunctions.cpp a ManagedStatic object, so that cleanup will be done on llvm_shutdown. In repeated uses of the interpreter, where the same Function* address may get used for completely differnet functions, this was causing a crash. llvm-svn: 40558
* Hush a noisy warning from GCC 4.2 about overflow during conversion by usingReid Spencer2007-07-191-2/+2
| | | | | | the type "unsigned" instead of uintptr_t for a 1-bit structure field. llvm-svn: 40066
* fix typosGabor Greif2007-07-091-5/+5
| | | | llvm-svn: 38453
* Here is the bulk of the sanitizing.Gabor Greif2007-07-052-5/+5
| | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. llvm-svn: 37913
* (For Chris): Fix failure where we rejected compiling stubs when lazy ↵Evan Cheng2007-06-301-18/+25
| | | | | | compilation is disabled. llvm-svn: 37825
* Add comments to fallsthrough cases. Also, this fixes PR1492Anton Korobeynikov2007-06-031-0/+3
| | | | llvm-svn: 37405
* Check arguments & return types of main(). Abort in case of no match.Anton Korobeynikov2007-06-031-0/+32
| | | | llvm-svn: 37404
* For PR1486:Reid Spencer2007-06-012-2/+2
| | | | | | | Avoid overwriting the APInt instance with 0 bytes which causes the bitwidth to be set to 0 (illegal) producing a subsequent assert. llvm-svn: 37391
* Compute the correct word number.Zhou Sheng2007-05-241-1/+1
| | | | llvm-svn: 37322
* On Linux platforms and at optimization levels -O1 and above, llvm-gcc canReid Spencer2007-05-191-3/+14
| | | | | | | turn "putchar" calls into _IO_putc calls which is a lower-level interface. This patch allows these calls to be executed by lli in interpreter mode. llvm-svn: 37254
* Print integer values as both decimal and hexadecimal for convenienceReid Spencer2007-05-171-1/+1
| | | | | | of verifying result values when debugging. llvm-svn: 37156
* Avoid a "loss of precision" error in gcc 4.1.3.Reid Spencer2007-05-161-1/+1
| | | | llvm-svn: 37105
* Implement printing of instruction result values when debug info is turnedReid Spencer2007-05-161-0/+21
| | | | | | | on. This helps to speed up the debugging time by showing computational results as the program executes. llvm-svn: 37095
* Bitcast all the bits of a floating point value, not just one. The zeroReid Spencer2007-05-041-0/+2
| | | | | | | | extension is needed because the constructor for the Destination value causes the APInt to have a bit width of 1. Patch by Guoling Han. llvm-svn: 36733
* 1. Don't swap byte order in scanf. It isn't necessary and leads toReid Spencer2007-04-261-1/+1
| | | | | | | | incorrect results (canonicalization was dropped several commits ago). 2. Add support for fscanf. 3. Suppress a warning about cast to pointer from non-pointer-sized integer. llvm-svn: 36482
* We only need one putchar which gives it a shot at getting matched by itsReid Spencer2007-04-211-17/+4
| | | | | | users. llvm-svn: 36305
* avoid mutating a global in an accessorChris Lattner2007-04-201-5/+6
| | | | llvm-svn: 36289
* fit in 80 colsChris Lattner2007-04-201-2/+2
| | | | llvm-svn: 36288
OpenPOWER on IntegriCloud