summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/XCore
Commit message (Collapse)AuthorAgeFilesLines
* switch off of 'Section' onto MCSection. We're not properly usingChris Lattner2009-07-313-6/+10
| | | | | | MCSection subclasses yet, but this is a step in the right direction. llvm-svn: 77708
* Move types back to the 2.5 API.Owen Anderson2009-07-291-3/+3
| | | | llvm-svn: 77516
* pass the mangler down into the various SectionForGlobal methods.Chris Lattner2009-07-291-2/+2
| | | | | | No functionality change. llvm-svn: 77432
* Change ConstantArray to 2.5 API.Owen Anderson2009-07-281-1/+1
| | | | llvm-svn: 77347
* Rip all of the global variable lowering logic out of TargetAsmInfo. SinceChris Lattner2009-07-287-38/+67
| | | | | | | | | | | | | | | | | | | | it is highly specific to the object file that will be generated in the end, this introduces a new TargetLoweringObjectFile interface that is implemented for each of ELF/MachO/COFF/Alpha/PIC16 and XCore. Though still is still a brutal and ugly refactoring, this is a major step towards goodness. This patch also: 1. fixes a bunch of dangling pointer problems in the PIC16 backend. 2. disables the TargetLowering copy ctor which PIC16 was accidentally using. 3. gets us closer to xcore having its own crazy target section flags and pic16 not having to shadow sections with its own objects. 4. fixes wierdness where ELF targets would set CStringSection but not CStringSection_. Factor the code better. 5. fixes some bugs in string lowering on ELF targets. llvm-svn: 77294
* Eliminate getNamed/getUnnamedSection, adding a new and unified ↵Chris Lattner2009-07-271-5/+7
| | | | | | | | getOrCreateSection instead. llvm-svn: 77186
* Eliminate SectionFlags, just embed a SectionKind into SectionChris Lattner2009-07-271-6/+6
| | | | | | instead and drive things based off of that. llvm-svn: 77184
* Factor commonality in triple match routines into helper template for registeringDaniel Dunbar2009-07-261-10/+1
| | | | | | classes, and migrate existing targets over. llvm-svn: 77126
* Kill Target specific ModuleMatchQuality stuff.Daniel Dunbar2009-07-261-11/+1
| | | | | | - This was overkill and inconsistently implemented. llvm-svn: 77114
* this is (unfortunately) several changes mixed together:Chris Lattner2009-07-251-3/+3
| | | | | | | | | | | | | | 1. Spell SectionFlags::Writeable as "Writable". 2. Add predicates for deriving SectionFlags from SectionKinds. 3. Sink ELF-specific getSectionPrefixForUniqueGlobal impl into ELFTargetAsmInfo. 4. Fix SectionFlagsForGlobal to know that BSS/ThreadBSS has the BSS bit set (the real fix for PR4619). 5. Fix isSuitableForBSS to not put globals with explicit sections set in BSS (which was the reason #4 wasn't fixed earlier). 6. Remove my previous hack for PR4619. llvm-svn: 77085
* 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-253-26/+7
| | | | | | - Less boilerplate == good. llvm-svn: 77052
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-252-8/+10
| | | | | | | | | | - 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-2/+1
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Remove unused member functions.Eli Friedman2009-07-242-26/+0
| | | | llvm-svn: 76960
* remove SectionFlags::Small: it is only used on Xcore, and we'll findChris Lattner2009-07-221-11/+6
| | | | | | a better solution for it in the future. llvm-svn: 76818
* Thread local globals don't require special handling by the linker and so canRichard Osborne2009-07-221-0/+7
| | | | | | be placed in the standard data / bss sections. llvm-svn: 76735
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-4/+4
| | | | llvm-svn: 76702
* remove the last bits of SectionFlagsForGlobal. There is some flag here thatChris Lattner2009-07-212-30/+2
| | | | | | | | | depends on XS1A, but I think the ReadOnlySection is already set up for this and there is no testcase that this breaks. If this is really needed, we can add the appropriate parameterization to TargetAsmInfo in the future to support this. llvm-svn: 76667
* don't mask out the small flag and then reapply it later.Chris Lattner2009-07-211-15/+1
| | | | llvm-svn: 76666
* if Xcore doesn't support TLS, it doesn't have to worry about thread local ↵Chris Lattner2009-07-211-1/+1
| | | | | | LLVM IR, it should be rejected by a front-end. llvm-svn: 76665
* remove the Xcore implementation of SelectSectionForGlobal. While you haveChris Lattner2009-07-212-22/+0
| | | | | | to twist your brain to see it, I believe it is the same as ELFTargetAsmInfo::SelectSectionForGlobal. llvm-svn: 76664
* Remove the XCore custom implementation of MergeableConstSection, relying onChris Lattner2009-07-212-18/+0
| | | | | | | | the generic ELF version instead. This will result in its mergable constant sections getting named ".rodata.cst4" instead of ".cp.const4", but the linker looks at the section flags, not the name of the section AFAICT. llvm-svn: 76659
* Remove some overridden functions in XCoreTargetAsmInfo that areChris Lattner2009-07-212-67/+3
| | | | | | | implemented exactly the same way as its ELFTargetAsmInfo subclass has them. llvm-svn: 76653
* Remove shift amount flavor. It isn't actually complete enough to Eli Friedman2009-07-211-2/+0
| | | | | | | | be useful, and it's currently unused. (Some issues: it isn't actually rich enough to capture the semantics on many architectures, and semantics can vary depending on the type being shifted.) llvm-svn: 76633
* make AsmPrinter::doFinalization iterate over the global variablesChris Lattner2009-07-211-12/+2
| | | | | | | and call PrintGlobalVariable, allowing elimination and simplification of various targets. llvm-svn: 76604
* reduce indentation by using an early exit.Chris Lattner2009-07-211-73/+68
| | | | llvm-svn: 76596
* Add plumbing for the `linker_private' linkage type. This type is meant forBill Wendling2009-07-201-0/+2
| | | | | | | | | "private" symbols which the assember shouldn't strip, but which the linker may remove after evaluation. This is mostly useful for Objective-C metadata. This is plumbing, so we don't have a use of it yet. More to come, etc. llvm-svn: 76385
* Tweak cmake files for the four targets that don't split CodeGen out.Daniel Dunbar2009-07-191-1/+1
| | | | | | | - We should canonicalize this and get rid of the cmake and llvm-config hacks to support both variants. llvm-svn: 76350
* Add dependencies from TargetInfo onto .td generation.Daniel Dunbar2009-07-191-0/+1
| | | | | | | - Shouldn't really be necessary, but currently .inc files get included into some main target headers. llvm-svn: 76349
* Put Target definitions inside Target specific header, and llvm namespace.Daniel Dunbar2009-07-183-2/+5
| | | | llvm-svn: 76344
* Handle void in XCoreTargetLowering::isLegalAddressingMode. Triggers in Eli Friedman2009-07-171-0/+5
| | | | | | test/CodeGen/Generic. llvm-svn: 76162
* Combine an unaligned store of unaligned load into a memmove.Richard Osborne2009-07-162-0/+54
| | | | llvm-svn: 75908
* Lower the threshold at which memcpy / memmove / memset stop being expandedRichard Osborne2009-07-161-0/+3
| | | | | | inline in the XCore. llvm-svn: 75906
* Fix typo in last commit on expansion of unaligned loads.Richard Osborne2009-07-161-2/+2
| | | | llvm-svn: 75903
* Expand unaligned 32 bit loads from an address which is a constantRichard Osborne2009-07-161-0/+109
| | | | | | | | | | | | | | | offset from a 32 bit aligned base as follows: ldw low, base[offset >> 2] ldw high, base[(offset >> 2) + 1] shr low_shifted, low, (offset & 0x3) * 8 shl high_shifted, high, 32 - (offset & 0x3) * 8 or result, low_shifted, high_shifted Expand 32 bit loads / stores with 16 bit alignment into two 16 bit loads / stores. llvm-svn: 75902
* Custom lower unaligned 32 bit stores and loads into libcalls. This is Richard Osborne2009-07-162-1/+90
| | | | | | | a big code size win since before they were expanding to upto 16 instructions. llvm-svn: 75901
* 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
* Lift addAssemblyEmitter into LLVMTargetMachine.Daniel Dunbar2009-07-152-14/+0
| | | | | | - No functionality change. llvm-svn: 75859
* Register AsmPrinter for XCore, MSP430, and PIC16 targets.Daniel Dunbar2009-07-153-7/+12
| | | | | | - Switch to standard addAssemblyEmitter logic. llvm-svn: 75854
* Remove unused function.Daniel Dunbar2009-07-151-16/+0
| | | | llvm-svn: 75829
* Reapply TargetRegistry refactoring commits.Daniel Dunbar2009-07-152-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --- 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-7/+14
| | | | | | | | repair broken LLVM-GCC build. Will revert 75770 in the llvm-gcc trunk. llvm-svn: 75799
* Fix pattern for LD16S_3r, add basic tests to check load / store instructionsRichard Osborne2009-07-151-1/+1
| | | | | | are being properly selected. llvm-svn: 75797
* Fix XCoreTargetLowering::isLegalAddressingMode to handle non simple VTs.Richard Osborne2009-07-151-24/+10
| | | | llvm-svn: 75788
* Remove the xcore-file-directive option now that LLVM has proper support forRichard Osborne2009-07-151-19/+1
| | | | | | emitting file directives with one parameter. llvm-svn: 75787
* Kill off old (TargetMachine level, not Target level) match quality functions.Daniel Dunbar2009-07-152-10/+0
| | | | llvm-svn: 75780
* Provide TargetMachine implementations with reference to Target they were createdDaniel Dunbar2009-07-152-3/+5
| | | | | | | | from. - This commit is almost entirely propogating the reference through the TargetMachine subclasses' constructor calls. llvm-svn: 75778
* 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/+65
| | | | | | | | - Intended to match current TargetMachine implementations. - No facilities for linking these in yet. llvm-svn: 75751
OpenPOWER on IntegriCloud