summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Remove code for updating dominance frontiers and some outdated references toCameron Zwarich2011-01-187-105/+21
| | | | | | dominance and post-dominance frontiers. llvm-svn: 123725
* Remove outdated references to dominance frontiers.Cameron Zwarich2011-01-184-29/+27
| | | | llvm-svn: 123724
* McARM: Start marking T2 address operands as such, for the benefit of the parser.Daniel Dunbar2011-01-181-0/+5
| | | | llvm-svn: 123722
* Support/CommandLine: Add "Did you mean" print for mismatched operands.Daniel Dunbar2011-01-181-0/+39
| | | | llvm-svn: 123717
* The stub routine that we're calling uses test and so clobbersEric Christopher2011-01-181-2/+2
| | | | | | the flags. llvm-svn: 123712
* minor change to rafael's recent patches: if something isChris Lattner2011-01-181-1/+7
| | | | | | | constant but requires a unique address, we can still put it in a readonly section, just not a mergable one. llvm-svn: 123711
* Remove unused variables found by gcc-4.6's -Wunused-but-set-variable.Jeffrey Yasskin2011-01-185-17/+0
| | | | llvm-svn: 123707
* Remove checking that prevented overlapping CALLSEQ_START/CALLSEQ_ENDStuart Hastings2011-01-181-15/+9
| | | | | | | ranges, add legalizer support for nested calls. Necessary for ARM byval support. Radar 7662569. llvm-svn: 123704
* Windows/PathV2.inc: For CryptAcquireContext(), CRYPT_VERIFYCONTEXT may be ↵NAKAMURA Takumi2011-01-171-1/+1
| | | | | | specified for easy use. llvm-svn: 123687
* Windows/PathV2.inc: MoveFileEx() can behave like Posix's mv(1) to specify ↵NAKAMURA Takumi2011-01-171-1/+2
| | | | | | MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING. llvm-svn: 123686
* lib/Support/Windows/Signals.inc: "Showstopper" dialogs may be suppressed ↵NAKAMURA Takumi2011-01-171-0/+3
| | | | | | with SetErrorMode() on Windows 7. llvm-svn: 123685
* Remove dead code, that I apparently wrote a while back. We seem to be doing ↵Owen Anderson2011-01-171-15/+0
| | | | | | | | | | well enough without whatever this was trying to do. When/if someone has the time to do some empirical evaluations, it might be worth it to figure out what this code was trying to do and see if it's worth resurrecting/fixing. llvm-svn: 123684
* Add a missing <cctype> include, from Joerg Sonnenberger!Douglas Gregor2011-01-171-0/+1
| | | | llvm-svn: 123670
* Fix an off-by-one error in ctpop combining.Benjamin Kramer2011-01-171-1/+1
| | | | llvm-svn: 123664
* Roll r123609 back in with two changes that fix test failures with expensiveCameron Zwarich2011-01-173-61/+122
| | | | | | | | | | | | | | checks enabled: 1) Use '<' to compare integers in a comparison function rather than '<='. 2) Use the uniqued set DefBlocks rather than Info.DefiningBlocks to initialize the priority queue. The speedup of scalarrepl on test-suite + SPEC2000 + SPEC2006 is a bit less, at just under 16% rather than 17%. llvm-svn: 123662
* Archive: Fix temp path names.Michael J. Spencer2011-01-171-4/+6
| | | | llvm-svn: 123660
* Support/raw_ostream: Fix uninitalized variable in raw_fd_ostream constructor.Michael J. Spencer2011-01-171-0/+7
| | | | llvm-svn: 123643
* Remove useless Tag enumeration.Jay Foad2011-01-172-4/+5
| | | | llvm-svn: 123623
* Split up RotateShift itinerary in SPU.Kalle Raiskila2011-01-172-38/+40
| | | | | | | | 'rotq*' and 'shlq*' instructions go to the odd pipeline, wheras the inter-vector equivalents 'rot*', 'shl*' go to the even. llvm-svn: 123622
* Add a DAGCombine to turn (ctpop x) u< 2 into (x & x-1) == 0.Benjamin Kramer2011-01-171-0/+24
| | | | | | | | | This shaves off 4 popcounts from the hacked 186.crafty source. This is enabled even when a native popcount instruction is available. The combined code is one operation longer but it should be faster nevertheless. llvm-svn: 123621
* Don't crash SPU BE with memory accesses with big alignmnet.Kalle Raiskila2011-01-171-4/+4
| | | | llvm-svn: 123620
* Materialize GA addresses with movw + movt pairs for Darwin in PIC mode. e.g.Evan Cheng2011-01-1715-81/+244
| | | | | | | | | | | | movw r0, :lower16:(L_foo$non_lazy_ptr-(LPC0_0+4)) movt r0, :upper16:(L_foo$non_lazy_ptr-(LPC0_0+4)) LPC0_0: add r0, pc, r0 It's not yet enabled by default as some tests are failing. I suspect bugs in down stream tools. llvm-svn: 123619
* Roll out r123609 due to failures on the llvm-x86_64-linux-checks bot.Cameron Zwarich2011-01-173-121/+60
| | | | llvm-svn: 123618
* Eliminate the use of dominance frontiers in PromoteMemToReg. In addition toCameron Zwarich2011-01-173-60/+121
| | | | | | | | | | | | | 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-161-36/+36
| | | | | | The external API still uses PathV1."" llvm-svn: 123605
* Fix rename.Michael J. Spencer2011-01-161-2/+11
| | | | llvm-svn: 123604
* 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-161-1/+61
| | | | | | 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
* Revert the archive part of "Support/PathV2: Add identify_magic."Michael J. Spencer2011-01-162-7/+6
| | | | llvm-svn: 123593
* 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-161-22/+38
| | | | | | | | | | | | | | 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-162-24/+15
| | | | | | User::dropHungOffUses(). llvm-svn: 123580
* fix PR8514, a bug where the "heroic" transformation of shift/and Chris Lattner2011-01-161-13/+9
| | | | | | | | 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
* Move the implementation of the User class into a new source file,Jay Foad2011-01-164-83/+89
| | | | | | User.cpp. llvm-svn: 123575
* fix PR8932, a case where arg promotion could infinitely promote.Chris Lattner2011-01-161-24/+51
| | | | 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-161-3/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-162-3/+20
| | | | | | | | 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-161-4/+12
| | | | 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-161-12/+22
| | | | | | 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-161-1/+1
| | | | llvm-svn: 123562
OpenPOWER on IntegriCloud