summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PIC16
Commit message (Collapse)AuthorAgeFilesLines
* Use DebugInfoFinderDevang Patel2009-08-061-15/+9
| | | | llvm-svn: 78334
* Fix several fixmes and clean up code by sinking *all* sectionChris Lattner2009-08-062-23/+19
| | | | | | | | | | | | | | | | | creation activity into the target-specific subclasses of TLOF. Before this, globals with explicit sections could be created by the base class. 1. make getOrCreateSection protected, add a new getExplicitSectionGlobal pure virtual method to assign sections to globals with a specified section. 2. eliminate getSpecialCasedSectionGlobals, which is now PIC specific. 3. eliminate the getKindForNamedSection virtual method, which is now just a static method for ELF. 4. Add implementions of getExplicitSectionGlobal for ELF/PECOFF/Darwin/PIC16. They are now all detangled and understandable, woo! :) llvm-svn: 78319
* go through PIC16TargetObjectFile to make sections instead of Chris Lattner2009-08-064-12/+26
| | | | | | creating them directly in the pic16 asmprinter. llvm-svn: 78317
* Fix a bug in the PIC16 backend.Dan Gohman2009-08-051-1/+1
| | | | llvm-svn: 78211
* Major calling convention code refactoring.Dan Gohman2009-08-053-181/+128
| | | | | | | | | | | | | | | | | | | 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
* Legalize i64 store operations generated by inst-combine.Sanjiv Gupta2009-08-041-2/+20
| | | | llvm-svn: 78082
* Avoid compiler warning (in -Asserts mode)Daniel Dunbar2009-08-041-2/+2
| | | | llvm-svn: 78070
* Move most targets TargetMachine constructor to only taking a target triple.Daniel Dunbar2009-08-022-8/+8
| | | | | | - The C, C++, MSIL, and Mips backends still need the module. llvm-svn: 77927
* Normalize Subtarget constructors to take a target triple string instead ofDaniel Dunbar2009-08-023-5/+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
* PIC16 TAI doesn't need TMChris Lattner2009-08-023-12/+7
| | | | llvm-svn: 77867
* remove TargetAsmInfo::TM, which is now dead. The basic TAI class now Chris Lattner2009-08-021-2/+1
| | | | | | no longer depends on TM! llvm-svn: 77863
* Fix a possible crash on delete of an uninitialized variable.Daniel Dunbar2009-08-022-1/+7
| | | | llvm-svn: 77846
* Don't call SectionForGlobal for hasAvailableExternallyLinkage()Dan Gohman2009-08-021-1/+1
| | | | | | variables either. llvm-svn: 77844
* don't call SectionForGlobal on declarations, you can't tell the section aChris Lattner2009-08-021-1/+3
| | | | | | declaration will end up in. llvm-svn: 77843
* Make SectionKind::get() private.Chris Lattner2009-08-022-14/+14
| | | | llvm-svn: 77835
* fix a fixme by sinking various target-specific directives down into Chris Lattner2009-08-011-2/+2
| | | | | | the appropriate subclasses. llvm-svn: 77815
* it turns out that isWeak() was basically dead anyway. Kill off SectionInfo :-/Chris Lattner2009-08-012-6/+6
| | | | llvm-svn: 77812
* Change SectionKind to be a property that is true of a *section*, itChris Lattner2009-08-013-20/+23
| | | | | | | | | | | | | | | | | | 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
* switch off of 'Section' onto MCSection. We're not properly usingChris Lattner2009-07-314-63/+62
| | | | | | MCSection subclasses yet, but this is a step in the right direction. llvm-svn: 77708
* define target names for std libcalls.Sanjiv Gupta2009-07-312-12/+34
| | | | llvm-svn: 77667
* Keep track of references to mem(cpy,move,set) and then print only one externSanjiv Gupta2009-07-302-2/+41
| | | | | | declaration for them. llvm-svn: 77578
* Move types back to the 2.5 API.Owen Anderson2009-07-291-2/+2
| | | | llvm-svn: 77516
* pass the mangler down into the various SectionForGlobal methods.Chris Lattner2009-07-293-7/+12
| | | | | | No functionality change. llvm-svn: 77432
* fix a casting problem on the llvm-x86_64-linux testerChris Lattner2009-07-281-1/+1
| | | | llvm-svn: 77295
* Rip all of the global variable lowering logic out of TargetAsmInfo. SinceChris Lattner2009-07-288-483/+551
| | | | | | | | | | | | | | | | | | | | 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
* don't copy TargetLowering.Chris Lattner2009-07-281-1/+1
| | | | llvm-svn: 77293
* Remove duplicate entries while printing decls for external symbols.Sanjiv Gupta2009-07-271-2/+23
| | | | | | Some libcall names are same, so they were getting printed twice. llvm-svn: 77215
* Eliminate getNamed/getUnnamedSection, adding a new and unified ↵Chris Lattner2009-07-272-25/+33
| | | | | | | | getOrCreateSection instead. llvm-svn: 77186
* Eliminate SectionFlags, just embed a SectionKind into SectionChris Lattner2009-07-272-17/+29
| | | | | | instead and drive things based off of that. llvm-svn: 77184
* Generate a libcall for i8 multiply.Sanjiv Gupta2009-07-272-0/+16
| | | | llvm-svn: 77179
* fixed incorrect lowering of ISD::SUB node. SUB has only one result value.Sanjiv Gupta2009-07-271-5/+14
| | | | | | It wasn't caught during tests because we never got a sub generated, (i8 was always getting promoted to int, which in turn was broken into subc/sube). Though the optimizer leaves an i8 sub now. llvm-svn: 77178
* reduce indentationChris Lattner2009-07-261-3/+3
| | | | llvm-svn: 77161
* Fix the breakage caused by 76950. Sanjiv Gupta2009-07-261-0/+3
| | | | | | PIC16 has special naming conventions for variables having section names specified via section attribute. llvm-svn: 77153
* Factor commonality in triple match routines into helper template for registeringDaniel Dunbar2009-07-261-17/+3
| | | | | | classes, and migrate existing targets over. llvm-svn: 77126
* Kill Target specific ModuleMatchQuality stuff.Daniel Dunbar2009-07-261-12/+2
| | | | | | - This was overkill and inconsistently implemented. llvm-svn: 77114
* make SectionKind be a first-class pod struct instead of justChris Lattner2009-07-252-4/+4
| | | | | | an enum. llvm-svn: 77096
* this is (unfortunately) several changes mixed together:Chris Lattner2009-07-252-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-12/+2
| | | | | | | | | | - 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
* Mark attributes of return insn correctly. It was being assumed safe to ↵Sanjiv Gupta2009-07-251-0/+1
| | | | | | delete in isSafeToDelete (a thing checked-in 76281). llvm-svn: 77056
* Add new helpers for registering targets.Daniel Dunbar2009-07-253-31/+10
| | | | | | - Less boilerplate == good. llvm-svn: 77052
* we already know the sectionkind when invoking SelectSectionForGlobal,Chris Lattner2009-07-242-5/+7
| | | | | | pass it in instead of recomputing it. llvm-svn: 76990
* make SectionForGlobal non-virtual, add a hook for pic16 to do its "address=" ↵Chris Lattner2009-07-242-13/+18
| | | | | | hack. llvm-svn: 76989
* start refactoring pic16 section selection logic.Chris Lattner2009-07-242-16/+13
| | | | llvm-svn: 76977
* Switch to getNameStr().Daniel Dunbar2009-07-242-5/+5
| | | | llvm-svn: 76962
* simplify code by making special case more obviousChris Lattner2009-07-241-9/+5
| | | | llvm-svn: 76950
* Do not call getMangledName on Intrinsics.Sanjiv Gupta2009-07-231-4/+3
| | | | llvm-svn: 76842
* Switch some clients to Value::getName(), and other getName() userDaniel Dunbar2009-07-221-1/+1
| | | | | | | simplification. - NFC llvm-svn: 76789
* Remove shift amount flavor. It isn't actually complete enough to Eli Friedman2009-07-211-1/+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-212-6/+11
| | | | | | | and call PrintGlobalVariable, allowing elimination and simplification of various targets. llvm-svn: 76604
* more random whitespace cleanup, eliminate #define, avoid copyingChris Lattner2009-07-213-67/+59
| | | | | | vectors needlessly, doxygenify comments, improve constness, etc. llvm-svn: 76585
OpenPOWER on IntegriCloud