summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* The same situation that effected ARM effects PPC with regards to placing theBill Wendling2010-03-121-3/+4
| | | | | | | | | LSDA into the TEXT section. We need to generate non-lazy pointers to it on Mach-O. However, the object the NLP points to may be local to the translation unit. If so, then the NLP needs to have the value of that object specified instead of "0", which the linker interprets as "external". llvm-svn: 98325
* The address of an indirect call must be in R12 on Darwin.Dale Johannesen2010-03-091-0/+10
| | | | | | | | Make it so. (This patch is in LowerCall_Darwin, which seems to be used by SVR4 code as well; since that doesn't belong here, I haven't worried about this case.) llvm-svn: 98077
* Remove dead parameter passing.Bill Wendling2010-03-021-1/+1
| | | | llvm-svn: 97536
* Move TLOF implementations to libCodegen to resolve layering violation.Anton Korobeynikov2010-02-151-1/+1
| | | | llvm-svn: 96288
* Remove an assumption of default arguments. This is in anticipation of aDavid Greene2010-02-151-41/+79
| | | | | | change to SelectionDAG build APIs. llvm-svn: 96236
* Rename the PerformTailCallOpt variable to GuaranteedTailCallOpt to reflectDan Gohman2010-02-081-7/+7
| | | | | | its current purpose. llvm-svn: 95564
* Revert 95130.Evan Cheng2010-02-021-1/+1
| | | | llvm-svn: 95160
* Pass callsite return type to TargetLowering::LowerCall and use that to check ↵Evan Cheng2010-02-021-1/+1
| | | | | | sibcall eligibility. llvm-svn: 95130
* PPC is not ready for sibcall optimization.Evan Cheng2010-01-291-0/+3
| | | | llvm-svn: 94853
* Eliminate target hook IsEligibleForTailCallOptimization.Evan Cheng2010-01-271-5/+5
| | | | | | | | | Target independent isel should always pass along the "tail call" property. Change target hook LowerCall's parameter "isTailCall" into a refernce. If the target decides it's impossible to honor the tail call request, it should set isTailCall to false to make target independent isel happy. llvm-svn: 94626
* Add more plumbing. This time in the LowerArguments and "get" functions whichBill Wendling2009-12-221-1/+1
| | | | | | | | return partial registers. This affected the back-end lowering code some. Also patch up some places I missed before in the "get" functions. llvm-svn: 91880
* Add support for calls through function pointers in the 64-bit PowerPC SVR4 ABI.Tilmann Scheller2009-12-181-3/+105
| | | | | | Patch contributed by Ken Werner of IBM! llvm-svn: 91680
* Make capitalization of names starting "is" more consistent.Dale Johannesen2009-11-241-10/+10
| | | | | | No functional change. llvm-svn: 89724
* Remove ISD::DEBUG_LOC and ISD::DBG_LABEL, which are no longer used.Dan Gohman2009-11-231-3/+0
| | | | | | | | Note that "hasDotLocAndDotFile"-style debug info was already broken; people wanting this functionality should implement it in the AsmPrinter/DwarfWriter code. llvm-svn: 89711
* We are not using DBG_STOPPOINT anymore.Devang Patel2009-11-211-1/+0
| | | | llvm-svn: 89536
* Target-independent support for TargetFlags on BlockAddress operands,Dan Gohman2009-11-201-1/+1
| | | | | | and support for blockaddresses in x86-32 PIC mode. llvm-svn: 89506
* Adjust isConstantSplat to allow for big-endian targets.Dale Johannesen2009-11-131-2/+2
| | | | | | PPC is such a target; make it work. llvm-svn: 87060
* Add a bool flag to StackObjects telling whether they reference spillDavid Greene2009-11-121-15/+20
| | | | | | | | | | | | | slots. The AsmPrinter will use this information to determine whether to print a spill/reload comment. Remove default argument values. It's too easy to pass a wrong argument value when multiple arguments have default values. Make everything explicit to trap bugs early. Update all targets to adhere to the new interfaces.. llvm-svn: 87022
* Add PowerPC codegen for indirect branches.Bob Wilson2009-11-041-0/+33
| | | | llvm-svn: 86050
* -Revert parts of 84326 and 84411. Distinquishing between fixed and non-fixedEvan Cheng2009-10-181-2/+2
| | | | | | | | | | | stack slots and giving them different PseudoSourceValue's did not fix the problem of post-alloc scheduling miscompiling llvm itself. - Apply Dan's conservative workaround by assuming any non fixed stack slots can alias other memory locations. This means a load from spill slot #1 cannot move above a store of spill slot #2. - Enable post-alloc scheduling for x86 at optimization leverl Default and above. llvm-svn: 84424
* Only fixed stack objects and spill slots should be get FixedStack ↵Evan Cheng2009-10-181-2/+2
| | | | | | PseudoSourceValue. llvm-svn: 84411
* Revert 84315 for now. Re-thinking the patch.Evan Cheng2009-10-171-4/+4
| | | | llvm-svn: 84321
* Rename getFixedStack to getStackObject. The stack objects represented are notEvan Cheng2009-10-171-4/+4
| | | | | | necessarily fixed. Only those will negative frame indices are "fixed." llvm-svn: 84315
* LBRX no longer has an explicit SrcValueSDNode operand, so the typeDan Gohman2009-09-271-1/+1
| | | | | | | operand is now at index 2, rather than 3. This fixes the "Invalid child # of SDNode!" failures on PowerPC. llvm-svn: 82942
* Improve MachineMemOperand handling.Dan Gohman2009-09-251-15/+22
| | | | | | | | | | | | | | | | | | | | | - Allocate MachineMemOperands and MachineMemOperand lists in MachineFunctions. This eliminates MachineInstr's std::list member and allows the data to be created by isel and live for the remainder of codegen, avoiding a lot of copying and unnecessary translation. This also shrinks MemSDNode. - Delete MemOperandSDNode. Introduce MachineSDNode which has dedicated fields for MachineMemOperands. - Change MemSDNode to have a MachineMemOperand member instead of its own fields with the same information. This introduces some redundancy, but it's more consistent with what MachineInstr will eventually want. - Ignore alignment when searching for redundant loads for CSE, but remember the greatest alignment. Target-specific code which previously used MemOperandSDNodes with generic SDNodes now use MemIntrinsicSDNodes, with opcodes in a designated range so that the SelectionDAG framework knows that MachineMemOperand information is available. llvm-svn: 82794
* Rename getTargetNode to getMachineNode, for consistency with theDan Gohman2009-09-251-3/+3
| | | | | | | | naming scheme used in SelectionDAG, where there are multiple kinds of "target" nodes, but "machine" nodes are nodes which represent a MachineInstr. llvm-svn: 82790
* Don't try to use pre-indexed addressing with sthbrx/stwbrxDan Gohman2009-09-251-1/+2
| | | | | | | instructions. This fixes a PowerPC bug exposed by some unrelated changes I'm working on. llvm-svn: 82743
* Fix PR4926. When target hook EmitInstrWithCustomInserter() insert new basic ↵Evan Cheng2009-09-191-2/+11
| | | | | | blocks and update CFG, it should also inform sdisel of the changes so the phi source operands will come from the right basic blocks. llvm-svn: 82311
* Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that ↵Evan Cheng2009-09-181-1/+2
| | | | | | | | sdisel will use to properly complete phi nodes. Not functionality change yet. llvm-svn: 82273
* Remove some not-really-used variables, as warnedDuncan Sands2009-09-061-3/+0
| | | | | | about by icc (#593, partial). Patch by Erick Tryzelaar. llvm-svn: 81115
* Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.Sandeep Patel2009-09-021-12/+12
| | | | llvm-svn: 80773
* Revert commit 80428. It completely broke exceptionDuncan Sands2009-08-311-34/+0
| | | | | | handling on x86-32 linux. llvm-svn: 80592
* - Add target lowering methods to get the preferred format for the FDE and LSDABill Wendling2009-08-291-0/+34
| | | | | | | | | encodings. - Make some of the values emitted by the FDEs dependent upon the pointer size. This is in line with how GCC does things. And it has the benefit of working for Darwin in 64-bit mode now. llvm-svn: 80428
* Change Pass::print to take a raw ostream instead of std::ostream,Chris Lattner2009-08-231-1/+1
| | | | | | update all code that this affects. llvm-svn: 79830
* Add support for the PowerPC 64-bit SVR4 ABI.Tilmann Scheller2009-08-151-31/+44
| | | | | | | | | | | | | | | | | The Link Register is volatile when using the 32-bit SVR4 ABI. Make it possible to use the 64-bit SVR4 ABI. Add non-volatile registers for the 64-bit SVR4 ABI. Make sure r2 is a reserved register when using the 64-bit SVR4 ABI. Update PPCFrameInfo for the 64-bit SVR4 ABI. Add FIXME for 64-bit Darwin PPC. Insert NOP instruction after direct function calls. Emit official procedure descriptors. Create TOC entries for GlobalAddress references. Spill 64-bit non-volatile registers to the correct slots. Only custom lower VAARG when using the 32-bit SVR4 ABI. Use simple VASTART lowering for the 64-bit SVR4 ABI. llvm-svn: 79091
* Remove HasCrazyBSS and add a flag in TAI to indicate that '.section' Bruno Cardoso Lopes2009-08-131-1/+1
| | | | | | must be emitted for PowerPC-Linux '.bss' section llvm-svn: 78958
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-1/+2
| | | | llvm-svn: 78948
* Add contexts to some of the MVT APIs. No functionality change yet, just the ↵Owen Anderson2009-08-121-1/+1
| | | | | | infrastructure work needed to get the contexts to where they need to be first. llvm-svn: 78759
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-111-445/+445
| | | | | | | | while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-509/+509
| | | | | | own struct type. llvm-svn: 78610
* Continue the SimpleValueType-ification.Owen Anderson2009-08-101-1/+1
| | | | llvm-svn: 78593
* Start moving TargetLowering away from using full MVTs and towards ↵Owen Anderson2009-08-101-1/+1
| | | | | | SimpleValueType, which will simplify the privatization of IntegerType in the future. llvm-svn: 78584
* 1. Make MCSection an abstract class.Chris Lattner2009-08-081-1/+1
| | | | | | | | | 2. Move section switch printing to MCSection virtual method which takes a TAI. This eliminates textual formatting stuff from TLOF. 3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and TLOFELF::AtIsCommentChar. llvm-svn: 78510
* Major calling convention code refactoring.Dan Gohman2009-08-051-252/+236
| | | | | | | | | | | | | | | | | | | 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
* Normalize Subtarget constructors to take a target triple string instead ofDaniel Dunbar2009-08-021-1/+1
| | | | | | | | | | 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
* refactor section construction in TLOF to be through an explicitChris Lattner2009-07-311-1/+1
| | | | | | initialize method, which can be called when an MCContext is available. llvm-svn: 77687
* Move types back to the 2.5 API.Owen Anderson2009-07-291-1/+1
| | | | llvm-svn: 77516
* the apple "ld_classic" linker doesn't support .literal16 in 32-bitChris Lattner2009-07-281-1/+1
| | | | | | | mode, and "ld64" (the default linker) falls back to it in -static mode. llvm-svn: 77334
* Rip all of the global variable lowering logic out of TargetAsmInfo. SinceChris Lattner2009-07-281-1/+9
| | | | | | | | | | | | | | | | | | | | 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
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-6/+6
| | | | llvm-svn: 76702
OpenPOWER on IntegriCloud