aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* If loop header is also loop exiting block then OrigPN is incoming value for ↵Devang Patel2008-02-141-1/+7
| | | | | | | | | | B loop header. Fixes PR 2030. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47141 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a warning about comparison between signed and unsigned,Dan Gohman2008-02-141-1/+1
| | | | | | | being consistent with the rest of the APInt implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47138 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2029Chris Lattner2008-02-141-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47129 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a miscompilation from Dan's recent apintification.Chris Lattner2008-02-141-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47128 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix single precision FP constants on SPU. They are actually legal,Nate Begeman2008-02-143-20/+9
| | | | | | | which allows us to kill a target-specific node. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47127 91177308-0d34-0410-b5e6-96231b3b80d8
* In TargetLowering::LowerCallTo, don't assert thatDuncan Sands2008-02-1410-36/+60
| | | | | | | | | | | | | | | | | | the return value is zero-extended if it isn't sign-extended. It may also be any-extended. Also, if a floating point value was returned in a larger floating point type, pass 1 as the second operand to FP_ROUND, which tells it that all the precision is in the original type. I think this is right but I could be wrong. Finally, when doing libcalls, set isZExt on a parameter if it is "unsigned". Currently isSExt is set when signed, and nothing is set otherwise. This should be right for all calls to standard library routines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47122 91177308-0d34-0410-b5e6-96231b3b80d8
* Change how FP immediates are handled. Nate Begeman2008-02-1411-44/+49
| | | | | | | | | | | | | | | 1) ConstantFP is now expand by default 2) ConstantFP is not turned into TargetConstantFP during Legalize if it is legal. This allows ConstantFP to be handled like Constant, allowing for targets that can encode FP immediates as MachineOperands. As a bonus, fix up Itanium FP constants, which now correctly match, and match more constants! Hooray. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47121 91177308-0d34-0410-b5e6-96231b3b80d8
* Support a new type of MachineOperand, MO_FPImmediate, used for holdingNate Begeman2008-02-141-0/+10
| | | | | | | FP Immediates, crazily enough git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47117 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify code, no functionality change.Chris Lattner2008-02-141-7/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47116 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some useful operands up into the all-targets .tdNate Begeman2008-02-142-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47115 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2032. Inform the alias analysis of changes to the underlying program.Nick Lewycky2008-02-141-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47111 91177308-0d34-0410-b5e6-96231b3b80d8
* upgrade some entries, remove stuff that is done.Chris Lattner2008-02-142-134/+46
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47109 91177308-0d34-0410-b5e6-96231b3b80d8
* the mid-level optimizer removes this stuff.Chris Lattner2008-02-141-26/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47108 91177308-0d34-0410-b5e6-96231b3b80d8
* this one is easy.Chris Lattner2008-02-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47107 91177308-0d34-0410-b5e6-96231b3b80d8
* This readme entry is done, testcase here: CodeGen/X86/zero-remat.llChris Lattner2008-02-141-14/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47106 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow the APInt form of ComputeMaskedBits to operate on i128 types.Dan Gohman2008-02-131-4/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47101 91177308-0d34-0410-b5e6-96231b3b80d8
* Assigning an APInt to 0 with plain assignment gives it a one-bitDan Gohman2008-02-131-1/+1
| | | | | | | size. Initialize these APInts to properly-sized zero values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47099 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid setting bits that aren't demanded.Dan Gohman2008-02-131-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47098 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify some logic in ComputeMaskedBits. And change ComputeMaskedBitsDan Gohman2008-02-1311-54/+62
| | | | | | | to pass the mask APInt by value, not by reference. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47096 91177308-0d34-0410-b5e6-96231b3b80d8
* A loop latch phi node may have uses inside loop, not just in loop header.Devang Patel2008-02-131-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47093 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename APInt's isPositive to isNonNegative, to reflect what itDan Gohman2008-02-131-6/+6
| | | | | | | actually does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47090 91177308-0d34-0410-b5e6-96231b3b80d8
* While moving exit condition, do not drop loop latch on the floor.Devang Patel2008-02-131-4/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47089 91177308-0d34-0410-b5e6-96231b3b80d8
* Add countTrailingOnes member functions to APInt.Dan Gohman2008-02-131-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47086 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep track of exit value operand number when operands are swapped.Devang Patel2008-02-131-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47082 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable exception handling int JITNicolas Geoffray2008-02-1310-8/+856
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47079 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47075 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the PPC JIT regressions by encoding zeroreg as 0 for BLR.Chris Lattner2008-02-131-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47067 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some dead code.Chris Lattner2008-02-131-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47066 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove use of ltdlDevang Patel2008-02-133-4958/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47065 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo. Thanks to Duncan for noticing.Wojciech Matyjewicz2008-02-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47062 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comments as per review feedback.Wojciech Matyjewicz2008-02-131-5/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47061 91177308-0d34-0410-b5e6-96231b3b80d8
* Some code clean up.Evan Cheng2008-02-131-33/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47060 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify.Evan Cheng2008-02-131-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47058 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47057 91177308-0d34-0410-b5e6-96231b3b80d8
* * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47056 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47054 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47053 91177308-0d34-0410-b5e6-96231b3b80d8
* teach dag combiner how to eliminate MERGE_VALUES nodes.Chris Lattner2008-02-131-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47052 91177308-0d34-0410-b5e6-96231b3b80d8
* readme updatesNate Begeman2008-02-132-0/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47051 91177308-0d34-0410-b5e6-96231b3b80d8
* Support legalizing insert_vector_elt on targets where the elementNate Begeman2008-02-131-27/+40
| | | | | | | | type is not legal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47048 91177308-0d34-0410-b5e6-96231b3b80d8
* 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%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47046 91177308-0d34-0410-b5e6-96231b3b80d8
* Make register scavenging happy by not using a reg (CR0) that isn't definedNate Begeman2008-02-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47045 91177308-0d34-0410-b5e6-96231b3b80d8
* - Added removeValNo() to remove all live ranges of a particular value#.Evan Cheng2008-02-131-7/+61
| | | | | | | - removeRange() can now update value# information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47044 91177308-0d34-0410-b5e6-96231b3b80d8
* commuteInstr() can now commute non-ssa machine instrs.Evan Cheng2008-02-133-0/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47043 91177308-0d34-0410-b5e6-96231b3b80d8
* Added debugging routine dumpUses.Evan Cheng2008-02-131-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47042 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47039 91177308-0d34-0410-b5e6-96231b3b80d8
* __DATA not __DATA__ is the right segment name on darwin.Dale Johannesen2008-02-122-2/+2
| | | | | | | | Spotted by Nick Kledzik. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47037 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some dead codeNate Begeman2008-02-121-7/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47036 91177308-0d34-0410-b5e6-96231b3b80d8
* SSE4.1 64b integer insert/extract pattern supportNate Begeman2008-02-124-41/+73
| | | | | | | Move formats into the formats file git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47035 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47026 91177308-0d34-0410-b5e6-96231b3b80d8