summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CBackend
Commit message (Collapse)AuthorAgeFilesLines
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-6/+4
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Factor commonality in triple match routines into helper template for registeringDaniel Dunbar2009-07-261-9/+1
| | | | | | classes, and migrate existing targets over. llvm-svn: 77126
* Kill Target specific ModuleMatchQuality stuff.Daniel Dunbar2009-07-261-8/+1
| | | | | | - This was overkill and inconsistently implemented. llvm-svn: 77114
* Add TargetRegistry::lookupTarget.Daniel Dunbar2009-07-261-1/+4
| | | | | | | | | | | | | | - This is a simplified mechanism which just looks up a target based on the target triple, with a few additional flags. - Remove getClosestStaticTargetForModule, the moral equivalent is now: lookupTarget(Mod->getTargetTriple, true, false, ...); - This no longer does the fuzzy matching with target data (based on endianness and pointer width) that getClosestStaticTargetForModule was doing, but this was deemed unnecessary. llvm-svn: 77111
* Simplify JIT target selection.Daniel Dunbar2009-07-251-6/+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
* Add new helpers for registering targets.Daniel Dunbar2009-07-251-6/+4
| | | | | | - Less boilerplate == good. llvm-svn: 77052
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-1/+1
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Simplify some uses of Value::getName()Daniel Dunbar2009-07-221-1/+1
| | | | llvm-svn: 76786
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-5/+7
| | | | llvm-svn: 76702
* Put Target definitions inside Target specific header, and llvm namespace.Daniel Dunbar2009-07-183-2/+4
| | | | llvm-svn: 76344
* Make sure CWriter's Context get's initialized.Daniel Dunbar2009-07-171-0/+2
| | | | llvm-svn: 76147
* Kill off <TARGET>MachineModule variables, and <TARGETASMPRINTER>ForceLinkDaniel Dunbar2009-07-161-8/+0
| | | | | | | variables. - Module initialization functions supplanted the need for these. llvm-svn: 75886
* Reapply TargetRegistry refactoring commits.Daniel Dunbar2009-07-152-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --- 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-152-14/+16
| | | | | | | | repair broken LLVM-GCC build. Will revert 75770 in the llvm-gcc trunk. llvm-svn: 75799
* Kill off old (TargetMachine level, not Target level) match quality functions.Daniel Dunbar2009-07-151-4/+0
| | | | llvm-svn: 75780
* Provide TargetMachine implementations with reference to Target they were createdDaniel Dunbar2009-07-151-2/+2
| | | | | | | | from. - This commit is almost entirely propogating the reference through the TargetMachine subclasses' constructor calls. llvm-svn: 75778
* Switch some obvious clients to using the new TargetRegistry.Daniel Dunbar2009-07-151-9/+10
| | | | llvm-svn: 75767
* Register Target's TargetMachine and AsmPrinter in the new registry.Daniel Dunbar2009-07-151-1/+2
| | | | | | | - This abuses TargetMachineRegistry's constructor for now, this will get cleaned up in time. llvm-svn: 75762
* Add TargetInfo libraries for all targets.Daniel Dunbar2009-07-154-0/+62
| | | | | | | | - Intended to match current TargetMachine implementations. - No facilities for linking these in yet. llvm-svn: 75751
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-141-1/+1
| | | | llvm-svn: 75703
* Have asm printers use formatted_raw_ostream directly to avoid aDavid Greene2009-07-142-20/+25
| | | | | | dynamic_cast<>. llvm-svn: 75670
* Reapply my previous asmprinter changes now with more testing and two Chris Lattner2009-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | additional bug fixes: 1. The bug that everyone hit was a problem in the asmprinter where it would remove $stub but keep the L prefix on a name when emitting the indirect symbol. This is easy to fix by keeping the name of the stub and the name of the symbol in a StringMap instead of just keeping a StringSet and trying to reconstruct it late. 2. There was a problem printing the personality function. The current logic to print out the personality function from the DWARF information is a bit of a cesspool right now that duplicates a bunch of other logic in the asm printer. The short version of it is that it depends on emitting both the L and _ prefix for symbols (at least on darwin) and until I can untangle it, it is best to switch the mangler back to emitting both prefixes. llvm-svn: 75646
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-22/+22
| | | | | | | | | 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
* Revert r7561{9,8,7,6}, which depend on r75610. Daniel Dunbar2009-07-141-1/+1
| | | | | | | | | | | | | | | | | | --- Reverse-merging r75619 into '.': U lib/Target/DarwinTargetAsmInfo.cpp U lib/CodeGen/AsmPrinter/AsmPrinter.cpp --- Reverse-merging r75618 into '.': U lib/CodeGen/ELFWriter.cpp U lib/CodeGen/MachOCodeEmitter.cpp U lib/CodeGen/MachOWriter.cpp --- Reverse-merging r75617 into '.': U lib/Target/CBackend/CBackend.cpp --- Reverse-merging r75616 into '.': U tools/bugpoint/Miscompilation.cpp U tools/lto/LTOCodeGenerator.cpp U tools/lto/LTOModule.cpp llvm-svn: 75638
* rename getValueName -> getMangledNameChris Lattner2009-07-141-1/+1
| | | | llvm-svn: 75617
* fix CBE & MSIL backends to not use the mangler for non-global symbols.Chris Lattner2009-07-131-24/+29
| | | | llvm-svn: 75556
* These don't really need contexts either.Owen Anderson2009-07-131-2/+2
| | | | llvm-svn: 75528
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-131-6/+6
| | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. llvm-svn: 75445
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-13/+13
| | | | | | | | | 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
* Implement changes from Chris's feedback.Torok Edwin2009-07-081-18/+36
| | | | | | Finish converting lib/Target. llvm-svn: 75043
* Privatize some variables.Owen Anderson2009-06-261-5/+4
| | | | llvm-svn: 74315
* Provide InitializeAllTargets and InitializeNativeTarget functions in theBob Wilson2009-06-231-4/+2
| | | | | | | | C bindings. Change all the backend "Initialize" functions to have C linkage. Change the "llvm/Config/Targets.def" header to use C-style comments to avoid compile warnings. llvm-svn: 74026
* It looks like nobody is working on PR 4158, so I'mDale Johannesen2009-06-181-0/+11
| | | | | | | | | adding a check to catch this case at compile time instead of quietly generating incorrect code. That will at least let us identify CBE failures that are not due to this problem. llvm-svn: 73668
* Introduce new headers whose inclusion forces linking andDouglas Gregor2009-06-161-0/+5
| | | | | | | | | initialization of all targets (InitializeAllTargets.h) or assembler printers (InitializeAllAsmPrinters.h). This is a step toward the elimination of relinked object files, so that we can build normal archives. llvm-svn: 73543
* Fix an erroneous check for isFNeg; the FNeg case is handledDan Gohman2009-06-041-1/+1
| | | | | | a few lines later on. llvm-svn: 72904
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-041-15/+20
| | | | | | | | | | | | | | | integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
* Spacing fix.Dale Johannesen2009-05-191-1/+1
| | | | llvm-svn: 72083
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-091-2/+2
| | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349
* Instead of passing in an unsigned value for the optimization level, use an enum,Bill Wendling2009-04-292-2/+2
| | | | | | | which better identifies what the optimization is doing. And is more flexible for future uses. llvm-svn: 70440
* Second attempt:Bill Wendling2009-04-292-2/+3
| | | | | | | | | | | | Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'll change the JIT with a follow-up patch. llvm-svn: 70343
* r70270 isn't ready yet. Back this out. Sorry for the noise.Bill Wendling2009-04-282-3/+2
| | | | llvm-svn: 70275
* Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want toBill Wendling2009-04-282-2/+3
| | | | | | | | | | | use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'm not 100% sure if it's necessary to change it there... llvm-svn: 70270
* Match C backend only if it explicitly requested.Devang Patel2009-04-201-2/+3
| | | | llvm-svn: 69613
* Fix some failures in targets on available_externally functions,Chris Lattner2009-04-171-0/+5
| | | | | | | this fixes a crash on CodeGen/Generic/externally_available.ll on ppc hosts. Thanks to Nicholas L for pointing this out. llvm-svn: 69333
* Fix internal representation of fp80 to be theDale Johannesen2009-03-231-3/+2
| | | | | | | | | | same as a normal i80 {low64, high16} rather than its own {high64, low16}. A depressing number of places know about this; I think I got them all. Bitcode readers and writers convert back to the old form to avoid breaking compatibility. llvm-svn: 67562
* Add the private linkage.Rafael Espindola2009-01-151-3/+3
| | | | llvm-svn: 62279
* fix memleaksNuno Lopes2009-01-131-0/+2
| | | | llvm-svn: 62198
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-121-2/+2
| | | | | | suggested by Chris. llvm-svn: 62099
* Removed trailing whitespace from Makefiles.Misha Brukman2009-01-091-2/+2
| | | | llvm-svn: 61991
* __fastcall and __stdcall are mingw extensions to gcc for windows. Use theNick Lewycky2008-11-261-2/+2
| | | | | | __attribute__ notation which is supported on more platforms. llvm-svn: 60083
OpenPOWER on IntegriCloud