summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
Commit message (Collapse)AuthorAgeFilesLines
* Avoid adding PHI arguments for a predecessor that has gone away when a ↵Jakob Stoklund Olesen2010-01-111-14/+19
| | | | | | | | BRCOND was constant folded. This fixes PR5980. llvm-svn: 93184
* Disable transformation of select of two loads to a select of address and ↵Mon P Wang2010-01-111-28/+41
| | | | | | | | then a load if the loads are not in the default address space because the transformation discards src value info. llvm-svn: 93180
* Revert an earlier change to SIGN_EXTEND_INREG for vectors. The VTSDNodeDan Gohman2010-01-097-67/+107
| | | | | | | | | | really does need to be a vector type, because TargetLowering::getOperationAction for SIGN_EXTEND_INREG uses that type, and it needs to be able to distinguish between vectors and scalars. Also, fix some more issues with legalization of vector casts. llvm-svn: 93043
* Dan pointed out checking whether a node is dead by comparing its opcode to ↵Evan Cheng2010-01-091-8/+26
| | | | | | ISD::DELETED_NODE is not safe. Use a DAGUpdateListener to remove dead nodes from work list instead. llvm-svn: 93031
* ReplaceAllUsesOfValueWith may delete other nodes that the one being ↵Evan Cheng2010-01-081-1/+2
| | | | | | replaced. Do not delete dead nodes again. llvm-svn: 92988
* Fix rdar://7517201, a regression introduced by r92849.Chris Lattner2010-01-071-1/+1
| | | | | | | | | | When folding a and(any_ext(load)) both the any_ext and the load have to have only a single use. This removes the anyext-uses.ll testcase which started failing because it is unreduced and unclear what it is testing. llvm-svn: 92950
* factor this code better and reduce nesting at the sameChris Lattner2010-01-071-61/+41
| | | | | | time, no functionality change. llvm-svn: 92948
* APInt'fy TargetLowering::SimplifySetCC to fix PR5963.Evan Cheng2010-01-071-15/+15
| | | | llvm-svn: 92943
* Use pop_back_val instead of back()+pop_back.Benjamin Kramer2010-01-071-7/+4
| | | | llvm-svn: 92918
* Comment.Evan Cheng2010-01-061-0/+3
| | | | llvm-svn: 92850
* Teach dag combine to fold the following transformation more aggressively:Evan Cheng2010-01-064-65/+210
| | | | | | | | | | (OP (trunc x), (trunc y)) -> (trunc (OP x, y)) Unfortunately this simple change causes dag combine to infinite looping. The problem is the shrink demanded ops optimization tend to canonicalize expressions in the opposite manner. That is badness. This patch disable those optimizations in dag combine but instead it is done as a late pass in sdisel. This also exposes some deficiencies in dag combine and x86 setcc / brcond lowering. Teach them to look pass ISD::TRUNCATE in various places. llvm-svn: 92849
* The previous code could potentially cause a cycle. Allow ordering w.r.t. a 0 ↵Bill Wendling2010-01-061-2/+2
| | | | | | order. llvm-svn: 92810
* Only check the ordering if there is an ordering for each nodes.Bill Wendling2010-01-061-2/+2
| | | | llvm-svn: 92807
* Add a semi-primitive form of scheduling via the "SDNode ordering" to theBill Wendling2010-01-051-0/+12
| | | | | | bottom-up scheduler. We prefer the lower order number. llvm-svn: 92806
* Don't assign the shift the same type as the variable being shifted. This couldBill Wendling2010-01-051-1/+3
| | | | | | result in illegal types for the SHL operator. llvm-svn: 92797
* Don't use the ISD::NodeType enum for SDNode opcodes, as CodeGenDan Gohman2010-01-051-12/+12
| | | | | | | uses several kinds of opcode values which are not declared within that enum. This fixes PR5946. llvm-svn: 92794
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-053-7/+6
| | | | | | dereference the type pointer. llvm-svn: 92726
* Delete renaming use of dead dbg intrinsics.Devang Patel2010-01-052-12/+0
| | | | | | | | | Intrinsic::dbg_stoppoint Intrinsic::dbg_region_start Intrinsic::dbg_region_end Intrinsic::dbg_func_start llvm-svn: 92672
* Change errs() to dbgs().David Greene2010-01-051-19/+19
| | | | llvm-svn: 92597
* Change errs() to dbgs().David Greene2010-01-051-4/+4
| | | | llvm-svn: 92581
* Change errs() to dbgs().David Greene2010-01-051-8/+8
| | | | llvm-svn: 92580
* Change errs() to dbgs().David Greene2010-01-051-21/+21
| | | | llvm-svn: 92579
* Change errs() to dbgs().David Greene2010-01-051-21/+21
| | | | llvm-svn: 92578
* Change errs() to dbgs().David Greene2010-01-051-10/+10
| | | | llvm-svn: 92577
* Change errs() to dbgs().David Greene2010-01-051-14/+14
| | | | llvm-svn: 92576
* Change errs() to dbgs().David Greene2010-01-051-3/+4
| | | | llvm-svn: 92575
* Change errs() to dbgs().David Greene2010-01-051-6/+7
| | | | llvm-svn: 92574
* Change errs() to dbgs().David Greene2010-01-051-14/+14
| | | | llvm-svn: 92573
* Change errs() to dbgs().David Greene2010-01-051-1/+1
| | | | llvm-svn: 92572
* Change errs() to dbgs().David Greene2010-01-051-6/+6
| | | | llvm-svn: 92571
* Change errs() to dbgs().David Greene2010-01-051-24/+24
| | | | llvm-svn: 92570
* Change errs() to dbgs().David Greene2010-01-051-10/+11
| | | | llvm-svn: 92569
* Change errs() to dbgs().David Greene2010-01-051-12/+12
| | | | llvm-svn: 92568
* Change SelectCode's argument from SDValue to SDNode *, to make it moreDan Gohman2010-01-051-13/+13
| | | | | | | | | clear what information these functions are actually using. This is also a micro-optimization, as passing a SDNode * around is simpler than passing a { SDNode *, int } by value or reference. llvm-svn: 92564
* Use a pointer type rather than MVT::Other for the ExternalSymbol node usedDan Gohman2010-01-041-1/+2
| | | | | | in an inline asm. llvm-svn: 92512
* Teach codegen to handle:Chris Lattner2010-01-021-0/+12
| | | | | | | | | | | (X != null) | (Y != null) --> (X|Y) != 0 (X == null) & (Y == null) --> (X|Y) == 0 so that instcombine can stop doing this for pointers. This is part of PR3351, which is a case where instcombine doing this for pointers (inserting ptrtoint) is pessimizing code. llvm-svn: 92406
* whitespace cleanupChris Lattner2010-01-011-6/+6
| | | | llvm-svn: 92404
* Fix a warning on gcc 4.4.Mikhail Glushenkov2010-01-011-1/+2
| | | | | | | SelectionDAGBuilder.cpp:4294: warning: suggest explicit braces to avoid ambiguous ‘else’ llvm-svn: 92395
* Trailing whitespace, 80-col violations.Mikhail Glushenkov2010-01-011-77/+82
| | | | llvm-svn: 92394
* Teach codegen to lower llvm.powi to an efficient (but not optimal) Chris Lattner2010-01-011-5/+57
| | | | | | | | | | multiply sequence when the power is a constant integer. Before, our codegen for std::pow(.., int) always turned into a libcall, which was really inefficient. This should also make many gfortran programs happier I'd imagine. llvm-svn: 92388
* remove a bunch of unneeded functions.Chris Lattner2009-12-292-2/+2
| | | | llvm-svn: 92263
* Final step in the metadata API restructuring: move the Chris Lattner2009-12-291-4/+2
| | | | | | | | getMDKindID/getMDKindNames methods to LLVMContext (and add convenience methods to Module), eliminating MetadataContext. Move the state that it maintains out to LLVMContext. llvm-svn: 92259
* This is a major cleanup of the instruction metadata interfaces thatChris Lattner2009-12-283-21/+10
| | | | | | | | | | | | | | | | | | | | | | I asked Devang to do back on Sep 27. Instead of going through the MetadataContext class with methods like getMD() and getMDs(), just ask the instruction directly for its metadata with getMetadata() and getAllMetadata(). This includes a variety of other fixes and improvements: previously all Value*'s were bloated because the HasMetadata bit was thrown into value, adding a 9th bit to a byte. Now this is properly sunk down to the Instruction class (the only place where it makes sense) and it will be folded away somewhere soon. This also fixes some confusion in getMDs and its clients about whether the returned list is indexed by the MDID or densely packed. This is now returned sorted and densely packed and the comments make this clear. This introduces a number of fixme's which I'll follow up on. llvm-svn: 92235
* rename getMDKind -> getMDKindID, make it autoinsert if an MD KindChris Lattner2009-12-283-34/+30
| | | | | | | doesn't exist already, eliminate registerMDKind. Tidy up a bunch of random stuff. llvm-svn: 92225
* Allow targets to specify the return type of libcalls that are generated for ↵Sanjiv Gupta2009-12-282-1/+6
| | | | | | floating point comparisons, rather than hard-coding them as i32. llvm-svn: 92199
* Remove dead store.Bill Wendling2009-12-281-2/+2
| | | | llvm-svn: 92190
* Remove dead variable.Bill Wendling2009-12-281-2/+0
| | | | llvm-svn: 92189
* Remove dead variable.Bill Wendling2009-12-281-1/+0
| | | | llvm-svn: 92188
* Remove dead variable.Bill Wendling2009-12-281-3/+0
| | | | llvm-svn: 92180
* Remove dead variable.Bill Wendling2009-12-281-1/+0
| | | | llvm-svn: 92178
OpenPOWER on IntegriCloud