summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
Commit message (Collapse)AuthorAgeFilesLines
* Emit unused EH frames for weak definitions on Darwin,Dale Johannesen2008-01-101-3/+4
| | | | | | | because assembler/linker can't cope with weak absolutes. PR 1880. llvm-svn: 45811
* Use size_t to store Pos, avoid truncating valueDuncan Sands2008-01-081-1/+1
| | | | | | | | on 64-bit builds. Analysis and original patch by Török Edwin. Code audit found another place with the same problem, also fixed here. llvm-svn: 45746
* Finally implement correct ordered comparisons for PPC, even thoughChris Lattner2008-01-082-24/+72
| | | | | | | | the code generated is not wonderful. This turns a miscompilation into a code quality bug (noted in the ppc readme). This fixes PR642, which is over 2 years old (!). Nate, please review this. llvm-svn: 45742
* rename TargetInstrDescriptor -> TargetInstrDesc.Chris Lattner2008-01-073-4/+4
| | | | | | | Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. llvm-svn: 45695
* use predicate.Chris Lattner2008-01-071-1/+1
| | | | llvm-svn: 45691
* no need to explicitly clear these fields.Chris Lattner2008-01-071-1/+0
| | | | llvm-svn: 45683
* Move a bunch more accessors from TargetInstrInfo to TargetInstrDescriptorChris Lattner2008-01-072-3/+2
| | | | llvm-svn: 45680
* remove MachineOpCode typedef.Chris Lattner2008-01-071-1/+1
| | | | llvm-svn: 45679
* Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflectsChris Lattner2008-01-071-2/+3
| | | | | | | | | | | | | | | that it is cheap and efficient to get. Move a variety of predicates from TargetInstrInfo into TargetInstrDescriptor, which makes it much easier to query a predicate when you don't have TII around. Now you can use MI->getDesc()->isBranch() instead of going through TII, and this is much more efficient anyway. Not all of the predicates have been moved over yet. Update old code that used MI->getInstrDescriptor()->Flags to use the new predicates in many places. llvm-svn: 45674
* Move even more functionality from MRegisterInfo into TargetInstrInfo.Owen Anderson2008-01-074-94/+94
| | | | | | Some day I'll get it all moved over... llvm-svn: 45672
* rename isLoad -> isSimpleLoad due to evan's desire to have such a predicate.Chris Lattner2008-01-064-7/+7
| | | | llvm-svn: 45667
* rename isStore -> mayStore to more accurately reflect what it captures.Chris Lattner2008-01-063-3/+3
| | | | llvm-svn: 45656
* Change the 'isStore' inferrer to look for 'SDNPMayStore' Chris Lattner2008-01-062-9/+9
| | | | | | | | | | | instead of "ISD::STORE". This allows us to mark target-specific dag nodes as storing (such as ppc byteswap stores). This allows us to remove more explicit isStore flags from the .td files. Finally, add a warning for when a .td file contains an explicit isStore and tblgen is able to infer it. llvm-svn: 45654
* remove some isStore flags that are now inferred automatically.Chris Lattner2008-01-063-6/+9
| | | | llvm-svn: 45652
* Correct order of parameters.Evan Cheng2008-01-041-2/+2
| | | | llvm-svn: 45562
* 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
OpenPOWER on IntegriCloud