summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/XCore
Commit message (Collapse)AuthorAgeFilesLines
...
* use XCore-specific section with xcore specific cp/dp flags to restore Chris Lattner2009-08-151-14/+26
| | | | | | | | support for globals going into the appropriate sections with the flags. This hopefully finishes unbreaking the previous behavior that I broke before. llvm-svn: 79079
* add support for target-specific ELF section flags, add a new MCSectionXCoreChris Lattner2009-08-152-0/+89
| | | | | | | class which represents the XCore cp/dp section flags. No functionality change yet. llvm-svn: 79077
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-132-4/+5
| | | | llvm-svn: 78948
* Change MCSectionELF to represent a section semantically instead ofBruno Cardoso Lopes2009-08-131-7/+14
| | | | | | | syntactically as a string, very similiar to what Chris did with MachO. The parsing support and validation is not introduced yet. llvm-svn: 78890
* This void is implicit in C++.Dan Gohman2009-08-122-2/+2
| | | | llvm-svn: 78848
* Change TargetAsmInfo to be constructed via TargetRegistry from a Target+TripleChris Lattner2009-08-125-11/+6
| | | | | | | | pair instead of from a virtual method on TargetMachine. This cuts the final ties of TargetAsmInfo to TargetMachine, meaning that MC can now use TargetAsmInfo. llvm-svn: 78802
* Add contexts to some of the MVT APIs. No functionality change yet, just the ↵Owen Anderson2009-08-121-4/+4
| | | | | | infrastructure work needed to get the contexts to where they need to be first. llvm-svn: 78759
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-112-141/+141
| | | | | | | | while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
* pass the TargetTriple down from each target ctor to theChris Lattner2009-08-111-1/+1
| | | | | | LLVMTargetMachine ctor. It is currently unused. llvm-svn: 78711
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-103-148/+148
| | | | | | own struct type. llvm-svn: 78610
* now that getOrCreateSection is all object-file specific,Chris Lattner2009-08-081-10/+7
| | | | | | | give the impls an object-file-specific name. In the future they can take different arguments etc. llvm-svn: 78495
* make printInstruction return void since its result is omitted. Make the Chris Lattner2009-08-081-1/+1
| | | | | | error condition get trapped with an assert. llvm-svn: 78449
* don't check the result of printInstruction anymore.Chris Lattner2009-08-081-4/+1
| | | | llvm-svn: 78444
* Major calling convention code refactoring.Dan Gohman2009-08-052-110/+127
| | | | | | | | | | | | | | | | | | | Instead of awkwardly encoding calling-convention information with ISD::CALL, ISD::FORMAL_ARGUMENTS, ISD::RET, and ISD::ARG_FLAGS nodes, TargetLowering provides three virtual functions for targets to override: LowerFormalArguments, LowerCall, and LowerRet, which replace the custom lowering done on the special nodes. They provide the same information, but in a more immediately usable format. This also reworks much of the target-independent tail call logic. The decision of whether or not to perform a tail call is now cleanly split between target-independent portions, and the target dependent portion in IsEligibleForTailCallOptimization. This also synchronizes all in-tree targets, to help enable future refactoring and feature work. llvm-svn: 78142
* Move most targets TargetMachine constructor to only taking a target triple.Daniel Dunbar2009-08-022-5/+4
| | | | | | - The C, C++, MSIL, and Mips backends still need the module. llvm-svn: 77927
* Add extra SEXT pattern.Richard Osborne2009-08-021-0/+16
| | | | llvm-svn: 77920
* Normalize Subtarget constructors to take a target triple string instead ofDaniel Dunbar2009-08-023-7/+4
| | | | | | | | | | Module*. Also, dropped uses of TargetMachine where unnecessary. The only target which still takes a TargetMachine& is Mips, I would appreciate it if someone would normalize this to match other targets. llvm-svn: 77918
* move dwarf debug info section selection stuff from TAI toChris Lattner2009-08-021-12/+0
| | | | | | TLOF, unifying all the dwarf targets at the same time. llvm-svn: 77889
* xcore TAI doesn't need TM.Chris Lattner2009-08-023-4/+3
| | | | llvm-svn: 77868
* remove TargetAsmInfo::TM, which is now dead. The basic TAI class now Chris Lattner2009-08-022-5/+4
| | | | | | no longer depends on TM! llvm-svn: 77863
* Make SectionKind::get() private.Chris Lattner2009-08-021-5/+5
| | | | llvm-svn: 77835
* Remove "JumpTableDataSection" from TAI, instead, have AsmPrinterChris Lattner2009-08-011-1/+1
| | | | | | | | | | | | compute it based on what it knows. As part of this, rename getSectionForMergeableConstant to getSectionForConstant because it works for non-mergable constants also. The only functionality change from this is that Xcore will start dropping its jump tables into readonly section instead of data section in -static mode. This should be fine as the linker resolves the relocations. If this is a problem, let me know and we'll come up with another solution. llvm-svn: 77833
* REmove dead fields of TAI.Chris Lattner2009-08-011-1/+0
| | | | llvm-svn: 77820
* update for renameChris Lattner2009-08-011-3/+3
| | | | llvm-svn: 77817
* Change SectionKind to be a property that is true of a *section*, itChris Lattner2009-08-011-5/+8
| | | | | | | | | | | | | | | | | | should have no state that is specific to particular globals in the section. In this case, it means the removal of the "isWeak" and "ExplicitSection" bits. MCSection uses the new form of SectionKind. To handle isWeak, I introduced a new SectionInfo class, which is SectionKind + isWeak, and it is used by the part of the code generator that does classification of a specific global. The ExplicitSection disappears. It is moved onto MCSection as a new "IsDirective" bit. Since the Name of a section is either a section or directive, it makes sense to keep this bit in MCSection. Ultimately the creator of MCSection should canonicalize (e.g.) .text to whatever the actual section is. llvm-svn: 77803
* Add newline at end of file to remove gcc warning.Nick Lewycky2009-08-011-1/+1
| | | | llvm-svn: 77791
* 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
OpenPOWER on IntegriCloud