summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
Commit message (Collapse)AuthorAgeFilesLines
* Back out 53254. It broke ppc debug info codegen.Evan Cheng2008-07-091-6/+3
| | | | llvm-svn: 53280
* Make debug info come out in data-only files.Dale Johannesen2008-07-081-3/+6
| | | | | | | | | | | This is a question of the debugging setup code not being called at the right time, and it's called from target-dependent code for some reason. I have only attempted to fix Darwin, but I'm pretty sure it's broken elsewhere; I'll leave that to people who can test it. llvm-svn: 53254
* Pool-allocation for MachineInstrs, MachineBasicBlocks, andDan Gohman2008-07-073-56/+66
| | | | | | | | | | | MachineMemOperands. The pools are owned by MachineFunctions. This drastically reduces the number of calls to malloc/free made during the "Emit" phase of scheduling, as well as later phases in CodeGen. Combined with other changes, this speeds up the "instruction selection" phase of CodeGen by 10% in some cases. llvm-svn: 53212
* Clean up PPC register specification.Evan Cheng2008-07-071-34/+33
| | | | llvm-svn: 53209
* Simplify this use of BuildMI. This is also in preparation forDan Gohman2008-07-071-3/+1
| | | | | | pool-allocating MachineInstrs. llvm-svn: 53198
* Add explicit keywords.Dan Gohman2008-07-071-1/+1
| | | | llvm-svn: 53179
* Rather than having a different custom legalizationDuncan Sands2008-07-042-2/+2
| | | | | | | | | | | | hook for each way in which a result type can be legalized (promotion, expansion, softening etc), just use one: ReplaceNodeResults, which returns a node with exactly the same result types as the node passed to it, but presumably with a bunch of custom code behind the scenes. No change if the new LegalizeTypes infrastructure is not turned on. llvm-svn: 53137
* Linux also does not require exception handlingDuncan Sands2008-07-041-1/+0
| | | | | | | | | moves in order to get correct debug info. Since I can't imagine how any target could possibly be any different, I've just stripped out the option: now all the world's like Darwin! llvm-svn: 53134
* - Remove calls to copyKillDeadInfo which is an N^2 function. Instead, ↵Evan Cheng2008-07-031-10/+27
| | | | | | | | propagate kill / dead markers as new instructions are constructed in foldMemoryOperand, convertToThressAddress, etc. - Also remove LiveVariables::instructionChanged, etc. Replace all calls with cheaper calls which update VarInfo kill list. llvm-svn: 53097
* Add a new getMergeValues method that does not needDuncan Sands2008-07-021-6/+6
| | | | | | | | | | to be passed the list of value types, and use this where appropriate. Inappropriate places are where the value type list is already known and may be long, in which case the existing method is more efficient. llvm-svn: 53035
* Darwin doesn't need exception handling information for the "move" info whenBill Wendling2008-07-011-0/+1
| | | | | | debug information is being output, because it's leet! llvm-svn: 52994
* Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminatingDan Gohman2008-07-013-5/+7
| | | | | | | | | | | | | | | | the need for a flavor operand, and add a new SDNode subclass, LabelSDNode, for use with them to eliminate the need for a label id operand. Change instruction selection to let these label nodes through unmodified instead of creating copies of them. Teach the MachineInstr emitter how to emit a MachineInstr directly from an ISD label node. This avoids the need for allocating SDNodes for the label id and flavor value, as well as SDNodes for each of the post-isel label, label id, and label flavor. llvm-svn: 52943
* Rename ISD::LOCATION to ISD::DBG_STOPPOINT to better reflect itsDan Gohman2008-06-301-1/+1
| | | | | | | | | | | | | | | | | purpose, and give it a custom SDNode subclass so that it doesn't need to have line number, column number, filename string, and directory string, all existing as individual SDNodes to be the operands. This was the only user of ISD::STRING, StringSDNode, etc., so remove those and some associated code. This makes stop-points considerably easier to read in -view-legalize-dags output, and reduces overhead (creating new nodes and copying std::strings into them) on code containing debugging information. llvm-svn: 52924
* Split scheduling from instruction selection.Evan Cheng2008-06-301-7/+4
| | | | llvm-svn: 52923
* Revert the SelectionDAG optimization that makesDuncan Sands2008-06-301-17/+10
| | | | | | | | | | | | | | | | | | it impossible to create a MERGE_VALUES node with only one result: sometimes it is useful to be able to create a node with only one result out of one of the results of a node with more than one result, for example because the new node will eventually be used to replace a one-result node using ReplaceAllUsesWith, cf X86TargetLowering::ExpandFP_TO_SINT. On the other hand, most users of MERGE_VALUES don't need this and for them the optimization was valuable. So add a new utility method getMergeValues for creating MERGE_VALUES nodes which by default performs the optimization. Change almost everywhere to use getMergeValues (and tidy some stuff up at the same time). llvm-svn: 52893
* Provide correct encoding for PPC LWARX instructions.Anton Korobeynikov2008-06-271-2/+2
| | | | | | Patch by Gary Benson! llvm-svn: 52828
* Switch the PPC backend and target-independent JIT to use the libsystem Chris Lattner2008-06-252-31/+3
| | | | | | | InvalidateInstructionCache method instead of calling through a hook on the JIT. This is a host feature, not a target feature. llvm-svn: 52734
* Added MemOperands to Atomic operations since Atomics touches memory.Mon P Wang2008-06-252-10/+10
| | | | | | | | Added abstract class MemSDNode for any Node that have an associated MemOperand Changed atomic.lcs => atomic.cmp.swap, atomic.las => atomic.load.add, and atomic.lss => atomic.load.sub llvm-svn: 52706
* Remove unnecessary #includes.Dan Gohman2008-06-221-1/+0
| | | | llvm-svn: 52613
* Use MachineBasicBlock::transferSuccessors.Dan Gohman2008-06-211-8/+3
| | | | llvm-svn: 52594
* Add one more 'magic' define :)Anton Korobeynikov2008-06-171-1/+2
| | | | llvm-svn: 52420
* Unbreak non-PPC buildsAnton Korobeynikov2008-06-171-4/+5
| | | | llvm-svn: 52419
* Provide generic hooks for icache invalidation. Add PPC implementation.Anton Korobeynikov2008-06-173-14/+10
| | | | | | Patch by Gary Benson! llvm-svn: 52418
* Add support for icache invalidation on non-darwin ppc systems.Chris Lattner2008-06-161-2/+19
| | | | | | Patch by Gary Benson! llvm-svn: 52332
* Add option to commuteInstruction() which forces it to create a new ↵Evan Cheng2008-06-162-6/+24
| | | | | | (commuted) instruction. llvm-svn: 52308
* Remove comparison methods for MVT. The main causeDuncan Sands2008-06-081-1/+1
| | | | | | | | | | | of apint codegen failure is the DAG combiner doing the wrong thing because it was comparing MVT's using < rather than comparing the number of bits. Removing the < method makes this mistake impossible to commit. Instead, add helper methods for comparing bits and use them. llvm-svn: 52098
* Temporarily reverting r52056. It's causing PPC to fail to bootstrap.Bill Wendling2008-06-081-3/+0
| | | | llvm-svn: 52085
* Typo.Evan Cheng2008-06-061-1/+1
| | | | llvm-svn: 52062
* PPC preferred loop alignment is 16.Evan Cheng2008-06-061-0/+3
| | | | llvm-svn: 52056
* Wrap MVT::ValueType in a struct to get type safetyDuncan Sands2008-06-063-139/+140
| | | | | | | | | | | | | | | | and better control the abstraction. Rename the type to MVT. To update out-of-tree patches, the main thing to do is to rename MVT::ValueType to MVT, and rewrite expressions like MVT::getSizeInBits(VT) in the form VT.getSizeInBits(). Use VT.getSimpleVT() to extract a MVT::SimpleValueType for use in switch statements (you will get an assert failure if VT is an extended value type - these shouldn't exist after type legalization). This results in a small speedup of codegen and no new testsuite failures (x86-64 linux). llvm-svn: 52044
* Add StringConstantPrefix to control what theDale Johannesen2008-06-031-0/+1
| | | | | | assembler names of string constants look like. llvm-svn: 51909
* Add FreeBSD/PPC support, patch by Marcel Moolenaar!Chris Lattner2008-05-241-2/+2
| | | | llvm-svn: 51538
* Put initialized const weak objects into correctDale Johannesen2008-05-241-1/+9
| | | | | | sections on ppc32 darwin. g++.dg/abi/key2.C llvm-svn: 51527
* Add a missed CommonLinkage check.Dale Johannesen2008-05-231-0/+1
| | | | llvm-svn: 51503
* Handle quoted names when constructing $stub's,Dale Johannesen2008-05-191-18/+35
| | | | | | $non_lazy_ptr's and $lazy_ptr's. llvm-svn: 51277
* Record weak external linkage in a case where we wereDale Johannesen2008-05-161-0/+12
| | | | | | | missing it. gcc.dg/darwin-weakimport-2.c. Handle common and weak differently for darwin ppc32. llvm-svn: 51201
* Add CommonLinkage; currently tentative definitionsDale Johannesen2008-05-141-6/+8
| | | | | | | | | | are represented as "weak", but there are subtle differences in some cases on Darwin, so we need both. The intent is that "common" will behave identically to "weak" unless somebody changes their target to do something else. No functional change as yet. llvm-svn: 51118
* 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
OpenPOWER on IntegriCloud