summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove Value::{isName, getNameRef}.Daniel Dunbar2009-07-251-2/+2
| | | | | | Also, change MDString to use a StringRef. llvm-svn: 77098
* this is (unfortunately) several changes mixed together:Chris Lattner2009-07-251-1/+1
| | | | | | | | | | | | | | 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-20/+4
| | | | | | | | | | - 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-14/+7
| | | | | | - Less boilerplate == good. llvm-svn: 77052
* Remove unused member functions.Eli Friedman2009-07-242-82/+0
| | | | llvm-svn: 76960
* use section flags more correctly.Chris Lattner2009-07-241-1/+2
| | | | llvm-svn: 76944
* reduce api exposure: clients shouldn't call SectionKindForGlobal directly.Chris Lattner2009-07-241-4/+5
| | | | llvm-svn: 76941
* Remove the IA-64 backend.Dan Gohman2009-07-241-1/+1
| | | | llvm-svn: 76920
* Let each target determines whether a machine instruction is dead. If true, ↵Evan Cheng2009-07-221-0/+7
| | | | | | | | that allows late codeine passes to delete it. This is considered a workaround. The problem is some targets are not modeling side effects correctly. PPC is apparently one of those. This patch allows ppc llvm-gcc to bootstrap on Darwin. Once we find out which instruction definitions are wrong, we can remove the PPCInstrInfo workaround. llvm-svn: 76703
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-6/+6
| | | | llvm-svn: 76702
* make AsmPrinter::doFinalization iterate over the global variablesChris Lattner2009-07-211-23/+6
| | | | | | | and call PrintGlobalVariable, allowing elimination and simplification of various targets. llvm-svn: 76604
* Rename Mangler linkage enums to something less gross.Bill Wendling2009-07-201-3/+3
| | | | llvm-svn: 76456
* Add plumbing for the `linker_private' linkage type. This type is meant forBill Wendling2009-07-201-3/+10
| | | | | | | | | "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
* 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-184-6/+7
| | | | llvm-svn: 76344
* r76102 added the MachineCodeEmitter::processDebugLoc call and called it fromJeffrey Yasskin2009-07-171-1/+1
| | | | | | | the X86 Emitter. This patch extends that to the rest of the targets that can write to a MachineCodeEmitter: ARM, Alpha, and PPC. llvm-svn: 76211
* Do not put bunch of target-specific stuff into common namespaceAnton Korobeynikov2009-07-161-1/+1
| | | | llvm-svn: 75971
* Kill off <TARGET>MachineModule variables, and <TARGETASMPRINTER>ForceLinkDaniel Dunbar2009-07-162-11/+0
| | | | | | | variables. - Module initialization functions supplanted the need for these. llvm-svn: 75886
* fix section switching to ensure that stubs are emitted to the rightChris Lattner2009-07-161-4/+5
| | | | | | section on ppc. llvm-svn: 75881
* Lift addAssemblyEmitter into LLVMTargetMachine.Daniel Dunbar2009-07-152-14/+0
| | | | | | - No functionality change. llvm-svn: 75859
* Lift DumpAsm / -print-emitted-asm functionality into LLVMTargetMachine.Daniel Dunbar2009-07-152-27/+9
| | | | | | - No intended functionality change. llvm-svn: 75848
* Remove old style hacks to register AsmPrinter into TargetMachine.Daniel Dunbar2009-07-153-26/+4
| | | | | | - No intended functionality change. llvm-svn: 75843
* Reapply TargetRegistry refactoring commits.Daniel Dunbar2009-07-154-75/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --- 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-154-32/+75
| | | | | | | | repair broken LLVM-GCC build. Will revert 75770 in the llvm-gcc trunk. llvm-svn: 75799
* Replace large swaths of copy-n-paste code with obvious helper function...Daniel Dunbar2009-07-151-30/+12
| | | | | | | | | | | | | | | | | | | | | | | - 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) -- llvm-svn: 75782
* Kill off old (TargetMachine level, not Target level) match quality functions.Daniel Dunbar2009-07-152-57/+0
| | | | llvm-svn: 75780
* Provide TargetMachine implementations with reference to Target they were createdDaniel Dunbar2009-07-152-10/+14
| | | | | | | | 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-154-8/+18
| | | | | | | - 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-1/+120
| | | | | | | | - Intended to match current TargetMachine implementations. - No facilities for linking these in yet. llvm-svn: 75751
* 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. llvm-svn: 75733
* turn some if/then's into ?:Chris Lattner2009-07-151-12/+3
| | | | llvm-svn: 75732
* eliminate a bunch of printSuffixedName's by using info computed fromChris Lattner2009-07-151-23/+15
| | | | | | Mangler in FnStubs. llvm-svn: 75731
* 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). llvm-svn: 75729
* 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() llvm-svn: 75720
* 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". llvm-svn: 75719
* minor cleanups: only switch sections once before all function stubs, instead ofChris Lattner2009-07-151-16/+15
| | | | | | before each one. llvm-svn: 75718
* Have asm printers use formatted_raw_ostream directly to avoid aDavid Greene2009-07-144-19/+20
| | | | | | dynamic_cast<>. llvm-svn: 75670
* Reapply my previous asmprinter changes now with more testing and two Chris Lattner2009-07-141-5/+4
| | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 75646
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-1410-45/+45
| | | | | | | | | 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"). llvm-svn: 75640
* Revert r75615, which depended on 75610.Daniel Dunbar2009-07-141-4/+5
| | | | | | | | | | | | | | | | | | --- 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 llvm-svn: 75637
* eliminate extra space.Torok Edwin2009-07-141-2/+2
| | | | llvm-svn: 75630
* Rename getValueName -> getMangledName.Chris Lattner2009-07-141-5/+4
| | | | llvm-svn: 75615
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-119-26/+29
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Thread LLVMContext through MVT and related parts of SDISel.Owen Anderson2009-07-091-8/+10
| | | | llvm-svn: 75153
* Implement changes from Chris's feedback.Torok Edwin2009-07-087-33/+36
| | | | | | Finish converting lib/Target. llvm-svn: 75043
* Add the Object Code Emitter class. Original patch by Aaron Gray, I did someBruno Cardoso Lopes2009-07-064-1/+65
| | | | | | cleanup, removed some #includes and moved Object Code Emitter out-of-line. llvm-svn: 74813
* Various small changes related to the Condition Register on PowerPC.Tilmann Scheller2009-07-034-47/+68
| | | | | | | | Don't spill to the CR save area when using the SVR4 ABI for now. Don't rely on constants assigned for registers to be in order (they aren't assigned in order). Make sure CR bits are mapped to the corresponding CR field. llvm-svn: 74767
* Refactor ABI code in the PowerPC backend.Tilmann Scheller2009-07-0312-572/+370
| | | | | | | | | | | Make CalculateParameterAndLinkageAreaSize() Darwin-specific. Remove SVR4 specific code from LowerCALL_Darwin() and LowerFORMAL_ARGUMENTS_Darwin(). Rename MachoABI to DarwinABI for consistency. Rename ELF ABI to SVR4 ABI for consistency. Factor out common call return lowering between the Darwin and SVR4 ABI. Factor out common call lowering between the Darwin and SVR4 ABI. llvm-svn: 74766
* Implement the SVR4 ABI for PowerPC.Tilmann Scheller2009-07-038-58/+1105
| | | | | | | | | | | | | | | | | | | | | | | | Implement LowerFORMAL_ARGUMENTS_SVR4(). Implement LowerCALL_SVR4(). Add support for split arguments. Implement by value parameter passing for aggregates. Add support for variable argument lists. Create the spill area for argument registers of variable argument functions no longer at a fixed offset. Make sure callee saved registers are spilled to the correct stack offsets. Change allocation order of non-volatile floating-point registers. Add VRSAVE to the list of callee-saved registers, add CallConvLowering for vararg calls. Add support for variable argument calls with Vector arguments. Add support for VR and VRSAVE save area, improve allocation order for non-volatile vector registers. Stop creating illegal i8 values in LowerVASTART(). Add memory access width hints. Make sure to reserve space on the stack for the frame pointer. When using the SVR4 ABI, reserve r13 for the Small Data Area pointer. Assure that the frame pointer is spilled to the correct location on the stack. Some FP registers were not marked as volatile. Make sure the i64 words from a long double are passed either both in registers or both on the stack. Only put integer arguments in registers which are not marked with the inreg flag. llvm-svn: 74765
* Add NumFixedArgs attribute to CallSDNode which indicates the number of fixed ↵Tilmann Scheller2009-07-031-1/+1
| | | | | | | | | | | arguments in a vararg call. With the SVR4 ABI on PowerPC, vector arguments for vararg calls are passed differently depending on whether they are a fixed or a variable argument. Variable vector arguments always go into memory, fixed vector arguments are put into vector registers. If there are no free vector registers available, fixed vector arguments are put on the stack. The NumFixedArgs attribute allows to decide for an argument in a vararg call whether it belongs to the fixed or variable portion of the parameter list. llvm-svn: 74764
OpenPOWER on IntegriCloud