summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* Initialize the PoisonMemory member before initializingDan Gohman2009-08-271-7/+7
| | | | | | | | | members that call methods that read the PoisonMemory member. This fixes potential spurious (though probably otherwise harmless) poising of unused memory, and fixes the associated valgrind error. llvm-svn: 80192
* Fix PR4772 ARM JIT.GlobalInFuction unittest by explicitly initialize MMI Xerxes Ranby2009-08-251-1/+1
| | | | | | | | | to 0 during JITEmitter constructor. Modified: lib/ExecutionEngine/JIT/JITEmitter.cpp llvm-svn: 79982
* just remove interpreter support for endianness mismatches. This wasChris Lattner2009-08-231-12/+0
| | | | | | | really old code from when we were running sparcv9 bc files on x86 (before I ported llvm-gcc 3 to work on x86) :) llvm-svn: 79871
* remove use of alloca.hChris Lattner2009-08-231-5/+7
| | | | llvm-svn: 79870
* remove some uses of llvm/Support/Streams.hChris Lattner2009-08-232-5/+4
| | | | llvm-svn: 79842
* remove a few DOUTs here and there.Chris Lattner2009-08-234-49/+49
| | | | llvm-svn: 79832
* remove the std::ostream version of module and type printing.Chris Lattner2009-08-232-6/+6
| | | | llvm-svn: 79823
* eliminate the "Value" printing methods that print to a std::ostream.Chris Lattner2009-08-232-46/+44
| | | | | | This required converting a bunch of stuff off DOUT and other cleanups. llvm-svn: 79819
* Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner2009-08-221-41/+41
| | | | llvm-svn: 79763
* Fix a bug where the DWARF emitter in the JIT was not initializing alignmentReid Kleckner2009-08-212-28/+22
| | | | | | | | | | bytes. libgcc doesn't seem to mind, but if you pass this DWARF to GDB, it doesn't like it. Also make the JIT memory manager to initialize it's memory to garbage in debug mode, so that it's easier to find bugs like these in the future. llvm-svn: 79674
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-134-50/+65
| | | | llvm-svn: 78948
* This void is implicit in C++.Dan Gohman2009-08-124-6/+6
| | | | llvm-svn: 78848
* SjLj based exception handling unwinding support. This patch is nasty, brutishJim Grosbach2009-08-111-4/+4
| | | | | | | | | | | | | and short. Well, it's kinda short. Definitely nasty and brutish. The front-end generates the register/unregister calls into the SjLj runtime, call-site indices and landing pad dispatch. The back end fills in the LSDA with the call-site information provided by the front end. Catch blocks are not yet implemented. Built on Darwin and verified no llvm-core "make check" regressions. llvm-svn: 78625
* MSVC warning fixes; patch by Stein Roger!Daniel Dunbar2009-08-071-0/+11
| | | | llvm-svn: 78405
* To catch bugs like the one fixed inJeffrey Yasskin2009-08-071-13/+18
| | | | | | | | | | | | | http://llvm.org/viewvc/llvm-project?view=rev&revision=78127, I'm changing the ExecutionEngine's global mappings to hold AssertingVH<const GlobalValue>. That way, if unregistering a mapping fails to actually unregister it, we'll get an assert. Running the jit nightly tests didn't uncover any actual instances of the problem. This also uncovered the fact that AssertingVH<const X> didn't work, so I fixed that too. llvm-svn: 78400
* Fix a bunch of namespace pollution.Dan Gohman2009-08-071-0/+2
| | | | llvm-svn: 78363
* Make ExecutionEngine::updateGlobalMapping(GV, NULL) properly remove GV's oldJeffrey Yasskin2009-08-041-1/+1
| | | | | | address from the reverse mapping, and add a test that this works now. llvm-svn: 78127
* No really, it's unused.Daniel Dunbar2009-08-041-2/+1
| | | | llvm-svn: 78047
* llvm_report_error already prints "LLVM ERROR:". So stop reporting errors ↵Benjamin Kramer2009-08-032-2/+2
| | | | | | like "LLVM ERROR: llvm: error:" or "LLVM ERROR: ERROR:". llvm-svn: 77971
* Remove now unused arguments from TargetRegistry::lookupTarget.Daniel Dunbar2009-08-031-4/+1
| | | | llvm-svn: 77950
* Pass target triple string in to TargetMachine constructor.Daniel Dunbar2009-08-031-28/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | This is not just a matter of passing in the target triple from the module; currently backends are making decisions based on the build and host architecture. The goal is to migrate to making these decisions based off of the triple (in conjunction with the feature string). Thus most clients pass in the target triple, or the host triple if that is empty. This has one important change in the way behavior of the JIT and llc. For the JIT, it was previously selecting the Target based on the host (naturally), but it was setting the target machine features based on the triple from the module. Now it is setting the target machine features based on the triple of the host. For LLC, -march was previously only used to select the target, the target machine features were initialized from the module's triple (which may have been empty). Now the target triple is taken from the module, or the host's triple is used if that is empty. Then the triple is adjusted to match -march. The take away is that -march for llc is now used in conjunction with the host triple to initialize the subtarget. If users want more deterministic behavior from llc, they should use -mtriple, or set the triple in the input module. llvm-svn: 77946
* Fix the build for people with oprofile installed.Nick Lewycky2009-08-021-3/+4
| | | | llvm-svn: 77914
* In TrimAllocationToSize, if a block is below the minimum allocation size,Nicolas Geoffray2009-07-291-1/+4
| | | | | | | there is no new block added to the free list. Therefore on the next startFunctionBody call, a new slab must be allocated. llvm-svn: 77520
* Move types back to the 2.5 API.Owen Anderson2009-07-291-2/+1
| | | | llvm-svn: 77516
* Move ConstantExpr to 2.5 API.Owen Anderson2009-07-291-1/+1
| | | | llvm-svn: 77494
* Move ConstantFP construction back to the 2.5-ish API.Owen Anderson2009-07-271-3/+3
| | | | llvm-svn: 77247
* Remove Value::getName{Start,End}, the last of the old Name APIs.Daniel Dunbar2009-07-262-11/+11
| | | | llvm-svn: 77152
* Eliminate some uses of DOUT, cerr, and getNameStart().Daniel Dunbar2009-07-261-1/+2
| | | | llvm-svn: 77145
* Simplify JIT target selection.Daniel Dunbar2009-07-251-1/+1
| | | | | | | | | | - Instead of requiring targets to define a JIT quality match function, we just have them specify if they support a JIT. - Target selection for the JIT just gets the host triple and looks for the best target which matches the triple and has a JIT. llvm-svn: 77060
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-251-13/+13
| | | | | | | | | | - Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. llvm-svn: 77019
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-3/+3
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Switch to getNameStr().Daniel Dunbar2009-07-241-3/+3
| | | | llvm-svn: 76962
* Re-committing r76828 with the JIT memory manager changes now that the buildReid Kleckner2009-07-232-104/+311
| | | | | | bots like the BumpPtrAllocator changes. llvm-svn: 76902
* Reverting r76825 and r76828, since they caused clang runtime errors and some ↵Reid Kleckner2009-07-232-311/+104
| | | | | | build failure involving memset. llvm-svn: 76838
* Make the JIT code emitter properly retry and ask for more memory when it runsReid Kleckner2009-07-232-104/+311
| | | | | | | | | | | | | out of memory, and also make the default memory manager allocate more memory when it runs out. Also, switch function stubs and global data over to using the BumpPtrAllocator. This makes it so the JIT no longer mmaps (or the equivalent on Windows) 16 MB of memory, and instead allocates in 512K slabs. I suspect this size could go lower, especially on embedded platforms, now that more slabs can be allocated. llvm-svn: 76828
* Simplify some uses of Value::getName()Daniel Dunbar2009-07-221-2/+2
| | | | llvm-svn: 76786
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-9/+9
| | | | llvm-svn: 76702
* Simplify / normalize some uses of Value::getName.Daniel Dunbar2009-07-213-3/+3
| | | | llvm-svn: 76553
* Add EngineBuilder to ExecutionEngine in favor of the five optional argument ↵Reid Kleckner2009-07-187-55/+109
| | | | | | | | EE::create(). Also a test commit. llvm-svn: 76276
* Add line numbers to OProfile. To do this, I added a processDebugLoc()Jeffrey Yasskin2009-07-162-4/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | call to the MachineCodeEmitter interface and made copying the start line of a function not conditional on whether we're emitting Dwarf debug information. I'll propagate the processDebugLoc() calls to the non-X86 targets in a followup patch. In the long run, it'll probably be better to gather this information through the DwarfWriter, but the DwarfWriter currently depends on the AsmPrinter and TargetAsmInfo, and fixing that would be out of the way for this patch. There's a bug in OProfile 0.9.4 that makes it ignore line numbers for addresses above 4G, and a patch fixing it at http://thread.gmane.org/gmane.linux.oprofile/7634 Sample output: $ sudo opcontrol --reset; sudo opcontrol --start-daemon; sudo opcontrol --start; `pwd`/Debug/bin/lli fib.bc; sudo opcontrol --stop Signalling daemon... done Profiler running. fib(40) == 165580141 Stopping profiling. $ opreport -g -d -l `pwd`/Debug/bin/lli|head -60 Overflow stats not available CPU: Core 2, speed 1998 MHz (estimated) Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000 vma samples % linenr info image name symbol name 00007f67a30370b0 25489 61.2554 fib.c:24 10946.jo fib_left 00007f67a30370b0 1634 6.4106 fib.c:24 00007f67a30370b1 83 0.3256 fib.c:24 00007f67a30370b9 1997 7.8348 fib.c:24 00007f67a30370c6 2080 8.1604 fib.c:27 00007f67a30370c8 988 3.8762 fib.c:27 00007f67a30370cd 1315 5.1591 fib.c:27 00007f67a30370cf 251 0.9847 fib.c:27 00007f67a30370d3 1191 4.6726 fib.c:27 00007f67a30370d6 975 3.8252 fib.c:27 00007f67a30370db 1010 3.9625 fib.c:27 00007f67a30370dd 242 0.9494 fib.c:27 00007f67a30370e1 2782 10.9145 fib.c:28 00007f67a30370e5 3768 14.7828 fib.c:28 00007f67a30370eb 615 2.4128 (no location information) 00007f67a30370f3 6558 25.7287 (no location information) 00007f67a3037100 15603 37.4973 fib.c:29 10946.jo fib_right 00007f67a3037100 1646 10.5493 fib.c:29 00007f67a3037101 45 0.2884 fib.c:29 00007f67a3037109 2372 15.2022 fib.c:29 00007f67a3037116 2234 14.3178 fib.c:32 00007f67a3037118 612 3.9223 fib.c:32 00007f67a303711d 622 3.9864 fib.c:32 00007f67a303711f 385 2.4675 fib.c:32 00007f67a3037123 404 2.5892 fib.c:32 00007f67a3037126 634 4.0633 fib.c:32 00007f67a303712b 870 5.5759 fib.c:32 00007f67a303712d 62 0.3974 fib.c:32 00007f67a3037131 1848 11.8439 fib.c:33 00007f67a3037135 2840 18.2016 fib.c:33 00007f67a303713a 1 0.0064 fib.c:33 00007f67a303713b 1023 6.5564 (no location information) 00007f67a3037143 5 0.0320 (no location information) 000000000080c1e4 15 0.0360 MachineOperand.h:150 lli llvm::MachineOperand::isReg() const 000000000080c1e4 6 40.0000 MachineOperand.h:150 000000000080c1ec 2 13.3333 MachineOperand.h:150 ... llvm-svn: 76102
* Remove unused header.Daniel Dunbar2009-07-161-1/+1
| | | | llvm-svn: 75893
* Switch llc and createJIT to use simpler command line parsing for -march.Daniel Dunbar2009-07-161-9/+22
| | | | llvm-svn: 75890
* Reapply TargetRegistry refactoring commits.Daniel Dunbar2009-07-151-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --- Reverse-merging r75799 into '.': U test/Analysis/PointerTracking U include/llvm/Target/TargetMachineRegistry.h U include/llvm/Target/TargetMachine.h U include/llvm/Target/TargetRegistry.h U include/llvm/Target/TargetSelect.h U tools/lto/LTOCodeGenerator.cpp U tools/lto/LTOModule.cpp U tools/llc/llc.cpp U lib/Target/PowerPC/PPCTargetMachine.h U lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp U lib/Target/PowerPC/PPCTargetMachine.cpp U lib/Target/PowerPC/PPC.h U lib/Target/ARM/ARMTargetMachine.cpp U lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp U lib/Target/ARM/ARMTargetMachine.h U lib/Target/ARM/ARM.h U lib/Target/XCore/XCoreTargetMachine.cpp U lib/Target/XCore/XCoreTargetMachine.h U lib/Target/PIC16/PIC16TargetMachine.cpp U lib/Target/PIC16/PIC16TargetMachine.h U lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp U lib/Target/Alpha/AlphaTargetMachine.cpp U lib/Target/Alpha/AlphaTargetMachine.h U lib/Target/X86/X86TargetMachine.h U lib/Target/X86/X86.h U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h U lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp U lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h U lib/Target/X86/X86TargetMachine.cpp U lib/Target/MSP430/MSP430TargetMachine.cpp U lib/Target/MSP430/MSP430TargetMachine.h U lib/Target/CppBackend/CPPTargetMachine.h U lib/Target/CppBackend/CPPBackend.cpp U lib/Target/CBackend/CTargetMachine.h U lib/Target/CBackend/CBackend.cpp U lib/Target/TargetMachine.cpp U lib/Target/IA64/IA64TargetMachine.cpp U lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp U lib/Target/IA64/IA64TargetMachine.h U lib/Target/IA64/IA64.h U lib/Target/MSIL/MSILWriter.cpp U lib/Target/CellSPU/SPUTargetMachine.h U lib/Target/CellSPU/SPU.h U lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp U lib/Target/CellSPU/SPUTargetMachine.cpp U lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp U lib/Target/Mips/MipsTargetMachine.cpp U lib/Target/Mips/MipsTargetMachine.h U lib/Target/Mips/Mips.h U lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp U lib/Target/Sparc/SparcTargetMachine.cpp U lib/Target/Sparc/SparcTargetMachine.h U lib/ExecutionEngine/JIT/TargetSelect.cpp U lib/Support/TargetRegistry.cpp llvm-svn: 75820
* Revert 75762, 75763, 75766..75769, 75772..75775, 75778, 75780, 75782 to ↵Stuart Hastings2009-07-151-7/+6
| | | | | | | | repair broken LLVM-GCC build. Will revert 75770 in the llvm-gcc trunk. llvm-svn: 75799
* Migrate llc and the JIT to using the TargetRegistry for lookups.Daniel Dunbar2009-07-151-6/+7
| | | | | | | | | | | | - They still use the TargetMachineRegistry to populate the contents of the -march option (via the listener interface). We can't just populate it in the option parser because we can't expect the TargetRegistry to be populated yet (we no longer rely on static constructors). - There are a couple ways to finish killing off TargetMachineRegistry, but I haven't figured out the cleanest one yet... llvm-svn: 75773
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-141-8/+10
| | | | llvm-svn: 75703
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-146-51/+51
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* Match declaration to definition.Daniel Dunbar2009-07-121-1/+1
| | | | llvm-svn: 75440
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-116-22/+26
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-117-96/+91
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
OpenPOWER on IntegriCloud