summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Suppress warning "switch statement contains 'default' but no 'case' labels" ↵Francois Pichet2011-01-171-0/+1
| | | | | | on MSVC. llvm-svn: 123610
* Eliminate the use of dominance frontiers in PromoteMemToReg. In addition toCameron Zwarich2011-01-174-62/+122
| | | | | | | | | | | | | eliminating a potentially quadratic data structure, this also gives a 17% speedup when running -scalarrepl on test-suite + SPEC2000 + SPEC2006. My initial experiment gave a greater speedup around 25%, but I moved the dominator tree level computation from dominator tree construction to PromoteMemToReg. Since this approach to computing IDFs has a much lower overhead than the old code using precomputed DFs, it is worth looking at using this new code for the second scalarrepl pass as well. llvm-svn: 123609
* UnRevert "Revert "Archive: Replace all internal uses of PathV1 with PathV2. ↵Michael J. Spencer2011-01-162-38/+39
| | | | | | The external API still uses PathV1."" llvm-svn: 123605
* Fix rename.Michael J. Spencer2011-01-161-2/+11
| | | | llvm-svn: 123604
* Test for lazy value info's ability to prove the absense of NULLs in pointers.Nick Lewycky2011-01-161-0/+103
| | | | llvm-svn: 123601
* Make everyone happy this time.Michael J. Spencer2011-01-161-1/+1
| | | | llvm-svn: 123599
* Provide instruction sizes for ARMv5 variants of MUL instructions.Anton Korobeynikov2011-01-161-29/+30
| | | | | | This fixes PR8987 llvm-svn: 123598
* Update README.txt to remove the DAE enhancement.Anders Carlsson2011-01-161-23/+0
| | | | llvm-svn: 123597
* Teach DAE to look for functions whose arguments are unused, and change all ↵Anders Carlsson2011-01-162-2/+88
| | | | | | callers to pass in an undefvalue instead. llvm-svn: 123596
* UnRevert "Revert the archive part of "Support/PathV2: Add identify_magic.""Michael J. Spencer2011-01-162-6/+7
| | | | | | This reverts commit dd103021a889a986a181ce36ed7b0e8dc9b645e1. llvm-svn: 123595
* Try and fix this test. For some reason llvm-ar thinks that the file exists whenMichael J. Spencer2011-01-161-0/+1
| | | | | | | it shouldn't, but I have no way to verify that it doesn't actually exist on the buildbot. llvm-svn: 123594
* Revert the archive part of "Support/PathV2: Add identify_magic."Michael J. Spencer2011-01-162-7/+6
| | | | llvm-svn: 123593
* Update tests.Rafael Espindola2011-01-167-26/+26
| | | | llvm-svn: 123591
* tidy up a comment, as suggested by duncanChris Lattner2011-01-161-2/+2
| | | | llvm-svn: 123590
* Only put unnamed_addr constants in mergeable sections. Fixes PR8297.Rafael Espindola2011-01-161-1/+1
| | | | llvm-svn: 123585
* Don't merge two constants if we care about the address of both.Rafael Espindola2011-01-164-23/+105
| | | | | | | | | | | | | | This fixes the original testcase in PR8927. It also causes a clang binary built with a patched clang to increase in size by 0.21%. We can probably get some of the size back by writing a pass that detects that a global never has its pointer compared and adds unnamed_addr to it (maybe extend global opt). It is also possible that there are some other cases clang could add unnamed_addr to. I will investigate extending globalopt next. llvm-svn: 123584
* Simplify the construction and destruction of Uses. SimplifyJay Foad2011-01-164-35/+26
| | | | | | User::dropHungOffUses(). llvm-svn: 123580
* Reduce and merge testcases.Owen Anderson2011-01-162-60/+16
| | | | llvm-svn: 123579
* fix PR8514, a bug where the "heroic" transformation of shift/and Chris Lattner2011-01-162-13/+45
| | | | | | | | into and/shift would cause nodes to move around and a dangling pointer to happen. The code tried to avoid this with a HandleSDNode, but got the details wrong. llvm-svn: 123578
* Remove unnecessary specialization OperandTraits<User>.Jay Foad2011-01-161-22/+0
| | | | llvm-svn: 123577
* Move the implementation of the User class into a new source file,Jay Foad2011-01-165-83/+98
| | | | | | User.cpp. llvm-svn: 123575
* fix PR8932, a case where arg promotion could infinitely promote.Chris Lattner2011-01-162-24/+72
| | | | llvm-svn: 123574
* simplify a littleChris Lattner2011-01-161-7/+3
| | | | llvm-svn: 123573
* add some commentaryChris Lattner2011-01-161-1/+14
| | | | llvm-svn: 123572
* if an alloca is only ever accessed as a unit, and is accessed with ↵Chris Lattner2011-01-162-5/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | load/store instructions, then don't try to decimate it into its individual pieces. This will just make a mess of the IR and is pointless if none of the elements are individually accessed. This was generating really terrible code for std::bitset (PR8980) because it happens to be lowered by clang as an {[8 x i8]} structure instead of {i64}. The testcase now is optimized to: define i64 @test2(i64 %X) { br label %L2 L2: ; preds = %0 ret i64 %X } before we generated: define i64 @test2(i64 %X) { %sroa.store.elt = lshr i64 %X, 56 %1 = trunc i64 %sroa.store.elt to i8 %sroa.store.elt8 = lshr i64 %X, 48 %2 = trunc i64 %sroa.store.elt8 to i8 %sroa.store.elt9 = lshr i64 %X, 40 %3 = trunc i64 %sroa.store.elt9 to i8 %sroa.store.elt10 = lshr i64 %X, 32 %4 = trunc i64 %sroa.store.elt10 to i8 %sroa.store.elt11 = lshr i64 %X, 24 %5 = trunc i64 %sroa.store.elt11 to i8 %sroa.store.elt12 = lshr i64 %X, 16 %6 = trunc i64 %sroa.store.elt12 to i8 %sroa.store.elt13 = lshr i64 %X, 8 %7 = trunc i64 %sroa.store.elt13 to i8 %8 = trunc i64 %X to i8 br label %L2 L2: ; preds = %0 %9 = zext i8 %1 to i64 %10 = shl i64 %9, 56 %11 = zext i8 %2 to i64 %12 = shl i64 %11, 48 %13 = or i64 %12, %10 %14 = zext i8 %3 to i64 %15 = shl i64 %14, 40 %16 = or i64 %15, %13 %17 = zext i8 %4 to i64 %18 = shl i64 %17, 32 %19 = or i64 %18, %16 %20 = zext i8 %5 to i64 %21 = shl i64 %20, 24 %22 = or i64 %21, %19 %23 = zext i8 %6 to i64 %24 = shl i64 %23, 16 %25 = or i64 %24, %22 %26 = zext i8 %7 to i64 %27 = shl i64 %26, 8 %28 = or i64 %27, %25 %29 = zext i8 %8 to i64 %30 = or i64 %29, %28 ret i64 %30 } In this case, instcombine was able to eliminate the nonsense, but in PR8980 enough PHIs are in play that instcombine backs off. It's better to not generate this stuff in the first place. llvm-svn: 123571
* Use an irbuilder to get some trivial constant folding when doing a storeChris Lattner2011-01-161-21/+17
| | | | | | of a constant. llvm-svn: 123570
* remove a dead check, this was needed before we had an explicit veto on uses ↵Chris Lattner2011-01-161-5/+0
| | | | | | of phis. llvm-svn: 123569
* enhance FoldOpIntoPhi in instcombine to try harder when a phi hasChris Lattner2011-01-163-3/+42
| | | | | | | | multiple uses. In some cases, all the uses are the same operation, so instcombine can go ahead and promote the phi. In the testcase this pushes an add out of the loop. llvm-svn: 123568
* Spill R4 if it's going to be used to restore SP from FP.Evan Cheng2011-01-162-4/+29
| | | | llvm-svn: 123567
* remove the AllowAggressive argument to FoldOpIntoPhi. It is forced to false ↵Chris Lattner2011-01-163-14/+6
| | | | | | | | in the first line of the function because it isn't a good idea, even for compares. llvm-svn: 123566
* more cleanups: use the IR builder.Chris Lattner2011-01-161-38/+39
| | | | llvm-svn: 123565
* tidy up code.Chris Lattner2011-01-161-16/+20
| | | | llvm-svn: 123564
* Improve the safety of my globalopt enhancement by ensuring that the bitcastOwen Anderson2011-01-162-12/+81
| | | | | | of the stored value to the new store type is always. Also, add a testcase. llvm-svn: 123563
* fix PR8983, a broken assertion.Chris Lattner2011-01-162-1/+13
| | | | llvm-svn: 123562
* Implement AnalyzeBranch in Sparc Backend.Venkatraman Govindaraju2011-01-163-14/+206
| | | | llvm-svn: 123561
* fix PR8981, a crash trying to form a conditional inc with a floating point ↵Chris Lattner2011-01-162-1/+12
| | | | | | compare. llvm-svn: 123560
* reapply my fix for PR8961 with a tweak to properly handleChris Lattner2011-01-163-7/+30
| | | | | | | multi-instruction sequences like calls. Many thanks to Jakob for finding a testcase. llvm-svn: 123559
* simplify this code, it is still broken but will follow up on llvm-commits.Chris Lattner2011-01-161-15/+5
| | | | llvm-svn: 123558
* Revert "Archive: Replace all internal uses of PathV1 with PathV2. The ↵Michael J. Spencer2011-01-163-40/+38
| | | | | | external API still uses PathV1." llvm-svn: 123557
* Simplify a README.txt entry significantly to expose the core issue.Chandler Carruth2011-01-161-28/+26
| | | | llvm-svn: 123556
* one of michael's recent patches broke this, temporarily disableChris Lattner2011-01-161-0/+1
| | | | | | it so the bots go green llvm-svn: 123555
* remove the partial specialization pass. It is unmaintained and has bugs.Chris Lattner2011-01-1610-330/+2
| | | | llvm-svn: 123554
* Archive: Fix spelling.Michael J. Spencer2011-01-151-3/+3
| | | | llvm-svn: 123552
* Archive: Replace all internal uses of PathV1 with PathV2. The external API ↵Michael J. Spencer2011-01-152-38/+39
| | | | | | still uses PathV1. llvm-svn: 123551
* Support/GraphWriter: Replace all internal uses of PathV1 with PathV2. The ↵Michael J. Spencer2011-01-151-22/+12
| | | | | | external API still uses PathV1. llvm-svn: 123550
* Add an assert so we don't silently miscompile ctpop for bit widths > 128.Benjamin Kramer2011-01-151-0/+4
| | | | llvm-svn: 123549
* Support/PathV2: Add identify_magic.Michael J. Spencer2011-01-155-40/+49
| | | | llvm-svn: 123548
* Reimplement CTPOP legalization with the "best" algorithm fromBenjamin Kramer2011-01-151-18/+45
| | | | | | | | | | | | | http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel In a silly microbenchmark on a 65 nm core2 this is 1.5x faster than the old code in 32 bit mode and about 2x faster in 64 bit mode. It's also a lot shorter, especially when counting 64 bit population on a 32 bit target. I hope this is fast enough to replace Kernighan-style counting loops even when the input is rather sparse. llvm-svn: 123547
* Unittests/Support/Path: Tweak test.Michael J. Spencer2011-01-151-1/+1
| | | | llvm-svn: 123546
* Support/PathV2: Implement has_magic in terms of get_magic.Michael J. Spencer2011-01-151-26/+8
| | | | llvm-svn: 123545
OpenPOWER on IntegriCloud