summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Change UpdateNodeOperands' operand and return value from SDValue toDan Gohman2010-06-181-23/+19
| | | | | | SDNode *, since it doesn't care about the ResNo value. llvm-svn: 106282
* Fold the ShrinkDemandedOps pass into the regular DAGCombiner pass,Dan Gohman2010-06-181-0/+8
| | | | | | which is faster, simpler, and less surprising. llvm-svn: 106263
* Handle ext(ext(x)) -> ext(x) immediately, since it's simple.Dan Gohman2010-06-181-1/+2
| | | | llvm-svn: 106256
* Fill in missing support for ISD::FEXP, ISD::FPOWI, and friends.Dan Gohman2010-06-011-2/+7
| | | | llvm-svn: 105283
* fix PR6623: when optimizing for size, don't inline memcpy/memsetsChris Lattner2010-05-311-0/+9
| | | | | | | | | that are too large. This causes the freebsd bootloader to be too large apparently. It's unclear if this should be an -Os or -Oz thing. Thoughts welcome. llvm-svn: 105228
* the 'limit' argument to FindOptimalMemOpLowering is unsigned, not uint64_t.Chris Lattner2010-05-311-6/+3
| | | | llvm-svn: 105226
* SelectionDAG shouldn't have a FunctionLoweringInfo member. RegsForValueDan Gohman2010-05-291-2/+1
| | | | | | | shouldn't have a TargetLoweringInfo member. And FunctionLoweringInfo::set doesn't needs its EnableFastISel argument. llvm-svn: 105101
* Adjust eh.sjlj.setjmp to properly have a chain and to have an opcode entry inJim Grosbach2010-05-261-0/+2
| | | | | | ISD::. No functional change. llvm-svn: 104734
* Improve assertion messages.Dale Johannesen2010-05-151-3/+8
| | | | llvm-svn: 103882
* Implement a bunch more TargetSelectionDAGInfo infrastructure.Dan Gohman2010-05-111-4/+6
| | | | | | | | Move EmitTargetCodeForMemcpy, EmitTargetCodeForMemset, and EmitTargetCodeForMemmove out of TargetLowering and into SelectionDAGInfo to exercise this. llvm-svn: 103481
* Add an assertion to catch attempts to access off the end of the array.Duncan Sands2010-05-101-0/+2
| | | | | | Based on a patch by Javier Martinez. llvm-svn: 103391
* Fix PR 7087, and probably other things, by extendingDale Johannesen2010-05-071-1/+11
| | | | | | | | | getConstantFP to accept the two supported long double target types. This was not the original intent, but there are other places that assume this works and it's easy enough to do. llvm-svn: 103299
* Print debug information for SDNodes.Dan Gohman2010-05-071-0/+16
| | | | llvm-svn: 103227
* EXTRACT_VECTOR_ELT of an INSERT_VECTOR_ELT may have the same index, but theBill Wendling2010-04-301-8/+13
| | | | | | | | indexes could be of a different value type. Or not even using the same SDNode for the constant (weird, I know). Compare the actual values instead of the pointers. llvm-svn: 102791
* Add DBG_VALUE handling for byval parameters; thisDale Johannesen2010-04-261-2/+2
| | | | | | | produces a comment on targets that support it, but the Dwarf writer is not hooked up yet. llvm-svn: 102372
* Add another variant of this test which found a place whereDan Gohman2010-04-211-1/+2
| | | | | | | CodeGen's ComputeMaskedBits was being over-conservative when computing bits for an ADD. llvm-svn: 101963
* Give SelectionDAG a TargetMachine too, rather than having itDan Gohman2010-04-191-6/+2
| | | | | | fetch one from the MachineFunction. llvm-svn: 101807
* Delete now-unnecessary const_casts.Dan Gohman2010-04-171-1/+1
| | | | llvm-svn: 101637
* Use const qualifiers with TargetLowering. This eliminates severalDan Gohman2010-04-171-1/+1
| | | | | | | | | | | | | const_casts, and it reinforces the design of the Target classes being immutable. SelectionDAGISel::IsLegalToFold is now a static member function, because PIC16 uses it in an unconventional way. There is more room for API cleanup here. And PIC16's AsmPrinter no longer uses TargetLowering. llvm-svn: 101635
* Commit this, which should have accompanied 101531.Dan Gohman2010-04-161-1/+2
| | | | llvm-svn: 101532
* Add const qualifiers to CodeGen's use of LLVM IR constructs.Dan Gohman2010-04-151-9/+9
| | | | llvm-svn: 101334
* Remove unnecessary parens.Dan Gohman2010-04-121-2/+2
| | | | llvm-svn: 101010
* Avoid using f64 to lower memcpy from constant string. It's cheaper to use ↵Evan Cheng2010-04-081-8/+12
| | | | | | i32 store of immediates. llvm-svn: 100751
* Three changes:Chris Lattner2010-04-071-0/+23
| | | | | | | | | | | | | | | 1. Introduce some enums and accessors in the InlineAsm class that eliminate a ton of magic numbers when handling inline asm SDNode. 2. Add a new MDNodeSDNode selection dag node type that holds a MDNode (shocking!) 3. Add a new argument to ISD::INLINEASM nodes that hold !srcloc metadata, propagating it to the instruction emitter, which drops it. No functionality change. llvm-svn: 100605
* Remove assert to treat memmove and memset like memcpyMon P Wang2010-04-061-3/+4
| | | | llvm-svn: 100521
* Fix an obvious copy-n-paste bug. It's not known to cause any miscompilation.Evan Cheng2010-04-051-4/+2
| | | | llvm-svn: 100494
* Add a comment.Dan Gohman2010-04-051-0/+6
| | | | llvm-svn: 100459
* lowering a volatile llvm.memcpy to a libc memcpy is ok.Chris Lattner2010-04-051-1/+0
| | | | | | PR6779 llvm-svn: 100457
* remove the now-redundant MMI pointer in SelectionDAG.Chris Lattner2010-04-051-2/+1
| | | | llvm-svn: 100419
* remove some redundant MMI arguments.Chris Lattner2010-04-051-4/+3
| | | | llvm-svn: 100417
* selection dag doesn't need DwarfWriter, remove some tendrils.Chris Lattner2010-04-051-4/+2
| | | | llvm-svn: 100382
* Reapply address space patch after fixing an issue in MemCopyOptimizer.Mon P Wang2010-04-041-23/+29
| | | | | | | Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) llvm-svn: 100304
* stop using DebugLoc::getUnknownLoc()Chris Lattner2010-04-021-8/+4
| | | | llvm-svn: 100215
* Correctly lower memset / memcpy of undef. It should be a nop. PR6767.Evan Cheng2010-04-021-11/+23
| | | | llvm-svn: 100208
* Revert r100191 since it breaks objc in clang Mon P Wang2010-04-021-26/+21
| | | | llvm-svn: 100199
* Reapply address space patch after fixing an issue in MemCopyOptimizer.Mon P Wang2010-04-021-21/+26
| | | | | | | Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) llvm-svn: 100191
* Skip checking preferred alignment of GVs defined in other translation units ↵Evan Cheng2010-04-011-1/+1
| | | | | | all together. llvm-svn: 100133
* - Avoid using floating point stores to implement memset unless the value is ↵Evan Cheng2010-04-011-10/+14
| | | | | | | | zero. - Do not try to infer GV alignment unless its type is sized. It's not possible to infer alignment if it has opaque type. llvm-svn: 100118
* Fix sdisel memcpy, memset, memmove lowering:Evan Cheng2010-04-011-85/+133
| | | | | | | | | | | | | 1. Makes it possible to lower with floating point loads and stores. 2. Avoid unaligned loads / stores unless it's fast. 3. Fix some memcpy lowering logic bug related to when to optimize a load from constant string into a constant. 4. Adjust x86 memcpy lowering threshold to make it more sane. 5. Fix x86 target hook so it uses vector and floating point memory ops more effectively. rdar://7774704 llvm-svn: 100090
* Revert Mon Ping's change 99928, since it broke all the llvm-gcc buildbots.Bob Wilson2010-03-301-27/+22
| | | | llvm-svn: 99948
* Added support for address spaces and added a isVolatile field to memcpy, ↵Mon P Wang2010-03-301-22/+27
| | | | | | | | | memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) A update of langref will occur in a subsequent checkin. llvm-svn: 99928
* Funky indentation.Evan Cheng2010-03-301-5/+5
| | | | llvm-svn: 99901
* Pool allocate SDDbgValue nodes.Evan Cheng2010-03-291-0/+21
| | | | llvm-svn: 99836
* Change how dbg_value sdnodes are converted into machine instructions. Their ↵Evan Cheng2010-03-251-20/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | placement should be determined by the relative order of incoming llvm instructions. The scheduler will now use the SDNode ordering information to determine where to insert them. A dbg_value instruction is inserted after the instruction with the last highest source order and before the instruction with the next highest source order. It will optimize the placement by inserting right after the instruction that produces the value if they have consecutive order numbers. Here is a theoretical example that illustrates why the placement is important. tmp1 = store tmp1 -> x ... tmp2 = add ... ... call ... store tmp2 -> x Now mem2reg comes along: tmp1 = dbg_value (tmp1 -> x) ... tmp2 = add ... ... call ... dbg_value (tmp2 -> x) When the debugger examine the value of x after the add instruction but before the call, it should have the value of tmp1. Furthermore, for dbg_value's that reference constants, they should not be emitted at the beginning of the block (since they do not have "producers"). This patch also cleans up how SDISel manages DbgValue nodes. It allow a SDNode to be referenced by multiple SDDbgValue nodes. When a SDNode is deleted, it uses the information to find the SDDbgValues and invalidate them. They are not deleted until the corresponding SelectionDAG is destroyed. llvm-svn: 99469
* Define placement new wrappers for BumpPtrAllocator andDan Gohman2010-03-181-91/+63
| | | | | | | RecyclingAllocator to allow client code to be simpler, and simplify several clients. llvm-svn: 98847
* SIGN_EXTEND from the same type as the dest is valid.Chris Lattner2010-03-151-1/+1
| | | | llvm-svn: 98548
* sink the call to VT.getSizeInBits() down into its uses,Chris Lattner2010-03-151-7/+5
| | | | | | not all unary nodes necessarily have a simple result type. llvm-svn: 98547
* Rename SDDbgValue.h to SDNodeDbgValue.h for consistency.Evan Cheng2010-03-141-1/+1
| | | | llvm-svn: 98513
* Make default expansion for FP16 <-> FP32 nodes into libcallsAnton Korobeynikov2010-03-141-0/+2
| | | | llvm-svn: 98501
* change the LabelSDNode to be EHLabelSDNode and make it holdChris Lattner2010-03-141-8/+7
| | | | | | | | an MCSymbol. Make the EH_LABEL MachineInstr hold its label with an MCSymbol instead of ID. Fix a bug in MMI.cpp which would return labels named "Label4" instead of "label4". llvm-svn: 98463
OpenPOWER on IntegriCloud