aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Provide TargetMachine implementations with reference to Target they were createdDaniel Dunbar2009-07-1526-66/+96
| | | | | | | | | 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-151-51/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75774 91177308-0d34-0410-b5e6-96231b3b80d8
* Migrate llc and the JIT to using the TargetRegistry for lookups.Daniel Dunbar2009-07-151-6/+7
| | | | | | | | | | | | | - They still use the TargetMachineRegistry to populate the contents of the -march option (via the listener interface). We can't just populate it in the option parser because we can't expect the TargetRegistry to be populated yet (we no longer rely on static constructors). - There are a couple ways to finish killing off TargetMachineRegistry, but I haven't figured out the cleanest one yet... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75773 91177308-0d34-0410-b5e6-96231b3b80d8
* Include the Target& in the TargetMachineRegisterEntry.Daniel Dunbar2009-07-151-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75772 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow multiple registrations of the same target.Daniel Dunbar2009-07-151-7/+5
| | | | | | | | - This doesn't necessarily seem like a good idea, but the JIT unittest currently relies on it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75769 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch some obvious clients to using the new TargetRegistry.Daniel Dunbar2009-07-151-9/+10
| | | | 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-151-41/+14
| | | | | | | | | | - 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-1536-56/+129
| | | | | | | | - 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
* Detect write failures on raw_fd_ostream.Daniel Dunbar2009-07-151-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75758 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix stupid thinkoDaniel Dunbar2009-07-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75754 91177308-0d34-0410-b5e6-96231b3b80d8
* Address some review comments on TargetRegistry.Daniel Dunbar2009-07-151-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75753 91177308-0d34-0410-b5e6-96231b3b80d8
* Add TargetInfo libraries for all targets.Daniel Dunbar2009-07-1556-8/+1173
| | | | | | | | | - 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-152-448/+425
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75749 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMake file.Ted Kremenek2009-07-151-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75746 91177308-0d34-0410-b5e6-96231b3b80d8
* rename decorateName -> DecorateCygMingName, make it assert if notChris Lattner2009-07-152-13/+14
| | | | | | | | 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
* eliminate the Mangler::PreserveAsmNames bit, the sole client of thisChris Lattner2009-07-151-5/+1
| | | | | | | can do it perfectly well itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75743 91177308-0d34-0410-b5e6-96231b3b80d8
* remove printSuffixedName.Chris Lattner2009-07-151-27/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75742 91177308-0d34-0410-b5e6-96231b3b80d8
* convert arm/darwin stubs to use the mangler to synthesize all the names ↵Chris Lattner2009-07-151-47/+66
| | | | | | | | | instead of doing it with printSuffixedName. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75741 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new TargetRegistry.Daniel Dunbar2009-07-151-0/+136
| | | | | | | | | | | | | | | | | | | | | | | | Targets implement a single global Target structure which will live in a new <Target>/TargetInfo library; this will be present in any image which the target is usable in. - Optional target specific classes can then be registered and attached to the Target description. - Registration for normal Targets will be done via the initialization functions instead of using static constructors. - This allows clients to use a single interface to obtain target data, without requiring the code generator be linked in. It also provides a natural extension point for adding new optional target data (assembler parser, disassembler, etc.). - This also provides a new entry point for obtaining a target for a particular triple (without a module). - Not yet used, however this should eventually replace the TargetMachineRegistry. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75739 91177308-0d34-0410-b5e6-96231b3b80d8
* fix an arm codegen bug (the same as PR4482 on ppc) where available_externallyChris Lattner2009-07-152-7/+6
| | | | | | | | 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-151-27/+41
| | | | | | | | 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-151-3/+1
| | | | 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-151-29/+5
| | | | | | | | 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-151-12/+3
| | | | 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-151-23/+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-151-9/+31
| | | | | | | | 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-151-6/+2
| | | | | | | printSuffixedName automatically does this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75727 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix indentation.Dan Gohman2009-07-151-18/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75723 91177308-0d34-0410-b5e6-96231b3b80d8
* Make makeLoopInvariant report whether it made any changes or not,Dan Gohman2009-07-154-54/+24
| | | | | | | and use this to simplify more code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75722 91177308-0d34-0410-b5e6-96231b3b80d8
* $stub references should not be private ("L") labels.Chris Lattner2009-07-151-4/+5
| | | | 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-151-6/+1
| | | | | | | | | 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-151-56/+52
| | | | | | | 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-151-16/+15
| | | | | | | before each one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75718 91177308-0d34-0410-b5e6-96231b3b80d8
* Added llvm-mc support for parsing the .include directive.Kevin Enderby2009-07-141-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75711 91177308-0d34-0410-b5e6-96231b3b80d8
* minor syntax cleanupChris Lattner2009-07-141-11/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75707 91177308-0d34-0410-b5e6-96231b3b80d8
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-1437-278/+264
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75703 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix path name.Daniel Dunbar2009-07-141-1/+1
| | | | 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-141-0/+2
| | | | 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-141-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75686 91177308-0d34-0410-b5e6-96231b3b80d8
* Added llvm-mc support for parsing the .lsym directive.Kevin Enderby2009-07-141-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75685 91177308-0d34-0410-b5e6-96231b3b80d8
* Check for PRE_INC and POST_INC.David Goodwin2009-07-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75683 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the expansion of umax and smax in the case where one or more ofDan Gohman2009-07-141-6/+26
| | | | | | | | | the operands have pointer type, so that the resulting type matches the original SCEV type, and so that unnecessary ptrtoints are avoided in common cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75680 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMake file.Ted Kremenek2009-07-141-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75677 91177308-0d34-0410-b5e6-96231b3b80d8
* fix David's merge conflictChris Lattner2009-07-141-6/+2
| | | | 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-143-17/+28
| | | | | | | | | 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-1461-168/+200
| | | | | | | dynamic_cast<>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75670 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMake file.Ted Kremenek2009-07-141-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75666 91177308-0d34-0410-b5e6-96231b3b80d8
* hasThumb2() does not mean we are compiling for thumb, must also check isThumb().David Goodwin2009-07-141-3/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75660 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an extra space.Bob Wilson2009-07-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75658 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a pointertracking pass.Torok Edwin2009-07-141-0/+261
| | | | | | | | | For now this only computes the allocated size of the memory pointed to by a pointer, and offset a pointer from allocated pointer. The actual checkLimits part will come later, after another round of review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75657 91177308-0d34-0410-b5e6-96231b3b80d8