aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Use strcpy instead of sprintf here. This avoids a GCC 4.3 format-stringDan Gohman2008-08-051-1/+1
| | | | | | | | warning. There wasn't actually a problem here, because the contents of the string are known. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54385 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass the computed iteration count value to RewriteLoopExitValuesDan Gohman2008-08-051-4/+4
| | | | | | | instead of having it call getIterationCount again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54380 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix breakage on ARM/2008-04-10-ScavengerAssert.ll.Owen Anderson2008-08-051-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54378 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2620: Fix X86cmppd selection code so it expects operands to be v2f64.Evan Cheng2008-08-052-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54376 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2596: out of bound reference.Evan Cheng2008-08-051-3/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54375 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly handle replacement and removal of PHIs with one incoming register.Owen Anderson2008-08-051-1/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54374 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r53282. This was causing a miscompile on Linux. Also, the transformationBill Wendling2008-08-051-16/+0
| | | | | | | looks bogus. Please see PR2629 for details on why this is breaking things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54372 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops, we were already checking for dead phis. Handle this the proper way, then.Owen Anderson2008-08-051-22/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54371 91177308-0d34-0410-b5e6-96231b3b80d8
* We don't need to update live intervals for dead PHIs.Owen Anderson2008-08-051-29/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54369 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the -disable-correct-folding option, which was ugly and is no longer ↵Owen Anderson2008-08-051-7/+2
| | | | | | needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54361 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the AsmWriter to not print extra spaces after parameter attributes.Dan Gohman2008-08-053-5/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54351 91177308-0d34-0410-b5e6-96231b3b80d8
* Trim #includes.Dan Gohman2008-08-055-6/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54350 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix several const-correctness issues, resolving some -Wcast-qual warnings.Dan Gohman2008-08-054-16/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54349 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove #if 0.Evan Cheng2008-08-051-5/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54347 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2568: Fix bug that cause redudant kill marker after its live interval ↵Evan Cheng2008-08-051-1/+3
| | | | | | has been extended due to coalescing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54346 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded iteration. Thanks to Dan for the feedback.Owen Anderson2008-08-051-16/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54337 91177308-0d34-0410-b5e6-96231b3b80d8
* This option doesn't need to be a target option. It can be in SDISel instead.Owen Anderson2008-08-052-6/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54336 91177308-0d34-0410-b5e6-96231b3b80d8
* - Fix SelectionDAG to generate correct CFGs.Owen Anderson2008-08-044-7/+117
| | | | | | | | | - 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54333 91177308-0d34-0410-b5e6-96231b3b80d8
* PR2621: Improvements to the SCEV AddRec binomial expansion. This Eli Friedman2008-08-041-84/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | version uses a new algorithm for evaluating the binomial coefficients which is significantly more efficient for AddRecs of more than 2 terms (see the comments in the code for details on how the algorithm works). It also fixes some bugs: it removes the arbitrary length restriction for AddRecs, it fixes the silent generation of incorrect code for AddRecs which require a wide calculation width, and it fixes an issue where we were incorrectly truncating the iteration count too far when evaluating an AddRec expression narrower than the induction variable. There are still a few related issues I know of: I think there's still an issue with the SCEVExpander expansion of AddRec in terms of the width of the induction variable used. The hack to avoid generating too-wide integers shouldn't be necessary; instead, the callers should be considering the cost of the expansion before expanding it (in addition to not expanding too-wide integers, we might not want to expand expressions that are really expensive, especially when optimizing for size; calculating an length-17 32-bit AddRec currently generates about 250 instructions of straight-line code on X86). Also, for long 32-bit AddRecs on X86, CodeGen really sucks at scheduling the code. I'm planning on filing follow-up PRs for these issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54332 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54331 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54330 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an assert to catch invalid VECTOR_SHUFFLE mask indices.Dan Gohman2008-08-041-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54329 91177308-0d34-0410-b5e6-96231b3b80d8
* Mips ISelLowering cleanup : Removed old LowerCALL and FORMAL_ARGS helpers, theyBruno Cardoso Lopes2008-08-042-40/+9
| | | | | | | | aren't used anyway, they also used to broke compiling when fastcc was specified for a function, but not anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54316 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle i32->f32 bitconvert results.Bruno Cardoso Lopes2008-08-042-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54315 91177308-0d34-0410-b5e6-96231b3b80d8
* Add atomic sub for other sizesAndrew Lenharth2008-08-031-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54314 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit saveri with the correct operand order, patch by Richard Pennington!Chris Lattner2008-08-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54313 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2615Bruno Cardoso Lopes2008-08-031-1/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54312 91177308-0d34-0410-b5e6-96231b3b80d8
* Improved asm inline for hi,lo resultsBruno Cardoso Lopes2008-08-025-23/+77
| | | | | | | | | Added hi,lo registers to be used,def implicitly. This provides better handle of instructions which use hi/lo. Fixes a small BranchAnalysis bug git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54274 91177308-0d34-0410-b5e6-96231b3b80d8
* Apply the same pattern used in 'and' lowering for 'or'Bruno Cardoso Lopes2008-08-022-8/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54273 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment typos.Duncan Sands2008-08-012-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54266 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand fcopysignBruno Cardoso Lopes2008-07-311-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54250 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle more SELECT corner cases considering legalize types, probabily wont ↵Bruno Cardoso Lopes2008-07-312-31/+48
| | | | | | | | | | work with the default legalizer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54249 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a flag to disable jump table generation (allDale Johannesen2008-07-314-3/+14
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54248 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve dagcombining for sext-loads and sext-in-reg nodes.Dan Gohman2008-07-311-9/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54239 91177308-0d34-0410-b5e6-96231b3b80d8
* Added pattern for floating point zero immediate (avoiding a constant poolBruno Cardoso Lopes2008-07-302-3/+16
| | | | | | | | | access). Added pattern to match bitconvert node. Fixed MTC1 asm string bug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54229 91177308-0d34-0410-b5e6-96231b3b80d8
* Move SelectionDAG::viewGraph() out of line; as an inline functionDan Gohman2008-07-301-0/+5
| | | | | | | it isn't always visible to gdb. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54228 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't look for leaf values to store when lowering stores ofDan Gohman2008-07-301-2/+6
| | | | | | | empty structs. This fixes PR2612. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54226 91177308-0d34-0410-b5e6-96231b3b80d8
* Use existing LiveInterval methods to simplify live interval merging. Thanks ↵Owen Anderson2008-07-301-31/+32
| | | | | | to Evan for pointing these out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54225 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r54147 with a constraint to only use the 8-bitDan Gohman2008-07-302-25/+61
| | | | | | | | | | | | subreg form on x86-64, to avoid the problem with x86-32 having GPRs that don't have 8-bit subregs. Also, change several 16-bit instructions to use equivalent 32-bit instructions. These have a smaller encoding and avoid partial-register updates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54223 91177308-0d34-0410-b5e6-96231b3b80d8
* Value numbers whose def index is a special sentinel value should not be ↵Owen Anderson2008-07-301-11/+13
| | | | | | remapped. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54218 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed bug in global address lowering for functions and in Brcond loweringBruno Cardoso Lopes2008-07-301-6/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54215 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed small section flag for mips, the assembler doesnt support this flagBruno Cardoso Lopes2008-07-302-4/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54214 91177308-0d34-0410-b5e6-96231b3b80d8
* Added new features to represent specific instructions groupsBruno Cardoso Lopes2008-07-303-8/+45
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54213 91177308-0d34-0410-b5e6-96231b3b80d8
* Instruction definition cleanupBruno Cardoso Lopes2008-07-301-63/+43
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54212 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for overloading intrinsics (atomics) based on pointersMon P Wang2008-07-303-15/+52
| | | | | | | | to different address spaces. This alters the naming scheme for those intrinsics, e.g., atomic.load.add.i32 => atomic.load.add.i32.p0i32 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54195 91177308-0d34-0410-b5e6-96231b3b80d8
* Another SCEV issue from PR2607; essentially the same issue, but this Eli Friedman2008-07-301-4/+4
| | | | | | | | | | | | | time applying to the implicit comparison in smin expressions. The correct way to transform an inequality into the opposite inequality, either signed or unsigned, is with a not expression. I looked through the SCEV code, and I don't think there are any more occurrences of this issue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54194 91177308-0d34-0410-b5e6-96231b3b80d8
* More fixes for corner cases when remapping live range indices.Owen Anderson2008-07-301-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54186 91177308-0d34-0410-b5e6-96231b3b80d8
* When merging live intervals, we also need to merge in any live ranges that ↵Owen Anderson2008-07-301-13/+42
| | | | | | | | | are inputs to two-address instructions that themselves define a range we already care about. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54185 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR2607: SCEV miscomputing the loop count for loops with an Eli Friedman2008-07-301-3/+7
| | | | | | | | | | | | | | SGT exit condition. Essentially, the correct way to flip an inequality in 2's complement is the not operator, not the negation operator. That said, the difference only affects cases involving INT_MIN. Also, enhance the pre-test search logic to be a bit smarter about inequalities flipped with a not operator, so it can eliminate the smax from the iteration count for simple loops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54184 91177308-0d34-0410-b5e6-96231b3b80d8
* When merging a PHI operand's live interval into the PHI's live interval, we ↵Owen Anderson2008-07-291-9/+17
| | | | | | | | | need to merge over all liveranges in the operand's interval that share the relevant value number, not just the range that immediately precedes the PHI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54174 91177308-0d34-0410-b5e6-96231b3b80d8