aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix comment. INLINEASM node operand #3 is IsAlignStack bit.Evan Cheng2011-01-071-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123036 91177308-0d34-0410-b5e6-96231b3b80d8
* Lower some BUILD_VECTORS using VEXT+shuffle.Bob Wilson2011-01-073-2/+196
| | | | | | Patch by Tim Northover. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123035 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Match min/max hidden by sext/zextTobias Grosser2011-01-072-35/+152
| | | | | | | | | | | | | | | X = sext x; x >s c ? X : C+1 --> X = sext x; X <s C+1 ? C+1 : X X = sext x; x <s c ? X : C-1 --> X = sext x; X >s C-1 ? C-1 : X X = zext x; x >u c ? X : C+1 --> X = zext x; X <u C+1 ? C+1 : X X = zext x; x <u c ? X : C-1 --> X = zext x; X >u C-1 ? C-1 : X X = sext x; x >u c ? X : C+1 --> X = sext x; X <u C+1 ? C+1 : X X = sext x; x <u c ? X : C-1 --> X = sext x; X >u C-1 ? C-1 : X Instead of calculating this with mixed types promote all to the larger type. This enables scalar evolution to analyze this expression. PR8866 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123034 91177308-0d34-0410-b5e6-96231b3b80d8
* Some whitespace fixesTobias Grosser2011-01-071-24/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123033 91177308-0d34-0410-b5e6-96231b3b80d8
* Appropriately truncate debug info range in dwarf output.Devang Patel2011-01-075-24/+63
| | | | | | | Enable live debug variables pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123032 91177308-0d34-0410-b5e6-96231b3b80d8
* DBG_VALUE does not have any side effects; it also makes no sense to mark it ↵Evan Cheng2011-01-074-4/+9
| | | | | | cheap as a copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123031 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 122959, it needs more thought. Add it back to README.txt with ↵Benjamin Kramer2011-01-073-31/+22
| | | | | | additional notes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123030 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use -O3 on Mingw, as people report it as unreliable. Use -O2Oscar Fuentes2011-01-072-0/+16
| | | | | | instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123028 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the allocation and freeing of Users' operand lists, now thatJay Foad2011-01-075-69/+4
| | | | | | every BranchInst has a fixed number of operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123027 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the "ugly" method BranchInst::setUnconditionalDest().Jay Foad2011-01-072-30/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123026 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove all uses of the "ugly" method BranchInst::setUnconditionalDest().Jay Foad2011-01-072-6/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123025 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r122955. It seems using movups to lower memcpy can cause massive ↵Evan Cheng2011-01-0711-79/+101
| | | | | | regression (even on Nehalem) in edge cases. I also didn't see any real performance benefit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123015 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename lisp-like functions as suggested by Gabor Greif as loooong timeDavid Greene2011-01-0710-41/+41
| | | | | | | ago. This is both easier to learn and easier to read. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123001 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to unbreak the arm buildbot.Benjamin Kramer2011-01-071-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122999 91177308-0d34-0410-b5e6-96231b3b80d8
* Add testcases for PR8411 (vget_low and vget_high implemented as shuffles).Bob Wilson2011-01-071-1/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122997 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ARM patterns to match EXTRACT_SUBVECTOR nodes.Bob Wilson2011-01-076-4/+30
| | | | | | | | | | | | | | | Also fix an off-by-one in SelectionDAGBuilder that was preventing shuffle vectors from being translated to EXTRACT_SUBVECTOR. Patch by Tim Northover. The test changes are needed to keep those spill-q tests from testing aligned spills and restores. If the only aligned stack objects are spill slots, we no longer realign the stack frame. Prior to this patch, an EXTRACT_SUBVECTOR was legalized by loading from the stack, which created an aligned frame index. Now, however, there is nothing except the spill slot in the stack frame, so I added an aligned alloca. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122995 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a comment typo.Bob Wilson2011-01-071-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122994 91177308-0d34-0410-b5e6-96231b3b80d8
* Change EXTRACT_SUBVECTOR to require a constant index.Bob Wilson2011-01-072-34/+18
| | | | | | | | We were never generating any of these nodes with variable indices, and there was one legalizer function asserting on a non-constant index. If we ever have a need to support variable indices, we can add this back again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122993 91177308-0d34-0410-b5e6-96231b3b80d8
* Early exit if we don't have invokes. The 'Unwinds' vector isn't modified unlessBill Wendling2011-01-071-219/+219
| | | | | | | we have invokes, so there is no functionality change here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122990 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the other problem reported in PR8582. Testcase and patch byDuncan Sands2011-01-062-0/+24
| | | | | | | Nadav Rotem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122983 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a testcase for PR8582, which mysteriously fixed itself, in case the problemDuncan Sands2011-01-061-0/+15
| | | | | | | comes back some day. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122982 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some fairly duplicated code to let type legalization split illegalEric Christopher2011-01-063-0/+141
| | | | | | | typed atomics. This will lower exclusively to libcalls at the moment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122979 91177308-0d34-0410-b5e6-96231b3b80d8
* With Benjamin's recent amazing patches, we should be able to do even better ↵Chris Lattner2011-01-061-0/+13
| | | | | | things :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122978 91177308-0d34-0410-b5e6-96231b3b80d8
* use isNullValue() to simplify code, add an assert.Chris Lattner2011-01-061-5/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122977 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit 128 bit constant.Devang Patel2011-01-062-10/+38
| | | | | | | This fixes PR 8913 crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122971 91177308-0d34-0410-b5e6-96231b3b80d8
* PR8921: LDM/POP do not support interworking prior to v5t.Bob Wilson2011-01-069-19/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122970 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extra whitespace.Bob Wilson2011-01-061-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122969 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment typo.Bob Wilson2011-01-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122968 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a note from llvmdev, this time with more info.Benjamin Kramer2011-01-061-0/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122966 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed parsing of hex floats.Abramo Bagnara2011-01-061-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122963 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly disassemble truncated asm.Rafael Espindola2011-01-063-3/+9
| | | | | | Patch by Richard Simth. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122962 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Turn _chk functions into the "unsafe" variant if length and max ↵Benjamin Kramer2011-01-062-0/+13
| | | | | | | | | langth are equal. This happens when we take the (non-constant) length from a malloc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122961 91177308-0d34-0410-b5e6-96231b3b80d8
* EarlyCSE does this now (and GVN always did it).Benjamin Kramer2011-01-061-11/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122960 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: If we call llvm.objectsize on a malloc call we can replace it ↵Benjamin Kramer2011-01-063-24/+21
| | | | | | with the size passed to malloc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122959 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Teach llvm.objectsize folding to look through GEPs.Benjamin Kramer2011-01-062-50/+51
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122958 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code and silence warnings.Benjamin Kramer2011-01-062-6/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122957 91177308-0d34-0410-b5e6-96231b3b80d8
* Use movups to lower memcpy and memset even if it's not fast (like corei7).Evan Cheng2011-01-0611-101/+79
| | | | | | | | | The theory is it's still faster than a pair of movq / a quad of movl. This will probably hurt older chips like P4 but should run faster on current and future Intel processors. rdar://8817010 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122955 91177308-0d34-0410-b5e6-96231b3b80d8
* add a note about object size from drystone, add a poorly optimized loop from ↵Chris Lattner2011-01-061-0/+79
| | | | | | 179.art. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122954 91177308-0d34-0410-b5e6-96231b3b80d8
* add a trivial instcombine missed in DhrystoneChris Lattner2011-01-061-0/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122953 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-implement r122936 with proper target hooks. Now getMaxStoresPerMemcpyEvan Cheng2011-01-068-51/+100
| | | | | | | | etc. takes an option OptSize. If OptSize is true, it would return the inline limit for functions with attribute OptSize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122952 91177308-0d34-0410-b5e6-96231b3b80d8
* implement constant folding support for an exotic constant expr:Chris Lattner2011-01-062-1/+38
| | | | | | | | | | | | ret i64 ptrtoint (i8* getelementptr ([1000 x i8]* @X, i64 1, i64 sub (i64 0, i64 ptrtoint ([1000 x i8]* @X to i64))) to i64) to "ret i64 1000". This allows us to correctly compute the trip count on a loop in PR8883, which occurs with std::fill on a char array. This allows us to transform it into a memset with a constant size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122950 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r122936. I'll re-implement the change.Evan Cheng2011-01-063-57/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122949 91177308-0d34-0410-b5e6-96231b3b80d8
* UnitTests/Path: Add magical tests. This will also test identify_magic.Michael J. Spencer2011-01-061-0/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122948 91177308-0d34-0410-b5e6-96231b3b80d8
* UnitTests/Path: More ASSERT_NO_ERROR cleanup.Michael J. Spencer2011-01-061-12/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122947 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the CallInst optimizations that don't involve expanding inline assembly toCameron Zwarich2011-01-061-0/+7
| | | | | | | OptimizeInst() so that they can be used on a worklist instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122945 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the GEP handling in CodeGenPrepare to OptimizeInst().Cameron Zwarich2011-01-061-12/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122944 91177308-0d34-0410-b5e6-96231b3b80d8
* Split the optimizations in CodeGenPrepare that don't manipulate the iteratorsCameron Zwarich2011-01-061-41/+52
| | | | | | | | into a separate function, so that it can be called from a loop using a worklist rather than a loop traversing a whole basic block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122943 91177308-0d34-0410-b5e6-96231b3b80d8
* Zap the last two -Wself-assign warnings in llvm.Jakob Stoklund Olesen2011-01-062-8/+5
| | | | | | Simplify RALinScan::DowngradeRegister with TRI::getOverlaps while we are there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122940 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the SpillPlacement analysis pass.Jakob Stoklund Olesen2011-01-065-0/+466
| | | | | | | | | | | | | | | | This pass precomputes CFG block frequency information that can be used by the register allocator to find optimal spill code placement. Given an interference pattern, placeSpills() will compute which basic blocks should have the current variable enter or exit in a register, and which blocks prefer the stack. The algorithm is ready to consume block frequencies from profiling data, but for now it gets by with the static estimates used for spill weights. This is a work in progress and still not hooked up to RegAllocGreedy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122938 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test to coincide with r122934 change from PR8919.Bill Wendling2011-01-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122937 91177308-0d34-0410-b5e6-96231b3b80d8