summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix BuildVectorSDNode::isConstantSplat to handle one-element vectors.Bob Wilson2009-03-041-2/+2
| | | | | | | It is an error to call APInt::zext with a size that is equal to the value's current size, so use zextOrTrunc instead. llvm-svn: 66039
* Add a restore folder, which shaves a dozen or so machineinstrs off oggenc. ↵Owen Anderson2009-03-041-6/+75
| | | | | | Update a testcase to check this. llvm-svn: 66029
* Fix PR3666: isel calls to constant addresses.Evan Cheng2009-03-043-4/+9
| | | | llvm-svn: 66024
* PR3686: make the legalizer handle bitcast from i80 to x86 long double.Eli Friedman2009-03-042-0/+8
| | | | llvm-svn: 66021
* Revert r66004 for now; it's causing a variety of test failures.Dan Gohman2009-03-044-295/+127
| | | | llvm-svn: 66008
* Teach the x86 backend to eliminate "test" instructions by using the EFLAGSDan Gohman2009-03-044-127/+295
| | | | | | result from add, sub, inc, and dec instructions in simple cases. llvm-svn: 66004
* Revert unintended commmit.Dale Johannesen2009-03-041-5/+2
| | | | llvm-svn: 66001
* Skip ptr-to-ptr bitcasts when counting in another case.Dale Johannesen2009-03-041-4/+4
| | | | llvm-svn: 66000
* Always skip ptr-to-ptr bitcasts when counting,Dale Johannesen2009-03-042-7/+10
| | | | | | per Chris' suggestion. Slightly faster. llvm-svn: 65999
* Fix PR3701. 1. X86 target renamed eflags register to flags. This matches ↵Evan Cheng2009-03-042-26/+55
| | | | | | what llvm-gcc generates so codegen knows flags register is being clobbered by inline asm. 2. BURR scheduler should also check if inline asm nodes can clobber "live" physical registers. Previously it was only checking target nodes with implicit defs. llvm-svn: 65996
* If a global constant is dead then global's debug info should not prevent the ↵Devang Patel2009-03-041-6/+20
| | | | | | optimizer in deleting the global. And while deleting global, delete global's debug info also. llvm-svn: 65994
* Make my earlier patch to skip debug intrinsicsDale Johannesen2009-03-041-2/+1
| | | | | | when counting work; it was only off by 1. llvm-svn: 65993
* The DAG combiner was performing a BT combine. The BT combine had a value of -1,Bill Wendling2009-03-041-11/+22
| | | | | | | | | | | | so it changed it into a 31 via the TLO.ShrinkDemandedConstant() call. Then it would go through the DAG combiner again. This time it had a value of 31, which was turned into a -1 by TLI.SimplifyDemandedBits(). This would ping pong forever. Teach the TLO.ShrinkDemandedConstant() call not to lower a value if the demanded value is an XOR of all ones. llvm-svn: 65985
* Marking debug info intrinsics as not touching memoryDale Johannesen2009-03-031-0/+3
| | | | | | caused them to be considered trivially dead. Fix this. llvm-svn: 65979
* Instruction counters must skip the bitcasts thatDale Johannesen2009-03-032-1/+11
| | | | | | | feed into llvm.dbg.declare nodes, as well as the debug directives themselves. llvm-svn: 65976
* Recursively remove dead argument while removing llvm.dbg.declare intrinsic.Devang Patel2009-03-031-2/+3
| | | | llvm-svn: 65971
* When removing a store to an alloca that has only oneDale Johannesen2009-03-032-12/+49
| | | | | | | | use, check also for the case where it has two uses, the other being a llvm.dbg.declare. This is needed so debug info doesn't affect codegen. llvm-svn: 65970
* don't #include a header into the middle of an anon namespace.Chris Lattner2009-03-031-7/+5
| | | | llvm-svn: 65967
* Add '(implicit EFLAGS)' for AND, OR, XOR, NEG, INC, and DECDan Gohman2009-03-032-111/+220
| | | | | | instructions. These aren't used yet. llvm-svn: 65965
* Use early exit to reduce indentation. No functional change.Bob Wilson2009-03-031-128/+128
| | | | llvm-svn: 65962
* Remove accidental check-ins in r65960. :-(Bill Wendling2009-03-031-5/+1
| | | | llvm-svn: 65961
* Use > instead of >=. We want to promote aggregates of 128-bytes.Bill Wendling2009-03-032-2/+6
| | | | llvm-svn: 65960
* Reapply r65755, but reversing "<" to ">=".Bill Wendling2009-03-031-2/+3
| | | | llvm-svn: 65945
* Oops.Mikhail Glushenkov2009-03-031-1/+1
| | | | llvm-svn: 65942
* 80-column violation + trailing whitespace.Mikhail Glushenkov2009-03-031-59/+59
| | | | llvm-svn: 65936
* Ignore the debug info intrinsics when adding instructions into alias sets.Zhou Sheng2009-03-031-0/+3
| | | | llvm-svn: 65934
* Fix a bunch of Doxygen syntax issues. Escape special characters,Dan Gohman2009-03-038-19/+19
| | | | | | and put @file directives on their own comment line. llvm-svn: 65920
* Don't count DebugInfo instructions in another limitDale Johannesen2009-03-031-1/+7
| | | | | | (lest they affect codegen). llvm-svn: 65915
* When sinking an insn in InstCombine bring its debugDale Johannesen2009-03-032-2/+26
| | | | | | | | info with it. Don't count debug info insns against the scan maximum in FindAvailableLoadedValue (lest they affect codegen). llvm-svn: 65910
* Ignore debug info intrinsics.Devang Patel2009-03-031-1/+5
| | | | llvm-svn: 65908
* If branch conditions' one successor is dominating another non-latch ↵Devang Patel2009-03-021-0/+15
| | | | | | successor then this loop's iteration space can not be restricted. In this example block bb5 is always executed. llvm-svn: 65902
* Generalize BuildVectorSDNode::isConstantSplat to use APInts and handleBob Wilson2009-03-022-86/+60
| | | | | | | | arbitrary vector sizes. Add an optional MinSplatBits parameter to specify a minimum for the splat element size. Update the PPC target to use the revised interface. llvm-svn: 65899
* Fix the calculation for how big the allocated stub needs to be.Nate Begeman2009-03-021-1/+1
| | | | llvm-svn: 65895
* Remove all dbg symobls, including those with circular references.Devang Patel2009-03-021-3/+15
| | | | | | This is ugly, but I can't figure out a quick way out of this. llvm-svn: 65889
* Fix main executable path name resolution on FreeBSD, patch by Chris Lattner2009-03-021-1/+60
| | | | | | Ed Schouten! llvm-svn: 65882
* Fix PR3694: add an instcombine micro-optimization that helpsDuncan Sands2009-03-021-5/+17
| | | | | | clean up when using variable length arrays in llvm-gcc. llvm-svn: 65832
* Reorganize llvmc code.Mikhail Glushenkov2009-03-027-1/+789
| | | | | | | | | | Move the code from 'llvmc/driver' into a new CompilerDriver library, and change the build system accordingly. Makes it easier for projects using LLVM to build their own llvmc-based drivers. Tested with objdir != srcdir. llvm-svn: 65821
* Fix a problem with DAGCombine on 64b targets where foldingNate Begeman2009-03-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | extracts + build_vector into a shuffle would fail, because the type of the new build_vector would not be legal. Try harder to create a legal build_vector type. Note: this will be totally irrelevant once vector_shuffle no longer takes a build_vector for shuffle mask. New: _foo: xorps %xmm0, %xmm0 xorps %xmm1, %xmm1 subps %xmm1, %xmm1 mulps %xmm0, %xmm1 addps %xmm0, %xmm1 movaps %xmm1, 0 Old: _foo: xorps %xmm0, %xmm0 movss %xmm0, %xmm1 xorps %xmm2, %xmm2 unpcklps %xmm1, %xmm2 pshufd $80, %xmm1, %xmm1 unpcklps %xmm1, %xmm2 pslldq $16, %xmm2 pshufd $57, %xmm2, %xmm1 subps %xmm0, %xmm1 mulps %xmm0, %xmm1 addps %xmm0, %xmm1 movaps %xmm1, 0 llvm-svn: 65791
* Another sentinel optimization. This one should alwaysGabor Greif2009-03-011-7/+0
| | | | | | be a win, since almost every interesting function has at least one Argument. llvm-svn: 65778
* Reuse a technique (pioneered for BasicBlocks) of superposing ilist withGabor Greif2009-03-011-7/+0
| | | | | | | | | | | | its sentinel. This is quite a win when a function really has a basic block. When the function is just a declaration (and stays so) the old way did not allocate a sentinel. So this change is most beneficial when the ratio of function definition to declaration is high. I.e. linkers etc. Incidentally these are the most resource demanding applications, so I expect that the reduced malloc traffic, locality and space savings outweigh the cost of addition of two pointers to Function. llvm-svn: 65776
* Temporarily revert r65755. It was causing failures in the self-hostingBill Wendling2009-03-011-5/+3
| | | | | | | | | | | | | | | | | | | | | testsuite: Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/nancvt.ll Failed with exit(1) at line 2 while running: grep 2147027116 nancvt.ll.tmp | count 3 count: expected 3 lines and got 0. child process exited abnormally FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/vec_ins_extract.ll Failed with exit(1) at line 1 while running: llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/vec_ins_extract.ll | opt -scalarrepl -instcombine | llc -march=x86 -mcpu=yonah | not /usr/bin/grep sub.*esp subl $28, %esp subl $28, %esp child process exited abnormally And more. llvm-svn: 65758
* hoist the check for alloca size up so that it controls CanConvertToScalar Chris Lattner2009-03-011-3/+5
| | | | | | as well as isSafeAllocaToScalarRepl. llvm-svn: 65755
* Minor optimization:Evan Cheng2009-03-011-29/+237
| | | | | | | | | | | Look for situations like this: %reg1024<def> = MOV r1 %reg1025<def> = MOV r0 %reg1026<def> = ADD %reg1024, %reg1025 r0 = MOV %reg1026 Commute the ADD to hopefully eliminate an otherwise unavoidable copy. llvm-svn: 65752
* simplify handling "don't print top level name" processing, so that we getChris Lattner2009-03-011-37/+19
| | | | | | stuff like %A = type { %A*} instead of an upref. llvm-svn: 65748
* Combine PPC's GetConstantBuildVectorBits and isConstantSplat functions to a newBob Wilson2009-03-012-106/+96
| | | | | | method in a BuildVectorSDNode "pseudo-class". llvm-svn: 65747
* Fix a pretty awesome bug that only happened in a strange case with anonymousChris Lattner2009-03-011-8/+11
| | | | | | types. This was reading the uint for the keyword after the token was advanced. llvm-svn: 65743
* walk type symbol table also, so we get:Chris Lattner2009-03-011-2/+10
| | | | | | | | | | | | | type opaque ; type %0 %C = type { %0, %0 } instead of: %C = type { opaque, opaque } when appropriate. llvm-svn: 65742
* Fix a long-standing bug and misfeature of the disassembler: when dealing with a Chris Lattner2009-03-011-12/+122
| | | | | | | | | | | | | | stripped .bc file, it didn't make any attempt to try to reuse anonymous types. This causes an amazing type explosion due to types getting duplicated everywhere they are referenced and other problems. This also caused correctness issues, because opaque types are unique for each time they are uttered in the file. This means that stripping a .bc file could produce a .ll file that could not be assembled (e.g. 2009-02-28-StripOpaqueName.ll). This patch fixes both of these issues. llvm-svn: 65738
* move type name population out of TypePrinting class into a static Chris Lattner2009-02-281-36/+51
| | | | | | AsmWriter.cpp method. llvm-svn: 65736
* switch to densemap for pointer->word map.Chris Lattner2009-02-281-9/+9
| | | | llvm-svn: 65735
OpenPOWER on IntegriCloud