summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
Commit message (Collapse)AuthorAgeFilesLines
* Change MachineRelocation::DoesntNeedFnStub to NeedStub. This fields will be usedEvan Cheng2008-01-031-1/+2
| | | | | | for non-function GV relocations that require function address stubs (e.g. Mac OS X in non-static mode). llvm-svn: 45527
* leopard and above support alignment for common symbols.Chris Lattner2008-01-023-11/+32
| | | | llvm-svn: 45493
* Move some more instruction creation methods from RegisterInfo into InstrInfo.Owen Anderson2008-01-014-258/+256
| | | | llvm-svn: 45484
* Fix a bug in my previous patch: refer to the impl not the pure virtual ↵Chris Lattner2008-01-011-1/+1
| | | | | | version. It's unclear why gcc would ever compile this... llvm-svn: 45476
* Fix a problem where lib/Target/TargetInstrInfo.h would include and useChris Lattner2008-01-012-2/+2
| | | | | | | | | | a header file from libcodegen. This violates a layering order: codegen depends on target, not the other way around. The fix to this is to split TII into two classes, TII and TargetInstrInfoImpl, which defines stuff that depends on libcodegen. It is defined in libcodegen, where the base is not. llvm-svn: 45475
* Move copyRegToReg from MRegisterInfo to TargetInstrInfo. This is part of theOwen Anderson2007-12-313-28/+33
| | | | | | Machine-level API cleanup instigated by Chris. llvm-svn: 45470
* Rename SSARegMap -> MachineRegisterInfo in keeping with the idea Chris Lattner2007-12-313-36/+37
| | | | | | | | | | | | | | that "machine" classes are used to represent the current state of the code being compiled. Given this expanded name, we can start moving other stuff into it. For now, move the UsedPhysRegs and LiveIn/LoveOuts vectors from MachineFunction into it. Update all the clients to match. This also reduces some needless #includes, such as MachineModuleInfo from MachineFunction. llvm-svn: 45467
* Add new shorter predicates for testing machine operands for various types: Chris Lattner2007-12-305-26/+24
| | | | | | | | | | | | e.g. MO.isMBB() instead of MO.isMachineBasicBlock(). I don't plan on switching everything over, so new clients should just start using the shorter names. Remove old long accessors, switching everything over to use the short accessor: getMachineBasicBlock() -> getMBB(), getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc. llvm-svn: 45464
* More cleanups for MachineOperand:Chris Lattner2007-12-301-8/+2
| | | | | | | | | | - Eliminate the static "print" method for operands, moving it into MachineOperand::print. - Change various set* methods for register flags to take a bool for the value to set it to. Remove unset* methods. - Group methods more logically by operand flavor in MachineOperand.h llvm-svn: 45461
* Use MachineOperand::getImm instead of MachineOperand::getImmedValue. ↵Chris Lattner2007-12-304-28/+28
| | | | | | Likewise setImmedValue -> setImm llvm-svn: 45453
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-2942-84/+84
| | | | llvm-svn: 45418
* remove attribution from lib Makefiles.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45415
* Fix unintented change from last commitNicolas Geoffray2007-12-211-3/+3
| | | | llvm-svn: 45282
* Enable EH for linux/ppc32 targetsNicolas Geoffray2007-12-212-15/+33
| | | | llvm-svn: 45281
* Enable EH on PPC Darwin. This basically works; thereDale Johannesen2007-12-191-1/+1
| | | | | | | | | | | | are a couple of issues that show up with the optimizer, but I don't think they're really EH problems. (llvm-gcc testsuite users note: By default the testsuite uses the unwinding code that's built as part of your local llvm-gcc, which does not work. You need to trick it into using the installed system unwinding code to get useful results.) llvm-svn: 45221
* Mark the "isRemat" instruction as never having side effects.Bill Wendling2007-12-191-1/+1
| | | | llvm-svn: 45190
* Implicit def instructions, e.g. X86::IMPLICIT_DEF_GR32, are always ↵Evan Cheng2007-12-121-0/+2
| | | | | | re-materializable and they should not be spilled. llvm-svn: 44960
* Fix a significant code quality regression I introduced on PPC64 quite Chris Lattner2007-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a while ago. We now produce: _foo: mflr r0 std r0, 16(r1) ld r2, 16(r1) std r2, 0(r3) ld r0, 16(r1) mtlr r0 blr instead of: _foo: mflr r0 std r0, 16(r1) lis r0, 0 ori r0, r0, 16 ldx r2, r1, r0 std r2, 0(r3) ld r0, 16(r1) mtlr r0 blr for: void foo(void **X) { *X = __builtin_return_address(0); } on ppc64. llvm-svn: 44701
* implement __builtin_return_addr(0) on ppc.Chris Lattner2007-12-085-11/+58
| | | | llvm-svn: 44700
* refactor some code to avoid overloading the name 'usesLR' in Chris Lattner2007-12-083-12/+14
| | | | | | | different places to mean different things. Document what the one in PPCFunctionInfo means and when it is valid. llvm-svn: 44699
* Fix a compilation warning.Evan Cheng2007-12-081-1/+1
| | | | llvm-svn: 44691
* Initial commit of the machine code LICM pass. It successfully hoists this:Bill Wendling2007-12-071-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _foo: li r2, 0 LBB1_1: ; bb li r5, 0 stw r5, 0(r3) addi r2, r2, 1 addi r3, r3, 4 cmplw cr0, r2, r4 bne cr0, LBB1_1 ; bb LBB1_2: ; return blr to: _foo: li r2, 0 li r5, 0 LBB1_1: ; bb stw r5, 0(r3) addi r2, r2, 1 addi r3, r3, 4 cmplw cr0, r2, r4 bne cr0, LBB1_1 ; bb LBB1_2: ; return blr ZOMG!! :-) Moar to come... llvm-svn: 44687
* Added canFoldMemoryOperand for PPC.Evan Cheng2007-12-052-0/+23
| | | | llvm-svn: 44623
* Add a argument to storeRegToStackSlot and storeRegToAddr to specify whetherEvan Cheng2007-12-052-15/+17
| | | | | | the stored register is killed. llvm-svn: 44600
* Remove redundant foldMemoryOperand variants and other code clean up.Evan Cheng2007-12-022-15/+8
| | | | llvm-svn: 44517
* Allow some reloads to be folded in multi-use cases. Specifically testl r, r ↵Evan Cheng2007-12-011-0/+12
| | | | | | -> cmpl [mem], 0. llvm-svn: 44479
* Implement ExpandOperationResult for ppc i64 fp->int, which fixesChris Lattner2007-11-282-0/+11
| | | | | | | CodeGen/Generic/fp_to_int.ll among others. Its unclear why this just started failing... llvm-svn: 44407
* Fix a crash on invalid code due to memcpy lowering.Chris Lattner2007-11-271-25/+30
| | | | llvm-svn: 44378
* Fix .eh table linkage issues on Darwin. Some EH supportDale Johannesen2007-11-202-4/+17
| | | | | | for Darwin PPC, but it's not fully working yet. llvm-svn: 44258
* Remove meaningless qualifiers from return types, avoiding compiler warnings.Dan Gohman2007-11-192-2/+2
| | | | llvm-svn: 44240
* Revert previous; these files aren't ready to go in yet.Dale Johannesen2007-11-131-1/+1
| | | | llvm-svn: 44057
* Add parameter to getDwarfRegNum to permit targetsDale Johannesen2007-11-133-3/+3
| | | | | | | | to use different mappings for EH and debug info; no functional change yet. Fix warning in X86CodeEmitter. llvm-svn: 44056
* Unifacalize the CALLSEQ{START,END} stuff.Bill Wendling2007-11-131-5/+5
| | | | llvm-svn: 44045
* Unify CALLSEQ_{START,END}. They take 4 parameters: the chain, two stackBill Wendling2007-11-132-9/+15
| | | | | | | | | | | adjustment fields, and an optional flag. If there is a "dynamic_stackalloc" in the code, make sure that it's bracketed by CALLSEQ_START and CALLSEQ_END. If not, then there is the potential for the stack to be changed while the stack's being used by another instruction (like a call). This can only result in tears... llvm-svn: 44037
* Completely forgot, that we have some debug information emission on PPC. This ↵Anton Korobeynikov2007-11-121-2/+2
| | | | | | | | should fix some regressions on ppc nightly tests. llvm-svn: 44029
* Add a flag for indirect branch instructions.Owen Anderson2007-11-121-1/+2
| | | | | | Target maintainers: please check that the instructions for your target are correctly marked. llvm-svn: 44012
* Use TableGen to emit information for dwarf register numbers. Anton Korobeynikov2007-11-113-173/+180
| | | | | | | | This makes DwarfRegNum to accept list of numbers instead. Added three different "flavours", but only slightly tested on x86-32/linux. Please check another subtargets if possible, llvm-svn: 43997
* Eliminate the remaining uses of getTypeSize. ThisDuncan Sands2007-11-051-2/+2
| | | | | | | | | | | | | | should only effect x86 when using long double. Now 12/16 bytes are output for long double globals (the exact amount depends on the alignment). This brings globals in line with the rest of LLVM: the space reserved for an object is now always the ABI size. One tricky point is that only 10 bytes should be output for long double if it is a field in a packed struct, which is the reason for the additional argument to EmitGlobalConstant. llvm-svn: 43688
* Fix crash before main on ppc/linux with static constructors. PR1771Nick Lewycky2007-11-042-0/+4
| | | | llvm-svn: 43676
* Disable a couple more things for ppcf128.Dale Johannesen2007-10-231-2/+4
| | | | llvm-svn: 43267
* Temporary solution: added a different set of BCTRL_Macho / BCTRL_ELF with ↵Evan Cheng2007-10-233-8/+18
| | | | | | right callee-saved defs set for ppc64. llvm-svn: 43248
* Use ptr type in the immediate field of a BxA instruction so we don't end up ↵Evan Cheng2007-10-221-1/+2
| | | | | | selecting 32-bit call instruction for ppc64. llvm-svn: 43228
* comment fixesChris Lattner2007-10-191-3/+3
| | | | llvm-svn: 43168
* More ppcf128 issues (maybe the last)?Dale Johannesen2007-10-191-0/+7
| | | | llvm-svn: 43160
* - Added getOpcodeAfterMemoryUnfold(). It doesn't unfold an instruction, but ↵Evan Cheng2007-10-182-4/+4
| | | | | | | | only returns the opcode of the instruction post unfolding. - Fix some copy+paste bugs. llvm-svn: 43153
* Use SmallVectorImpl instead of SmallVector with hardcoded size in MRegister ↵Evan Cheng2007-10-182-10/+10
| | | | | | public interface. llvm-svn: 43150
* Fix a bug handling frame references in ppc inline asm when the frame offsetChris Lattner2007-10-161-24/+33
| | | | | | doesn't fit into 16 bits. llvm-svn: 43032
* Change LowerFP_TO_SINT to create the specific code it needs instead of Chris Lattner2007-10-151-4/+11
| | | | | | | | | | unconditionally creating an i64 bitcast. With the future legalizer design, operation legalization can't introduce new nodes with illegal types. This fixes the rest of olden on ppc32. llvm-svn: 43005
* Revert 42908 for now.Evan Cheng2007-10-141-9/+9
| | | | llvm-svn: 42960
* Fix type mismatch error in PPC Altivec (only causesDale Johannesen2007-10-141-2/+2
| | | | | | a problem when asserts are on). From vecLib. llvm-svn: 42959
OpenPOWER on IntegriCloud