summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* A loop latch phi node may have uses inside loop, not just in loop header.Devang Patel2008-02-131-4/+5
| | | | llvm-svn: 47093
* Rename APInt's isPositive to isNonNegative, to reflect what itDan Gohman2008-02-131-6/+6
| | | | | | actually does. llvm-svn: 47090
* While moving exit condition, do not drop loop latch on the floor.Devang Patel2008-02-131-4/+9
| | | | llvm-svn: 47089
* Add countTrailingOnes member functions to APInt.Dan Gohman2008-02-131-0/+12
| | | | llvm-svn: 47086
* Keep track of exit value operand number when operands are swapped.Devang Patel2008-02-131-1/+6
| | | | llvm-svn: 47082
* Enable exception handling int JITNicolas Geoffray2008-02-1310-8/+856
| | | | llvm-svn: 47079
* Teach LegalizeTypes how to expand and promote CTLZ,Duncan Sands2008-02-133-18/+108
| | | | | | | | | | | | | | | | | | CTTZ and CTPOP. The expansion code differs from that in LegalizeDAG in that it chooses to take the CTLZ/CTTZ count from the Hi/Lo part depending on whether the Hi/Lo value is zero, not on whether CTLZ/CTTZ of Hi/Lo returned 32 (or whatever the width of the type is) for it. I made this change because the optimizers may well know that Hi/Lo is zero and exploit it. The promotion code for CTTZ also differs from that in LegalizeDAG: it uses an "or" to get the right result when the original value is zero, rather than using a compare and select. This also means the value doesn't need to be zero extended. llvm-svn: 47075
* Fix the PPC JIT regressions by encoding zeroreg as 0 for BLR.Chris Lattner2008-02-131-0/+1
| | | | llvm-svn: 47067
* remove some dead code.Chris Lattner2008-02-131-4/+0
| | | | llvm-svn: 47066
* Remove use of ltdlDevang Patel2008-02-133-4958/+17
| | | | llvm-svn: 47065
* Fix typo. Thanks to Duncan for noticing.Wojciech Matyjewicz2008-02-131-1/+1
| | | | llvm-svn: 47062
* Add comments as per review feedback.Wojciech Matyjewicz2008-02-131-5/+13
| | | | llvm-svn: 47061
* Some code clean up.Evan Cheng2008-02-131-33/+34
| | | | llvm-svn: 47060
* Simplify.Evan Cheng2008-02-131-3/+1
| | | | llvm-svn: 47058
* Fix a potential serious problem where kills belonging to the val# defined by ↵Evan Cheng2008-02-131-3/+2
| | | | | | a two-address instruction is also on the val# that defines the input. llvm-svn: 47057
* * Cannot safely commute an instruction there are other defs which can reach ↵Evan Cheng2008-02-131-1/+5
| | | | | | | | its uses. * Ignore copy instructions which have already been coalesced. llvm-svn: 47056
* In SDISel, for targets that support FORMAL_ARGUMENTS nodes, lower thisChris Lattner2008-02-131-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | node as soon as we create it in SDISel. Previously we would lower it in legalize. The problem with this is that it only exposes the argument loads implied by FORMAL_ARGUMENTs after legalize, so that only dag combine 2 can hack on them. This causes us to miss some optimizations because datatype expansion also happens here. Exposing the loads early allows us to do optimizations on them. For example we now compile arg-cast.ll to: _foo: movl $2147483647, %eax andl 8(%esp), %eax ret where we previously produced: _foo: subl $12, %esp movsd 16(%esp), %xmm0 movsd %xmm0, (%esp) movl $2147483647, %eax andl 4(%esp), %eax addl $12, %esp ret It might also make sense to do this for ISD::CALL nodes, which have implicit stores on many targets. llvm-svn: 47054
* don't try to avoid inserting loads when lowering FORMAL_ARGUMENTS. Chris Lattner2008-02-133-39/+17
| | | | | | DAGCombine is now quite good at zapifying them. llvm-svn: 47053
* teach dag combiner how to eliminate MERGE_VALUES nodes.Chris Lattner2008-02-131-0/+14
| | | | llvm-svn: 47052
* readme updatesNate Begeman2008-02-132-0/+20
| | | | llvm-svn: 47051
* Support legalizing insert_vector_elt on targets where the elementNate Begeman2008-02-131-27/+40
| | | | | | type is not legal. llvm-svn: 47048
* Initial support for copy elimination by commuting its definition MI.Evan Cheng2008-02-132-17/+243
| | | | | | | | | | | | | | | | | | | | | PR1877. A3 = op A2 B0<kill> ... B1 = A3 <- this copy ... = op A3 <- more uses ==> B2 = op B0 A2<kill> ... B1 = B2 <- now an identify copy ... = op B2 <- more uses This speeds up FreeBench/neural by 29%, Olden/bh by 12%, oopack_v1p8 by 53%. llvm-svn: 47046
* Make register scavenging happy by not using a reg (CR0) that isn't definedNate Begeman2008-02-131-1/+1
| | | | llvm-svn: 47045
* - Added removeValNo() to remove all live ranges of a particular value#.Evan Cheng2008-02-131-7/+61
| | | | | | - removeRange() can now update value# information. llvm-svn: 47044
* commuteInstr() can now commute non-ssa machine instrs.Evan Cheng2008-02-133-0/+28
| | | | llvm-svn: 47043
* Added debugging routine dumpUses.Evan Cheng2008-02-131-0/+8
| | | | llvm-svn: 47042
* Convert SelectionDAG::ComputeMaskedBits to use APInt instead of uint64_t.Dan Gohman2008-02-1311-129/+157
| | | | | | | Add an overload that supports the uint64_t interface for use by clients that haven't been updated yet. llvm-svn: 47039
* __DATA not __DATA__ is the right segment name on darwin.Dale Johannesen2008-02-122-2/+2
| | | | | | Spotted by Nick Kledzik. llvm-svn: 47037
* Remove some dead codeNate Begeman2008-02-121-7/+3
| | | | llvm-svn: 47036
* SSE4.1 64b integer insert/extract pattern supportNate Begeman2008-02-124-41/+73
| | | | | | Move formats into the formats file llvm-svn: 47035
* Re-apply the patch to improve the optimizations of memcpy's, with severalOwen Anderson2008-02-122-2/+120
| | | | | | bugs fixed. This now passes PPC bootstrap. llvm-svn: 47026
* Generalize getCopyFromParts and getCopyToParts toDuncan Sands2008-02-121-113/+215
| | | | | | | | | | | | handle arbitrary precision integers and any number of parts. For example, on a 32 bit machine an i50 corresponds to two i32 parts. getCopyToParts will extend the i50 to an i64 then write half of the i64 to each part; getCopyFromParts will combine the two i32 parts into an i64 then truncate the result to i50. llvm-svn: 47024
* Revert r46916 PPCTargetAsmInfo.cpp.Evan Cheng2008-02-121-2/+2
| | | | llvm-svn: 47020
* Only using x86-64 rip relative addressing in non-staic mode?Evan Cheng2008-02-121-4/+8
| | | | llvm-svn: 47019
* Fix PR2002. Suppose n is the initial value for the induction Wojciech Matyjewicz2008-02-121-6/+4
| | | | | | | | | | variable (with step 1) and m is its final value. Then, the correct trip count is SMAX(m,n)-n. Previously, we used SMAX(0,m-n), but m-n may overflow and can't in general be interpreted as signed. Patch by Nick Lewycky. llvm-svn: 47007
* Fix for bug 1996: optimize out loads of undef. This code basically just Eli Friedman2008-02-121-1/+28
| | | | | | checks for a malloc/alloca immediately followed by a load. llvm-svn: 47006
* Update comment.Evan Cheng2008-02-121-2/+2
| | | | llvm-svn: 47002
* Unbreak various insert_vector_elt and extract_vector_elt tests in presence ↵Evan Cheng2008-02-121-4/+4
| | | | | | of SSE4. llvm-svn: 47001
* Stuff noticed while grepping codeNate Begeman2008-02-111-65/+7
| | | | llvm-svn: 46979
* Generalize the handling of call and return arguments,Duncan Sands2008-02-111-136/+85
| | | | | | | in preparation for apint support. These changes are intended to have no functional effect. llvm-svn: 46967
* From Chris' review: use isa instead of explicitly using classof.Dan Gohman2008-02-111-1/+1
| | | | llvm-svn: 46964
* From Chris' review: minor corrections in comments.Dan Gohman2008-02-111-2/+3
| | | | llvm-svn: 46963
* From Chris' review: use cast instead of dyn_cast with an assert.Dan Gohman2008-02-111-8/+4
| | | | llvm-svn: 46962
* From Chris' review: fix 80 column violationsDan Gohman2008-02-111-5/+10
| | | | llvm-svn: 46961
* If the LHS of the comparison is a loop-invariant we also want to move it Wojciech Matyjewicz2008-02-111-2/+2
| | | | | | | | to the RHS. This simple change allows to compute loop iteration count for loops with condition similar to the one in the testcase (which seems to be quite common). llvm-svn: 46959
* Added "Profile" method to APFloat for use with FoldingSet.Ted Kremenek2008-02-113-14/+9
| | | | | | | | | | Added member template "Add" to FoldingSetNodeID that allows "adding" arbitrary objects to a profile via dispatch to FoldingSetTrait<T>::Profile(). Removed FoldingSetNodeID::AddAPFloat and FoldingSetNodeID::APInt, as their functionality is now replaced using the above mentioned member template. llvm-svn: 46957
* Fix PR1798 - an error in the evaluation of SCEVAddRecExpr at an Wojciech Matyjewicz2008-02-111-49/+100
| | | | | | | | | | | | | | | | | | | | | | | | | arbitrary iteration. The patch: 1) changes SCEVSDivExpr into SCEVUDivExpr, 2) replaces PartialFact() function with BinomialCoefficient(); the computations (essentially, the division) in BinomialCoefficient() are performed with the apprioprate bitwidth necessary to avoid overflow; unsigned division is used instead of the signed one. Computations in BinomialCoefficient() require support from the code generator for APInts. Currently, we use a hack rounding up the neccessary bitwidth to the nearest power of 2. The hack is easy to turn off in future. One remaining issue: we assume the divisor of the binomial coefficient formula can be computed accurately using 16 bits. It means we can handle AddRecs of length up to 9. In future, we should use APInts to evaluate the divisor. Thanks to Nicholas for cooperation! llvm-svn: 46955
* Add a isBigEndian method to complement isLittleEndian.Duncan Sands2008-02-113-11/+11
| | | | llvm-svn: 46954
* Determine whether a spill kills the register it's spilling before insertion ↵Evan Cheng2008-02-111-8/+3
| | | | | | rather than trying to undo the kill marker afterwards. llvm-svn: 46953
* Enable SSE4 codegen and pattern matching.Nate Begeman2008-02-115-25/+242
| | | | | | Add some notes to the README. llvm-svn: 46949
OpenPOWER on IntegriCloud