summaryrefslogtreecommitdiff
path: root/lib/Target
Commit message (Collapse)AuthorAge
* Revert 75762, 75763, 75766..75769, 75772..75775, 75778, 75780, 75782 to ↵Stuart Hastings2009-07-15
| | | | | | | | | repair broken LLVM-GCC build. Will revert 75770 in the llvm-gcc trunk. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75799 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pattern for LD16S_3r, add basic tests to check load / store instructionsRichard Osborne2009-07-15
| | | | | | | are being properly selected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75797 91177308-0d34-0410-b5e6-96231b3b80d8
* Thumb-2 only support [base_reg + offset_reg] addressing, not [base_reg - ↵David Goodwin2009-07-15
| | | | | | offset_reg]. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75789 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix XCoreTargetLowering::isLegalAddressingMode to handle non simple VTs.Richard Osborne2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75788 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the xcore-file-directive option now that LLVM has proper support forRichard Osborne2009-07-15
| | | | | | | emitting file directives with one parameter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75787 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace large swaths of copy-n-paste code with obvious helper function...Daniel Dunbar2009-07-15
| | | | | | | | | | | | | | | | | | | | | | | | - Which was already present in the module! - I skipped this xform for Alpha, since it runs an extra pass during assembly emission, but not when emitting assembly via the DumpAsm flag. - No functionality change. -- ddunbar@giles:llvm$ svn diff | grep '^- ' | sort | uniq -c 18 - PM.add(AsmPrinterCtor(ferrs(), *this, true)); 18 - assert(AsmPrinterCtor && "AsmPrinter was not linked in"); 18 - if (AsmPrinterCtor) 18 - if (DumpAsm) { 18 - } ddunbar@giles:llvm$ svn diff | grep '^+ ' | sort | uniq -c 18 + addAssemblyEmitter(PM, OptLevel, true, ferrs()); 18 + if (DumpAsm) -- git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75782 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove StringConstantPrefix now that the only userDuncan Sands2009-07-15
| | | | | | | (llvm-gcc) has gone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75781 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill off old (TargetMachine level, not Target level) match quality functions.Daniel Dunbar2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75780 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix cmake build lib/Target/TargetMachineRegistry.cpp removed.Xerxes Ranby2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75779 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide TargetMachine implementations with reference to Target they were createdDaniel Dunbar2009-07-15
| | | | | | | | | from. - This commit is almost entirely propogating the reference through the TargetMachine subclasses' constructor calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75778 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill off unused TargetMachineRegistry methods and ivars.Daniel Dunbar2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75774 91177308-0d34-0410-b5e6-96231b3b80d8
* Include the Target& in the TargetMachineRegisterEntry.Daniel Dunbar2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75772 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch some obvious clients to using the new TargetRegistry.Daniel Dunbar2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75767 91177308-0d34-0410-b5e6-96231b3b80d8
* Reimplement TargetMachineRegistry in terms of TargetRegistry.Daniel Dunbar2009-07-15
| | | | | | | | | | - This is a temporary hack to aid in incremental refactoring, for now we allocate a new TargetMachineRegistryEntry on every getClosest... call. - No intended functionality change, other than the leaked memory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75766 91177308-0d34-0410-b5e6-96231b3b80d8
* Register Target's TargetMachine and AsmPrinter in the new registry.Daniel Dunbar2009-07-15
| | | | | | | | - This abuses TargetMachineRegistry's constructor for now, this will get cleaned up in time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75762 91177308-0d34-0410-b5e6-96231b3b80d8
* Add TargetInfo libraries for all targets.Daniel Dunbar2009-07-15
| | | | | | | | | - Intended to match current TargetMachine implementations. - No facilities for linking these in yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75751 91177308-0d34-0410-b5e6-96231b3b80d8
* Move load / store folding alignment require into the table(s).Evan Cheng2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75749 91177308-0d34-0410-b5e6-96231b3b80d8
* rename decorateName -> DecorateCygMingName, make it assert if notChris Lattner2009-07-15
| | | | | | | | cygming, make the two callers only call it if cygming. Other minor cleanups. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75744 91177308-0d34-0410-b5e6-96231b3b80d8
* convert arm/darwin stubs to use the mangler to synthesize all the names ↵Chris Lattner2009-07-15
| | | | | | | | | instead of doing it with printSuffixedName. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75741 91177308-0d34-0410-b5e6-96231b3b80d8
* fix an arm codegen bug (the same as PR4482 on ppc) where available_externallyChris Lattner2009-07-15
| | | | | | | | symbols were not getting stubs. While I'm at it, add a big testcase for stub generation to make sure I don't break anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75737 91177308-0d34-0410-b5e6-96231b3b80d8
* convert [Hidden]GVNonLazyPtrs to compute the global and stub namesChris Lattner2009-07-15
| | | | | | | | with the mangler (like x86 and ppc), instead of going through printSuffixedName. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75736 91177308-0d34-0410-b5e6-96231b3b80d8
* use makeNameProper to add the globalprefix instead of doing it manually.Chris Lattner2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75734 91177308-0d34-0410-b5e6-96231b3b80d8
* get the PPC stub temporary label from the mangler instead of Chris Lattner2009-07-15
| | | | | | | | using horrible string hacking. This gives us a different label, but it's just an assembler temporary, so the name doesn't matter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75733 91177308-0d34-0410-b5e6-96231b3b80d8
* turn some if/then's into ?:Chris Lattner2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75732 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate a bunch of printSuffixedName's by using info computed fromChris Lattner2009-07-15
| | | | | | | Mangler in FnStubs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75731 91177308-0d34-0410-b5e6-96231b3b80d8
* convert FnStubs to using a more structured form, eliminatingChris Lattner2009-07-15
| | | | | | | | a couple instances of printSuffixedName (in favor of having the mangler do stuff). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75729 91177308-0d34-0410-b5e6-96231b3b80d8
* actually $stub labels *are* private, I just missed that Chris Lattner2009-07-15
| | | | | | | printSuffixedName automatically does this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75727 91177308-0d34-0410-b5e6-96231b3b80d8
* $stub references should not be private ("L") labels.Chris Lattner2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75721 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify "EmitExternalGlobal": it is only used to output aChris Lattner2009-07-15
| | | | | | | | | reference to the personality function for a module, and those are all added to the GVStubs array by looping over MMI->getPersonalities() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75720 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert GVStubs and HiddenGVStubs to work more like the X86 backend, thisChris Lattner2009-07-15
| | | | | | | eliminates a bunch of uses of "printSuffixedName" and "getGlobalLinkName". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75719 91177308-0d34-0410-b5e6-96231b3b80d8
* minor cleanups: only switch sections once before all function stubs, instead ofChris Lattner2009-07-15
| | | | | | | before each one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75718 91177308-0d34-0410-b5e6-96231b3b80d8
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75703 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix path name.Daniel Dunbar2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75697 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the right relocation type for X86::MOV64ri64i32Bruno Cardoso Lopes2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75687 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bad indentation and 80-col violation.Bob Wilson2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75686 91177308-0d34-0410-b5e6-96231b3b80d8
* Check for PRE_INC and POST_INC.David Goodwin2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75683 91177308-0d34-0410-b5e6-96231b3b80d8
* fix David's merge conflictChris Lattner2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75673 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply r75408, which eliminates MOV64r0 in favor of usingChris Lattner2009-07-14
| | | | | | | | | MOV32r0 + subregs to do the same thing. This should work now that PR4544 is fixed. Thanks Evan! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75671 91177308-0d34-0410-b5e6-96231b3b80d8
* Have asm printers use formatted_raw_ostream directly to avoid aDavid Greene2009-07-14
| | | | | | | dynamic_cast<>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75670 91177308-0d34-0410-b5e6-96231b3b80d8
* hasThumb2() does not mean we are compiling for thumb, must also check isThumb().David Goodwin2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75660 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an extra space.Bob Wilson2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75658 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark as fall through.Bill Wendling2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75652 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply my previous asmprinter changes now with more testing and two Chris Lattner2009-07-14
| | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75646 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-14
| | | | | | | | | | 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"). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75640 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r7561{9,8,7,6}, which depend on r75610. Daniel Dunbar2009-07-14
| | | | | | | | | | | | | | | | | | | --- 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75638 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r75615, which depended on 75610.Daniel Dunbar2009-07-14
| | | | | | | | | | | | | | | | | | | --- Reverse-merging r75615 into '.': U lib/Target/XCore/XCoreAsmPrinter.cpp U lib/Target/PIC16/PIC16AsmPrinter.cpp U lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp U lib/Target/MSP430/MSP430AsmPrinter.cpp U lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp U lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp U lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp U lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp U lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp U lib/Target/MSIL/MSILWriter.cpp U lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp U lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75637 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r75610 (and r75620, which was blocking the revert), in the hopes ofDaniel Dunbar2009-07-14
| | | | | | | | | | | | | | | unbreaking llvm-gcc (on Darwin). --- Reverse-merging r75620 into '.': U include/llvm/Support/Mangler.h --- Reverse-merging r75610 into '.': U test/CodeGen/X86/loop-hoist.ll G include/llvm/Support/Mangler.h U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp U lib/VMCore/Mangler.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75636 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate extra space.Torok Edwin2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75630 91177308-0d34-0410-b5e6-96231b3b80d8
* Add extra sign extension to the same bit width before int signAnton Korobeynikov2009-07-14
| | | | | | | extension to another bit width. This is needed to get correct singed value. Patch by Artur Pietrek! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75629 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing break. Patch by Artur Pietrek!Anton Korobeynikov2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75628 91177308-0d34-0410-b5e6-96231b3b80d8