summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
Commit message (Collapse)AuthorAgeFilesLines
* Use the BuildMI overload that sets up a destination registerDan Gohman2008-08-191-6/+3
| | | | | | instead of the one that doesn't and then adding it manually. llvm-svn: 55006
* Handle the case where target-specific fastisel code doesn't haveDan Gohman2008-08-191-0/+5
| | | | | | a desired opcode. llvm-svn: 55005
* don't use the result of WriteTypeSymbolic or WriteAsOperand.Chris Lattner2008-08-191-5/+6
| | | | llvm-svn: 54978
* Rename some GC classes so that their roll will hopefully be clearer.Gordon Henriksen2008-08-171-17/+18
| | | | | | | | | | | | | | | | | | In particular, Collector was confusing to implementors. Several thought that this compile-time class was the place to implement their runtime GC heap. Of course, it doesn't even exist at runtime. Specifically, the renames are: Collector -> GCStrategy CollectorMetadata -> GCFunctionInfo CollectorModuleMetadata -> GCModuleInfo CollectorRegistry -> GCRegistry Function::getCollector -> getGC (setGC, hasGC, clearGC) Several accessors and nested types have also been renamed to be consistent. These changes should be obvious. llvm-svn: 54899
* Factor GC metadata table assembly generation out of Collector in preparation ↵Gordon Henriksen2008-08-171-1/+1
| | | | | | for splitting AsmPrinter into its own library. llvm-svn: 54881
* Rework the routines that convert AP[S]Int into a string. Now, instead ofChris Lattner2008-08-171-1/+1
| | | | | | | | | | | | | | | | | returning an std::string by value, it fills in a SmallString/SmallVector passed in. This significantly reduces string thrashing in some cases. More specifically, this: - Adds an operator<< and a print method for APInt that allows you to directly send them to an ostream. - Reimplements APInt::toString to be much simpler and more efficient algorithmically in addition to not thrashing strings quite as much. This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the asmprinter. This also fixes a bug I introduced into the asmwriter in a previous patch w.r.t. alias printing. llvm-svn: 54873
* Make FastISel's constructor protected, and give it a destructor.Dan Gohman2008-08-141-0/+2
| | | | llvm-svn: 54793
* Improve support for vector casts in LLVM IR and CodeGen.Dan Gohman2008-08-144-88/+221
| | | | llvm-svn: 54784
* Fix a bogus srem rule - a negative value srem'd by a power-of-2Dan Gohman2008-08-131-5/+3
| | | | | | | can have a non-negative result; for example, -16%16 is 0. Also, clarify the related comments. This fixes PR2670. llvm-svn: 54767
* Allow SelectionDAG to create EXTRACT_VECTOR_ELT nodes withDan Gohman2008-08-131-11/+9
| | | | | | | non-constant indices. Only a few of the peephole checks require a constant index. llvm-svn: 54764
* Initial checkin of the new "fast" instruction selection support. SeeDan Gohman2008-08-131-0/+104
| | | | | | | the comments in FastISelEmitter.cpp for details on what this is. This is currently experimental and unusable. llvm-svn: 54751
* Rename SelectionDAGISel's FastISel to Fast, to begin to makeDan Gohman2008-08-131-3/+3
| | | | | | room for the new FastISel instruction selection code. llvm-svn: 54749
* Correct the filename in the top-of-file comment.Dan Gohman2008-08-121-1/+1
| | | | llvm-svn: 54688
* Take the FrameOffset into account when computing the alignmentDan Gohman2008-08-111-1/+1
| | | | | | of stack objects. This fixes PR2656. llvm-svn: 54646
* Add skeleton of simple basic block instruction selector.Evan Cheng2008-08-083-3/+81
| | | | llvm-svn: 54522
* Add the remaining fp_round libcalls:Bruno Cardoso Lopes2008-08-073-2/+41
| | | | | | | | | | | | | FPROUND_F80_F32, FPROUND_PPCF128_F32, FPROUND_F80_F64, FPROUND_PPCF128_F64 Support for soften float fp_round operands is added, Mips needs this to round f64->f32. Also added support to soften float FABS result, Mips doesn't support double fabs results while in 'single float only' mode. llvm-svn: 54484
* Factor code that finalize PHI nodes, jump tables, etc. out of ↵Evan Cheng2008-08-071-14/+23
| | | | | | SelectBasicBlock. No functionality changes. llvm-svn: 54438
* Remove the -disable-correct-folding option, which was ugly and is no longer ↵Owen Anderson2008-08-051-7/+2
| | | | | | needed. llvm-svn: 54361
* Fix several const-correctness issues, resolving some -Wcast-qual warnings.Dan Gohman2008-08-051-11/+11
| | | | llvm-svn: 54349
* This option doesn't need to be a target option. It can be in SDISel instead.Owen Anderson2008-08-051-0/+3
| | | | llvm-svn: 54336
* - Fix SelectionDAG to generate correct CFGs.Owen Anderson2008-08-041-4/+17
| | | | | | | | - Add a basic machine-level dead block eliminator. These two have to go together, since many other parts of the code generator are unable to handle the unreachable blocks otherwise created. llvm-svn: 54333
* Fix SDISel lowering of PHI nodes to use ComputeValueVTs.Dan Gohman2008-08-041-9/+20
| | | | | | | This allows it to work correctly on aggregate values. This fixes PR2623. llvm-svn: 54331
* Fix SDISel lowering of zeroinitializer and undef to use ComputeValueVTs.Dan Gohman2008-08-041-24/+8
| | | | | | | This allows it to work correctly on nested aggregate values. This fixes PR2625. llvm-svn: 54330
* Add a flag to disable jump table generation (allDale Johannesen2008-07-311-2/+3
| | | | | | | | switches use the binary search algorithm) for environments that don't support it. PPC64 JIT is such an environment; turn the flag on for that. llvm-svn: 54248
* Improve dagcombining for sext-loads and sext-in-reg nodes.Dan Gohman2008-07-311-9/+21
| | | | llvm-svn: 54239
* Move SelectionDAG::viewGraph() out of line; as an inline functionDan Gohman2008-07-301-0/+5
| | | | | | it isn't always visible to gdb. llvm-svn: 54228
* Don't look for leaf values to store when lowering stores ofDan Gohman2008-07-301-2/+6
| | | | | | empty structs. This fixes PR2612. llvm-svn: 54226
* Fix broken CellSPU lowering, re-instate braces in LegalizeNate Begeman2008-07-291-4/+2
| | | | llvm-svn: 54168
* Disable a fix in the previous patch, since it breaks CellSPU.Nate Begeman2008-07-291-2/+4
| | | | | | | The CellSPU codegen is broken, but needs to be fixed before we can put this back in. llvm-svn: 54164
* Add vector shifts to the IR, patch by Eli Friedman.Nate Begeman2008-07-292-8/+22
| | | | | | CodeGen & Clang work coming next. llvm-svn: 54161
* Fold the useful features of alist and alist_node into ilist, andDan Gohman2008-07-282-67/+60
| | | | | | | | | | | | | | | | a new ilist_node class, and remove them. Unlike alist_node, ilist_node doesn't attempt to manage storage itself, so it avoids the associated problems, including being opaque in gdb. Adjust the Recycler class so that it doesn't depend on alist_node. Also, change it to use explicit Size and Align parameters, allowing it to work when the largest-sized node doesn't have the greatest alignment requirement. Change MachineInstr's MachineMemOperand list from a pool-backed alist to a std::list for now. llvm-svn: 54146
* Make the ScheduleDAG's GraphRoot edge be blue and dashed too, likeDan Gohman2008-07-271-1/+2
| | | | | | the SelectionDAG's. llvm-svn: 54129
* Rename SDOperand to SDValue.Dan Gohman2008-07-2714-2610/+2604
| | | | llvm-svn: 54128
* Tidy SDNode::use_iterator, and complete the transition to have itDan Gohman2008-07-275-55/+46
| | | | | | | parallel its analogue, Value::value_use_iterator. The operator* method now returns the user, rather than the use. llvm-svn: 54127
* Rename isOnlyUseOf to isOnlyUserOf.Dan Gohman2008-07-271-2/+2
| | | | llvm-svn: 54124
* Some binary operations were being treated asDuncan Sands2008-07-272-21/+30
| | | | | | | unary operations! Add support for softening some additional unary operations like fp_to_sint. llvm-svn: 54122
* When splitting a vector shuffle, fixed which type we used for the hi partMon P Wang2008-07-251-1/+1
| | | | llvm-svn: 54007
* Use AliasAnalysis::pointsToConstantMemory in SDISel to avoid unnecessaryDan Gohman2008-07-251-7/+15
| | | | | | | dependencies with constant load nodes. This allows them to be scheduled freely. llvm-svn: 54001
* Enable first-class aggregates support.Dan Gohman2008-07-231-20/+0
| | | | | | | | | | | | Remove the GetResultInst instruction. It is still accepted in LLVM assembly and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove support for return instructions with multiple values. These are auto-upgraded to use InsertValueInst instructions. The IRBuilder still accepts multiple-value returns, and auto-upgrades them to InsertValueInst instructions. llvm-svn: 53941
* LegalizeTypes support for VSETCC. Fixes PR2575.Duncan Sands2008-07-222-9/+38
| | | | llvm-svn: 53938
* Fix pr2566: incorrect assumption about bit_convert. It doesn't not have to ↵Evan Cheng2008-07-221-1/+2
| | | | | | output a vector value. Patch by Nicolas Capens! llvm-svn: 53932
* Make the GraphRoot edge look like a chain edge, which is more accurate,Dan Gohman2008-07-221-1/+2
| | | | | | | and use the right result number, in the off chance that the graph root has multiple result values. llvm-svn: 53923
* Fix grammaros in comments.Dan Gohman2008-07-211-2/+2
| | | | llvm-svn: 53884
* Enhance the GraphWriter support for edge destinations, and teach theDan Gohman2008-07-211-6/+31
| | | | | | | | SelectionDAG graph writer to make use of them. Now, nodes with multiple values are displayed as such, with incoming edges pointing to the specific value they use. llvm-svn: 53875
* After early-lowering the FORMAL_ARGUMENTS node, delete it.Dan Gohman2008-07-211-0/+7
| | | | llvm-svn: 53874
* Add titles to the various SelectionDAG viewGraph callsDan Gohman2008-07-215-52/+64
| | | | | | | that include useful information like the name of the block being viewed and the current phase of compilation. llvm-svn: 53872
* Add VerifyNode, a place to put sanity checks onDuncan Sands2008-07-213-6/+44
| | | | | | | | | | | | generic SDNode's (nodes with their own constructors should do sanity checking in the constructor). Add sanity checks for BUILD_VECTOR and fix all the places that were producing bogus BUILD_VECTORs, as found by "make check". My favorite is the BUILD_VECTOR with only two operands that was being used to build a vector with four elements! llvm-svn: 53850
* Softfloat support for FDIV. Patch by Duncan Sands2008-07-182-0/+14
| | | | | | Richard Pennington. llvm-svn: 53773
* Eliminate unused variable.Duncan Sands2008-07-181-1/+1
| | | | llvm-svn: 53772
* Revert 53729, after waking up in the middle ofDuncan Sands2008-07-181-4/+3
| | | | | | | | | | | | | | | | the night realising that it was wrong :) I think the reason the same type was being used for the shufflevec of indices as for the actual indices is so that if one of them needs splitting then so does the other. After my patch it might be that the indices need splitting but not the rest, yet there is no good way of handling that. I think the right solution is to not have the shufflevec be an operand at all: just have it be the list of numbers it actually is, stored as extra info in the node. llvm-svn: 53768
OpenPOWER on IntegriCloud