summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/JIT/JIT.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Rewrite JIT handling of GlobalVariables so theyDale Johannesen2008-08-071-15/+7
| | | | | | | | | | | | | | are allocated in the same buffer as the code, jump tables, etc. The default JIT memory manager does not handle buffer overflow well. I didn't introduce this and I'm not attempting to fix it here, but it is more likely to be hit now since we're putting more stuff in the buffer. This affects one test that I know of so far, MultiSource/Benchmarks/NPB-serial/is. llvm-svn: 54442
* Prune a few dependencies on MachineFunction.h.Dan Gohman2008-07-011-1/+0
| | | | llvm-svn: 52976
* Fix a couple issues with the JIT and multiple modules:Nate Begeman2008-05-211-7/+53
| | | | | | | | | | | | 1. The "JITState" object creates a PassManager with the ModuleProvider that the jit is created with. If the ModuleProvider is removed and deleted, the PassManager is invalid. 2. The Global maps in the JIT were not invalidated with a ModuleProvider was removed. This could lead to a case where the Module would be freed, and a new Module with Globals at the same addresses could return invalid results. llvm-svn: 51384
* Fix a bunch of 80col violations that arose from the Create API change. Tweak ↵Gabor Greif2008-05-151-3/+4
| | | | | | makefile targets to find these better. llvm-svn: 51143
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-0/+4
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Do not hold the JIT lock when materializing a function and verify if theNicolas Geoffray2008-04-201-1/+6
| | | | | | | function has already been codegen'd. This is required by the Java class loading mechanism which executes Java code when materializing a function. llvm-svn: 49988
* Switch to using Simplified ConstantFP::get API.Chris Lattner2008-04-201-10/+14
| | | | llvm-svn: 49977
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-6/+6
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* Register EH frames emitted in JIT when using gcc unwinding runtimeAnton Korobeynikov2008-03-221-1/+9
| | | | llvm-svn: 48688
* Use getPreferredAlignmentLog or getPreferredAlignmentDuncan Sands2008-01-291-1/+1
| | | | | | | to get the alignment of global variables, rather than using hand-made versions. llvm-svn: 46495
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* add a new ExecutionEngine::createJIT which can be used if you only want Chris Lattner2007-12-061-2/+19
| | | | | | | 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-061-1/+1
| | | | | | delete one ExecutionEngine ctor, minor cleanup. llvm-svn: 44646
* Executive summary: getTypeSize -> getTypeStoreSize / getABITypeSize.Duncan Sands2007-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Implement x86 long double in jit (not reallyDale Johannesen2007-09-171-1/+10
| | | | | | complete, but common cases work) llvm-svn: 42043
* Next round of APFloat changes.Dale Johannesen2007-09-061-2/+4
| | | | | | | | | | | | | | 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
* move assertion into mutex guard, a partial fix for PR1606.Chris Lattner2007-08-131-1/+1
| | | | llvm-svn: 41050
* 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 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
* Here is the bulk of the sanitizing.Gabor Greif2007-07-051-3/+3
| | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. llvm-svn: 37913
* rename JIT::state -> JIT::jitstate to avoid shadowing ExecutionEngine::stateChris Lattner2007-04-201-7/+7
| | | | llvm-svn: 36286
* Simplify code as a result of the change in GenericValue to have a singleReid Spencer2007-03-061-28/+15
| | | | | | integer field of type APInt instead of different sized integer fields. llvm-svn: 34952
* Generalize TargetData strings, to support more interesting forms of data.Chris Lattner2007-02-141-1/+1
| | | | | | Patch by Scott Michel. llvm-svn: 34266
* eliminate vector-related allocationsChris Lattner2007-02-131-2/+2
| | | | llvm-svn: 34223
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-2/+2
| | | | | | confusion with external linkage types. llvm-svn: 33663
* Teach TargetData to handle 'preferred' alignment for each target, and useChris Lattner2007-01-201-1/+1
| | | | | | these alignment amounts to align scalars when we can. Patch by Scott Michel! llvm-svn: 33409
* For PR1064:Reid Spencer2007-01-121-17/+31
| | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 33113
* 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. llvm-svn: 33110
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-3/+3
| | | | llvm-svn: 33076
* For PR1043:Zhou Sheng2007-01-111-1/+1
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* For PR950:Reid Spencer2006-12-311-32/+24
| | | | | | Convert signed integer types to signless ones. llvm-svn: 32787
* Fix PR1057 (compilation on macos 10.3), patch by Scott Michel!Chris Lattner2006-12-171-8/+8
| | | | llvm-svn: 32644
* Change inferred cast creation calls to more specific cast creations.Reid Spencer2006-12-121-1/+1
| | | | llvm-svn: 32460
* Removing even more <iostream> includes.Bill Wendling2006-12-071-6/+5
| | | | llvm-svn: 32320
* For PR950:Reid Spencer2006-10-201-12/+12
| | | | | | | | 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. llvm-svn: 31063
* Completely rearchitect the interface between targets and the pass manager.Chris Lattner2006-09-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | This pass: 1. Splits TargetMachine into TargetMachine (generic targets, can be implemented any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by things using libcodegen and other support). 2. Instead of having each target fully populate the passmgr for file or JIT output, move all this to common code, and give targets hooks they can implement. 3. Commonalize the target population stuff between file emission and JIT emission. 4. All (native code) codegen stuff now happens in a FunctionPassManager, which paves the way for "fast -O0" stuff in the CFE later, and now LLC could lazily stream .bc files from disk to use less memory. 5. There are now many fewer #includes and the targets don't depend on the scalar xforms or libanalysis anymore (but codegen does). 6. Changing common code generator pass ordering stuff no longer requires touching all targets. 7. The JIT now has the option of "-fast" codegen or normal optimized codegen, which is now orthogonal to the fact that JIT'ing is being done. llvm-svn: 30081
* eliminate use of TM.getName()Chris Lattner2006-09-031-2/+1
| | | | llvm-svn: 30068
* Remove extra spaces.Evan Cheng2006-09-011-2/+2
| | | | llvm-svn: 30025
* Last check-in was a mistake...Evan Cheng2006-09-011-4/+6
| | | | | | | | | | | I've been told apple gcc version number is not guaranteed to increase monotonically. Change the preprocess condition to make it less risky. The configuration change is done during the middle 10.4 life cycle so we have to check __APPLE_CC. For future OS X release, we should be able to assume -fenable-cxa-atexit is the default. llvm-svn: 30024
* *** empty log message ***Evan Cheng2006-09-011-2/+2
| | | | llvm-svn: 30023
* Better comments.Evan Cheng2006-09-011-1/+4
| | | | llvm-svn: 30017
* Yikes. This requires checking apple gcc version.Evan Cheng2006-09-011-2/+4
| | | | llvm-svn: 30016
* initial changes to support JIT'ing from multiple module providers, implicitlyChris Lattner2006-08-161-1/+12
| | | | | | linking the program on the fly. llvm-svn: 29721
* Fix the build on my old and busted version of OS XNate Begeman2006-07-221-1/+6
| | | | llvm-svn: 29266
* Forgot to #ifdef __APPLE__Evan Cheng2006-07-221-0/+2
| | | | llvm-svn: 29264
* Resolve __dso_handle.Evan Cheng2006-07-211-0/+8
| | | | llvm-svn: 29259
* Remove non-portable optimization that isn't worth itChris Lattner2006-07-121-5/+1
| | | | llvm-svn: 29115
* Adapt to new interface function materialization interfaceChris Lattner2006-07-071-9/+5
| | | | llvm-svn: 29051
* Fix -pedantic warnings.Chris Lattner2006-06-011-11/+11
| | | | llvm-svn: 28636
OpenPOWER on IntegriCloud