summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Small cleanups in the PowerPC backend.Tilmann Scheller2009-07-032-35/+21
| | | | | | | | | | Small refactoring in LowerFORMAL_ARGUMENTS(). Correct minor formatting issues. Remove size argument of CreateCopyOfByValArgument(). Remove dead argument from CalculateStackSlotSize(). Remove unused variable ReturnAddrIndex from various targets. llvm-svn: 74763
* CMake build fixes, from Xerxes RanbyDouglas Gregor2009-07-021-0/+2
| | | | llvm-svn: 74720
* simplify some logic by using isWeakForLinker(). Thanks to Anton forChris Lattner2009-07-021-5/+2
| | | | | | pointing this out. llvm-svn: 74700
* clarify: stub emission depends on the version of the linker you use, it has ↵Chris Lattner2009-07-021-5/+4
| | | | | | | | | nothing to do with the target. Also, the stub elimination optimization *requires* making the stub explicit. llvm-svn: 74682
* Add darwin stub removal to wishlist.Dale Johannesen2009-07-011-0/+11
| | | | llvm-svn: 74667
* Update comments to make it clear that the function alignment is the Log2 of theBill Wendling2009-07-012-2/+2
| | | | | | bytes and not bytes. llvm-svn: 74624
* Fix codegen for references to available_externally symbols. This fixesChris Lattner2009-07-011-5/+8
| | | | | | PR4482. llvm-svn: 74613
* Handle IMPLICIT_DEF with isUndef operand marker, part 2. This patch moves ↵Evan Cheng2009-07-011-8/+28
| | | | | | the code to annotate machineoperands to LiveIntervalAnalysis. It also add markers for implicit_def that define physical registers. The rest, is just a lot of details. llvm-svn: 74580
* Remove unused AsmPrinter OptLevel argument, and propogate.Daniel Dunbar2009-07-014-23/+15
| | | | | | | - This more or less amounts to a revert of r65379. I'm curious to know what happened that caused this variable to become unused. llvm-svn: 74579
* Add an "alignment" field to the MachineFunction object. It makes more sense toBill Wendling2009-06-303-3/+12
| | | | | | | | | | have the alignment be calculated up front, and have the back-ends obey whatever alignment is decided upon. This allows for future work that would allow for precise no-op placement and the like. llvm-svn: 74564
* Let's ignore MDStrings also!Devang Patel2009-06-261-1/+1
| | | | llvm-svn: 74255
* Add missing dependencies to the CMake build system.Douglas Gregor2009-06-251-0/+1
| | | | llvm-svn: 74161
* No need to code gen MDNodesDevang Patel2009-06-251-0/+3
| | | | llvm-svn: 74150
* sink management of DwarfWriter & MachineModuleInfo into the AsmPrinter base ↵Chris Lattner2009-06-241-20/+3
| | | | | | class. llvm-svn: 74101
* sink dwarf finalization out of each target into AsmPrinter::doFinalizationChris Lattner2009-06-241-9/+0
| | | | llvm-svn: 74097
* eliminate the ExtWeakSymbols set from AsmPrinter. This eliminatesChris Lattner2009-06-241-19/+0
| | | | | | | a bunch of code from all the targets, and eliminates nondeterministic ordering of directives being emitted in the output. llvm-svn: 74096
OpenPOWER on IntegriCloud