summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
Commit message (Collapse)AuthorAgeFilesLines
* Change target-specific classes to use more precise static types.Dan Gohman2008-05-142-4/+4
| | | | | | | This eliminates the need for several awkward casts, including the last dynamic_cast under lib/Target. llvm-svn: 51091
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-132-7/+9
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Tail call optimization improvements:Arnold Schwaighofer2008-04-308-102/+826
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move platform independent code (lowering of possibly overwritten arguments, check for tail call optimization eligibility) from target X86ISelectionLowering.cpp to TargetLowering.h and SelectionDAGISel.cpp. Initial PowerPC tail call implementation: Support ppc32 implemented and tested (passes my tests and test-suite llvm-test). Support ppc64 implemented and half tested (passes my tests). On ppc tail call optimization is performed if caller and callee are fastcc call is a tail call (in tail call position, call followed by ret) no variable argument lists or byval arguments option -tailcallopt is enabled Supported: * non pic tail calls on linux/darwin * module-local tail calls on linux(PIC/GOT)/darwin(PIC) * inter-module tail calls on darwin(PIC) If constraints are not met a normal call will be emitted. A test checking the argument lowering behaviour on x86-64 was added. llvm-svn: 50477
* A few inline asm cleanups:Chris Lattner2008-04-262-2/+2
| | | | | | | | | - Make targetlowering.h fit in 80 cols. - Make LowerAsmOperandForConstraint const. - Make lowerXConstraint -> LowerXConstraint - Make LowerXConstraint return a const char* instead of taking a string byref. llvm-svn: 50312
* add a noteChris Lattner2008-04-251-0/+23
| | | | llvm-svn: 50267
* 64-bit atomic operations.Evan Cheng2008-04-194-56/+80
| | | | llvm-svn: 49949
* PPC32 atomic operations.Evan Cheng2008-04-193-2/+184
| | | | llvm-svn: 49947
* Correlate stubs with functions in JIT: when emitting a stub, the JIT tells ↵Nicolas Geoffray2008-04-162-6/+9
| | | | | | | | the memory manager which function the stub will resolve. llvm-svn: 49814
* Infrastructure for getting the machine code size of a function and an ↵Nicolas Geoffray2008-04-163-22/+26
| | | | | | instruction. X86, PowerPC and ARM are implemented llvm-svn: 49809
* Change Divided flag to Split, as suggested by EvanNicolas Geoffray2008-04-151-2/+2
| | | | llvm-svn: 49715
* Reverse sense of unwind-tables option. This meansDale Johannesen2008-04-141-1/+1
| | | | | | | stack tracebacks on Darwin x86-64 won't work by default; nevertheless, everybody but me thinks this is a good idea. llvm-svn: 49663
* Add a divided flag for the first piece of an argument divided into mulitple ↵Nicolas Geoffray2008-04-131-12/+12
| | | | | | parts. Fixes PR1643 llvm-svn: 49611
* Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not LegalDan Gohman2008-04-121-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | on any current target and aren't optimized in DAGCombiner. Instead of using intermediate nodes, expand the operations, choosing between simple loads/stores, target-specific code, and library calls, immediately. Previously, the code to emit optimized code for these operations was only used at initial SelectionDAG construction time; now it is used at all times. This fixes some cases where rep;movs was being used for small copies where simple loads/stores would be better. This also cleans up code that checks for alignments less than 4; let the targets make that decision instead of doing it in target-independent code. This allows x86 to use rep;movs in low-alignment cases. Also, this fixes a bug that resulted in the use of rep;stos for memsets of 0 with non-constant memory size when the alignment was at least 4. It's better to use the library in this case, which can be significantly faster when the size is large. This also preserves more SourceValue information when memory intrinsics are lowered into simple loads/stores. llvm-svn: 49572
* Implement new llc flag -disable-required-unwind-tables.Dale Johannesen2008-04-081-1/+2
| | | | | | Corresponds to -fno-unwind-tables (usually default in gcc). llvm-svn: 49361
* Rename MemOperand to MachineMemOperand. This was suggested byDan Gohman2008-04-071-2/+2
| | | | | | | review feedback from Chris quite a while ago. No functionality change. llvm-svn: 49348
* Re-commit of the r48822, where the infinite looping problem discoveredRoman Levenstein2008-04-071-6/+6
| | | | | | by Dan Gohman is fixed. llvm-svn: 49330
* Backing out 48222 temporarily.Evan Cheng2008-04-031-6/+6
| | | | llvm-svn: 49124
* Cosmetic changes per EH patch review feedback.Dale Johannesen2008-04-021-3/+3
| | | | llvm-svn: 49096
* Recommitting EH patch; this should answer most of theDale Johannesen2008-04-022-3/+7
| | | | | | | | | | | | | | | review feedback. -enable-eh is still accepted but doesn't do anything. EH intrinsics use Dwarf EH if the target supports that, and are handled by LowerInvoke otherwise. The separation of the EH table and frame move data is, I think, logically figured out, but either one still causes full EH info to be generated (not sure how to split the metadata correctly). MachineModuleInfo::needsFrameInfo is no longer used and is removed. llvm-svn: 49064
* Revert 49006 for the moment.Dale Johannesen2008-04-012-7/+3
| | | | llvm-svn: 49046
* Emit exception handling info for functions which areDale Johannesen2008-03-312-3/+7
| | | | | | | | | | | not marked nounwind, or for all functions when -enable-eh is set, provided the target supports Dwarf EH. llvm-gcc generates nounwind in the right places; other FEs will need to do so also. Given such a FE, -enable-eh should no longer be needed. llvm-svn: 49006
* Move reMaterialize() from TargetRegisterInfo to TargetInstrInfo.Evan Cheng2008-03-312-12/+0
| | | | llvm-svn: 48995
* Fix "Control reaches the end of non-void function" warnings, Chris Lattner2008-03-301-0/+2
| | | | | | patch by David Chisnall. llvm-svn: 48963
* Use a linked data structure for the uses lists of an SDNode, just like Roman Levenstein2008-03-261-6/+6
| | | | | | | | | | | | | LLVM Value/Use does and MachineRegisterInfo/MachineOperand does. This allows constant time for all uses list maintenance operations. The idea was suggested by Chris. Reviewed by Evan and Dan. Patch is tested and approved by Dan. On normal use-cases compilation speed is not affected. On very big basic blocks there are compilation speedups in the range of 15-20% or even better. llvm-svn: 48822
* Smaller function alignment when optimizing for size.Evan Cheng2008-03-251-1/+1
| | | | llvm-svn: 48805
* Add explicit keywords.Dan Gohman2008-03-251-1/+1
| | | | llvm-svn: 48801
* A quick nm audit turned up several fixed tables and objects that wereDan Gohman2008-03-251-1/+1
| | | | | | | marked read-write. Use const so that they can be allocated in a read-only segment. llvm-svn: 48800
* Use the bit size of the operand instead of the hard-coded 32 to generate theBill Wendling2008-03-241-2/+5
| | | | | | mask. llvm-svn: 48750
* Introduce a new node for holding call argumentDuncan Sands2008-03-211-42/+26
| | | | | | | | | | | | | | | | | flags. This is needed by the new legalize types infrastructure which wants to expand the 64 bit constants previously used to hold the flags on 32 bit machines. There are two functional changes: (1) in LowerArguments, if a parameter has the zext attribute set then that is marked in the flags; before it was being ignored; (2) PPC had some bogus code for handling two word arguments when using the ELF 32 ABI, which was hard to convert because of the bogusness. As suggested by the original author (Nicolas Geoffray), I've disabled it for the moment. Tested with "make check" and the Ada ACATS testsuite. llvm-svn: 48640
* detabify llvm, patch by Mike Stump!Chris Lattner2008-03-202-22/+22
| | | | llvm-svn: 48577
* Add support for multiple return values for the PPC target byDan Gohman2008-03-192-146/+23
| | | | | | | converting call result lowering to use the CallingConvLowering infastructure. llvm-svn: 48552
* Make Complex long long/double/long double workDale Johannesen2008-03-172-2/+19
| | | | | | in ppc64 mode. llvm-svn: 48459
* Unbreak JIT. Ignore TargetInstrInfo::IMPLICIT_DEF.Evan Cheng2008-03-171-0/+2
| | | | llvm-svn: 48447
* Next round of PPC32 ABI changes. Allow for gccDale Johannesen2008-03-172-13/+66
| | | | | | | | | behavior where a callee thinks a param will be present in memory, even though the ABI doc says it doesn't have to be. Handle complex long long and complex double (4 and 8 return regs). llvm-svn: 48439
* Replace all target specific implicit def instructions with a target ↵Evan Cheng2008-03-155-40/+0
| | | | | | independent one: TargetInstrInfo::IMPLICIT_DEF. llvm-svn: 48380
* Implement the real calling convention for ppc32 Altivec:Dale Johannesen2008-03-141-21/+118
| | | | | | | vectors go at the end of the memory area, after all non-vector parameters. llvm-svn: 48364
* Do not promote float params to double in varargsDale Johannesen2008-03-121-6/+0
| | | | | | | | | calls here. This was done earlier for params in the varargs part of the params; any float params that survive to here are in the non-varargs part, and must not be promoted. llvm-svn: 48310
* One more bit of Altivec parameter passing.Dale Johannesen2008-03-121-3/+5
| | | | llvm-svn: 48269
* Implement Altivec passing to varargs functions on ppc.Dale Johannesen2008-03-121-7/+72
| | | | llvm-svn: 48264
* Use PassManagerBase instead of FunctionPassManager for functionsDan Gohman2008-03-113-11/+10
| | | | | | | | that merely add passes. This allows them to be used with either FunctionPassManager or PassManager, or even with a custom new kind of pass manager. llvm-svn: 48256
* Generalize ExpandIntToFP to handle the case where the operand is legalDan Gohman2008-03-111-0/+4
| | | | | | | | and it's the result that requires expansion. This code is a little confusing because the TargetLoweringInfo tables for [US]INT_TO_FP use the operand type (the integer type) rather than the result type. llvm-svn: 48206
* Disable prolog code that aligns the stack when aDale Johannesen2008-03-101-7/+17
| | | | | | | | | | | | | | local object of >16 byte alignment exists. It does not work and getting it to work is not trivial, as explained in the comment. This fixes all the remaining ppc32 failures in the struct-layout-1 part of the gcc testsuite. (gcc does not support this either, and the only way to get such an object is with __attribute__((aligned)) or generic vectors; it can't be done in a standard-conforming program, or with Altivec. So I think disabling it is OK.) llvm-svn: 48188
* Change the "enable/disable" mechanism so that we can enable PPC registerBill Wendling2008-03-103-58/+77
| | | | | | scavenging for 32-bit and 64-bit separately. llvm-svn: 48186
* Default ISD::PREFETCH to expand.Evan Cheng2008-03-101-1/+0
| | | | llvm-svn: 48169
* fix 80 col violations.Chris Lattner2008-03-101-8/+8
| | | | llvm-svn: 48166
* Stylistic modifications. No functionality changes.Nicolas Geoffray2008-03-101-44/+39
| | | | llvm-svn: 48158
* Give TargetLowering::getSetCCResultType() a parameter so that ISD::SETCC'sScott Michel2008-03-102-1/+10
| | | | | | | | return ValueType can depend its operands' ValueType. This is a cosmetic change, no functionality impacted. llvm-svn: 48145
* Add description of individual bits in CR. This fix PR1765.Nicolas Geoffray2008-03-105-38/+152
| | | | llvm-svn: 48143
* Increase ISD::ParamFlags to 64 bits. Increase the ByValSizeDale Johannesen2008-03-101-7/+13
| | | | | | | | | | field to 32 bits, thus enabling correct handling of ByVal structs bigger than 0x1ffff. Abstract interface a bit. Fixes gcc.c-torture/execute/pr23135.c and gcc.c-torture/execute/pr28982b.c in gcc testsuite (were ICE'ing on ppc32, quietly producing wrong code on x86-32.) llvm-svn: 48122
* Darwin PPC64 indirect call target goes in X12, not R12. This fixes theseChris Lattner2008-03-091-2/+3
| | | | | | | | two regression tests: test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert.ll test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert2.ll llvm-svn: 48120
OpenPOWER on IntegriCloud