summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
Commit message (Collapse)AuthorAgeFilesLines
* If there's no instructions being emitted on X86 for a function, emit aBill Wendling2008-01-261-6/+2
| | | | | | nop. Emit the nop directly for PPC. llvm-svn: 46398
* If there are no machine instructions emitted for a function, then insertBill Wendling2008-01-261-2/+15
| | | | | | | a "nop" instruction so that we don't have the function's label associated with something that it's not supposed to be associated with. llvm-svn: 46394
* JITEmitter.cpp was trying to sync the icache for function stubs, butChris Lattner2008-01-251-2/+19
| | | | | | | | was actually passing a completely incorrect size to sys_icache_invalidate. Instead of having the JITEmitter do this (which doesn't have the correct size), just make the target sync its own stubs. llvm-svn: 46354
* The last pieces needed for loading arbitraryDuncan Sands2008-01-231-2/+2
| | | | | | | | | | | | | | | precision integers. This won't actually work (and most of the code is dead) unless the new legalization machinery is turned on. While there, I rationalized the handling of i1, and removed some bogus (and unused) sextload patterns. For i1, this could result in microscopically better code for some architectures (not X86). It might also result in worse code if annotating with AssertZExt nodes turns out to be more harmful than helpful. llvm-svn: 46280
* Honor explicit section information on Darwin.Dale Johannesen2008-01-231-2/+5
| | | | llvm-svn: 46267
* Implement flt_rounds for PowerPC.Dale Johannesen2008-01-181-0/+64
| | | | llvm-svn: 46174
* get symbolic information for ppc ldbl nodes.Chris Lattner2008-01-181-0/+5
| | | | llvm-svn: 46165
* Fix a latent bug exposed by my truncstore patch. We compiled stfiwx-2.ll to:Chris Lattner2008-01-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | _test: fctiwz f0, f1 stfiwx f0, 0, r4 blr instead of: _test: fctiwz f0, f1 stfd f0, -8(r1) nop nop lwz r2, -4(r1) stb r2, 0(r4) blr The former is not correct (stores 4 bytes, not 1). llvm-svn: 46161
* Revert the part of 45848 that treated weak globalsDale Johannesen2008-01-171-1/+2
| | | | | | | | as weak globals rather than commons. While not wrong, this change tickled a latent bug in Darwin's strip, so revert it for now as a workaround. llvm-svn: 46144
* This commit changes:Chris Lattner2008-01-171-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Legalize now always promotes truncstore of i1 to i8. 2. Remove patterns and gunk related to truncstore i1 from targets. 3. Rename the StoreXAction stuff to TruncStoreAction in TLI. 4. Make the TLI TruncStoreAction table a 2d table to handle from/to conversions. 5. Mark a wide variety of invalid truncstores as such in various targets, e.g. X86 currently doesn't support truncstore of any of its integer types. 6. Add legalize support for truncstores with invalid value input types. 7. Add a dag combine transform to turn store(truncate) into truncstore when safe. The later allows us to compile CodeGen/X86/storetrunc-fp.ll to: _foo: fldt 20(%esp) fldt 4(%esp) faddp %st(1) movl 36(%esp), %eax fstps (%eax) ret instead of: _foo: subl $4, %esp fldt 24(%esp) fldt 8(%esp) faddp %st(1) fstps (%esp) movl 40(%esp), %eax movss (%esp), %xmm0 movss %xmm0, (%eax) addl $4, %esp ret llvm-svn: 46140
* * Introduce a new SelectionDAG::getIntPtrConstant methodChris Lattner2008-01-171-3/+4
| | | | | | | | | | | | | and switch various codegen pieces and the X86 backend over to using it. * Add some comments to SelectionDAGNodes.h * Introduce a second argument to FP_ROUND, which indicates whether the FP_ROUND changes the value of its input. If not it is safe to xform things like fp_extend(fp_round(x)) -> x. llvm-svn: 46125
* Fix and enable EH for x86-64 Darwin. AddsDale Johannesen2008-01-151-0/+1
| | | | | | | | | ShortenEHDataFor64Bits as a not-very-accurate abstraction to cover all the changes in DwarfWriter. Some cosmetic changes to Darwin assembly code for gcc testsuite compatibility. llvm-svn: 46029
* If someone wants to implement ppc TRAP, they can go for it :)Chris Lattner2008-01-151-0/+1
| | | | llvm-svn: 46019
* rename SDTRet -> SDTNone.Chris Lattner2008-01-151-3/+3
| | | | | | Move definition of 'trap' sdnode up from x86 instrinfo to targetselectiondag.td. llvm-svn: 46017
* rename MachineInstr::setInstrDescriptor -> setDescChris Lattner2008-01-111-1/+1
| | | | llvm-svn: 45871
* Weak things initialized to 0 don't go in bss on Darwin.Dale Johannesen2008-01-112-10/+9
| | | | | | | Cosmetic changes to spacing to match gcc (some dejagnu tests actually care). llvm-svn: 45848
* Output sinl for a long double FSIN node, not sin.Duncan Sands2008-01-101-1/+3
| | | | | | | | Likewise fix up a bunch of other libcalls. While there I remove NEG_F32 and NEG_F64 since they are not used anywhere. This fixes 9 Ada ACATS failures. llvm-svn: 45833
* remove explicit sets of 'neverHasSideEffects' that can now be Chris Lattner2008-01-101-1/+1
| | | | | | inferred from the instr patterns. llvm-svn: 45824
* get def use info more correct.Chris Lattner2008-01-101-1/+2
| | | | llvm-svn: 45821
* 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
OpenPOWER on IntegriCloud