summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Improve JIT debugging outputs format consistency.Evan Cheng2008-11-061-11/+14
| | | | llvm-svn: 58807
* Need a \n.Evan Cheng2008-11-061-1/+2
| | | | llvm-svn: 58788
* Undo 58778 but makes the binary dump prettier.Evan Cheng2008-11-051-3/+21
| | | | llvm-svn: 58782
* Remove debug output that's not really useful.Evan Cheng2008-11-051-13/+0
| | | | llvm-svn: 58778
* Rename isGVLazyPtr to isGVNonLazyPtr relocation. This represents Mac OS XEvan Cheng2008-11-051-22/+22
| | | | | | indirect gv reference. Please don't call it lazy. llvm-svn: 58746
* Silence a compiler warning.Evan Cheng2008-11-031-1/+1
| | | | llvm-svn: 58598
* Revert errant deletion. The target needs to be able to specify that it ↵Jim Grosbach2008-10-301-0/+5
| | | | | | doesn't want the generic constant pool to be emitted. llvm-svn: 58475
* Let target resolve some relocation results.Evan Cheng2008-10-291-30/+23
| | | | llvm-svn: 58407
* Support for constant islands in the ARM JIT.Jim Grosbach2008-10-281-0/+9
| | | | | | | | | | | | | | | | Since the ARM constant pool handling supercedes the standard LLVM constant pool entirely, the JIT emitter does not allocate space for the constants, nor initialize the memory. The constant pool is considered part of the instruction stream. Likewise, when resolving relocations into the constant pool, a hook into the target back end is used to resolve from the constant ID# to the address where the constant is stored. For now, the support in the ARM emitter is limited to 32-bit integer. Future patches will expand this to the full range of constants necessary. llvm-svn: 58338
* fix a tricky bug in the JIT global variable emitter, that was triggered when ↵Nuno Lopes2008-10-211-5/+22
| | | | | | JITing a variable independently of a function. This lead to sharing memory memory between functions and GVs thus changing the value of a GV could change the code in execution. more details on the ML. llvm-svn: 57900
* On Darwin ARM, memory needs special handling to do JIT. This patch expandsJim Grosbach2008-10-031-1/+11
| | | | | | | this handling to work properly for modifying stub functions, relocations back to entry points after JIT compilation, etc.. llvm-svn: 57013
* Switch the MachineOperand accessors back to the short names likeDan Gohman2008-10-031-1/+1
| | | | | | isReg, etc., from isRegister, etc. llvm-svn: 57006
* Acquire the lock only when necessary. More precisely, do not acquireNicolas Geoffray2008-10-031-10/+22
| | | | | | the lock when calling a method which may materialize the llvm::Function. llvm-svn: 56995
* Preliminary support for systems which require changing JIT memory regions ↵Evan Cheng2008-09-181-0/+3
| | | | | | privilege from read / write to read / executable. llvm-svn: 56303
* Make safer variant of alias resolution routine to be defaultAnton Korobeynikov2008-09-091-1/+1
| | | | llvm-svn: 56005
* MMI may be null.Evan Cheng2008-09-021-1/+3
| | | | llvm-svn: 55626
* Get rid of a couple of dynamic_cast.Evan Cheng2008-08-201-4/+10
| | | | llvm-svn: 55022
* Some fixes for x86-64 JIT. Make it use small codeDale Johannesen2008-08-111-0/+13
| | | | | | | | | | | | model, except for external calls; this makes addressing modes PC-relative. Incomplete. The assertion at the top of Emitter::runOnMachineFunction was obviously bogus (always true) so I removed it. If someone knows what the correct test should be to cover all the various targets, please fix. llvm-svn: 54656
* Rewrite JIT handling of GlobalVariables so theyDale Johannesen2008-08-071-7/+169
| | | | | | | | | | | | | | 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
* Implement JIT support for global aliases, patch by David Chisnall!Chris Lattner2008-06-251-0/+2
| | | | llvm-svn: 52738
* Switch the PPC backend and target-independent JIT to use the libsystem Chris Lattner2008-06-251-1/+2
| | | | | | | InvalidateInstructionCache method instead of calling through a hook on the JIT. This is a host feature, not a target feature. llvm-svn: 52734
* Provide generic hooks for icache invalidation. Add PPC implementation.Anton Korobeynikov2008-06-171-15/+1
| | | | | | Patch by Gary Benson! llvm-svn: 52418
* Fix a backwards check in the JIT symbol table codeNate Begeman2008-05-181-1/+1
| | | | llvm-svn: 51229
* Disable JIT symbol table for now.Evan Cheng2008-05-151-1/+1
| | | | llvm-svn: 51152
* Be pessimistic in computing the buffer size when aligning.Nicolas Geoffray2008-04-201-6/+9
| | | | llvm-svn: 50008
* Cosmetic changes, as suggested by Evan. No functionality changes.Nicolas Geoffray2008-04-201-3/+3
| | | | llvm-svn: 49993
* Enable jitting with a known memory size.Nicolas Geoffray2008-04-181-2/+63
| | | | llvm-svn: 49924
* Correlate stubs with functions in JIT: when emitting a stub, the JIT tells ↵Nicolas Geoffray2008-04-161-8/+10
| | | | | | | | the memory manager which function the stub will resolve. llvm-svn: 49814
* Fix some serious logic errors that broke the jit on darwin/x86-64.Chris Lattner2008-04-131-3/+3
| | | | llvm-svn: 49606
* Add debugging code.Evan Cheng2008-04-121-3/+7
| | | | llvm-svn: 49566
* Reenable JIT symbol table.Chris Lattner2008-04-111-1/+1
| | | | llvm-svn: 49548
* disable this for now.Chris Lattner2008-04-051-1/+1
| | | | llvm-svn: 49248
* Provide an initial cut at exposing JIT compiled symbols to performanceChris Lattner2008-04-041-1/+139
| | | | | | | tools. This is currently only enabled on the mac, but could easily be supported by other hosts that are interested. llvm-svn: 49207
* Add explicit keywords.Dan Gohman2008-03-251-1/+1
| | | | llvm-svn: 48801
* fix 80 col violationsChris Lattner2008-03-071-1/+2
| | | | llvm-svn: 48019
* Enable exception handling int JITNicolas Geoffray2008-02-131-1/+54
| | | | llvm-svn: 47079
* JITEmitter.cpp was trying to sync the icache for function stubs, butChris Lattner2008-01-251-8/+0
| | | | | | | | was actually passing a completely incorrect size to sys_icache_invalidate. Instead of having the JITEmitter do this (which doesn't have the correct size), just make the target sync its own stubs. llvm-svn: 46354
* X86 JIT PIC jumptable support.Evan Cheng2008-01-051-4/+6
| | | | llvm-svn: 45616
* X86 PIC JIT support fixes: encoding bugs, add lazy pointer stubs support.Evan Cheng2008-01-041-0/+49
| | | | llvm-svn: 45575
* Change MachineRelocation::DoesntNeedFnStub to NeedStub. This fields will be usedEvan Cheng2008-01-031-2/+2
| | | | | | for non-function GV relocations that require function address stubs (e.g. Mac OS X in non-static mode). llvm-svn: 45527
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* simplify creation of the interpreter, make ExecutionEngine ctor protected,Chris Lattner2007-12-061-4/+4
| | | | | | 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-051-411/+27
| | | | | | | own JITMemoryManager interface. There is no functionality change with this patch. llvm-svn: 44640
* 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
* 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-051-2/+2
| | | | | | 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
* Implement PR1240Anton Korobeynikov2007-03-061-2/+3
| | | | llvm-svn: 34959
* Fix PR1216 by cleaning up the ownership of JITResolver.Chris Lattner2007-02-241-29/+40
| | | | llvm-svn: 34552
OpenPOWER on IntegriCloud