summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Teach DSE to eliminate useless trampolines.Duncan Sands2009-11-102-6/+35
| | | | llvm-svn: 86683
* Add brackets to make gcc-4.4 happy.Duncan Sands2009-11-101-3/+3
| | | | llvm-svn: 86681
* Codegen support for the llvm.invariant/lifetime.start/end intrinsics:Duncan Sands2009-11-102-0/+19
| | | | | | just throw them away. llvm-svn: 86678
* Update computeArraySize() to use ComputeMultiple() to determine the array ↵Victor Hernandez2009-11-104-110/+30
| | | | | | size associated with a malloc; also extend PerformHeapAllocSRoA() to check if the optimized malloc's arg had its highest bit set, so that it is safe for ComputeMultiple() to look through sext instructions while determining the optimized malloc's array size llvm-svn: 86676
* Add ComputeMultiple() analysis function that recursively determines if a ↵Victor Hernandez2009-11-102-0/+134
| | | | | | Value V is a multiple of unsigned Base llvm-svn: 86675
* optimize testChris Lattner2009-11-101-1/+1
| | | | llvm-svn: 86672
* unify the code that determines whether it is a good idea to change the typeChris Lattner2009-11-103-29/+38
| | | | | | | of a computation. This fixes some infinite loops when dealing with TD that has no native types. llvm-svn: 86670
* Simplify.Nick Lewycky2009-11-101-3/+1
| | | | llvm-svn: 86668
* Reapply r86359, "Teach dead store elimination that certain intrinsics write toNick Lewycky2009-11-104-63/+198
| | | | | | | memory just like a store" with bug fixed (partial-overwrite.ll is the regression test). llvm-svn: 86667
* refactor TryToSimplifyUncondBranchFromEmptyBlock out of SimplifyCFG.Chris Lattner2009-11-103-165/+181
| | | | llvm-svn: 86666
* CMake: Support for building llvm loadable modules.Oscar Fuentes2009-11-103-2/+17
| | | | llvm-svn: 86656
* lit: Start documentation testing architecture.Daniel Dunbar2009-11-101-0/+116
| | | | llvm-svn: 86655
* lit: Add ExampleTests, for testing lit and demonstrating test suite features.Daniel Dunbar2009-11-1026-0/+555
| | | | llvm-svn: 86654
* lit: Fix bug in --show-suites which accidentally override the list of tests.Daniel Dunbar2009-11-101-2/+2
| | | | llvm-svn: 86653
* Fix PR5445Bruno Cardoso Lopes2009-11-101-1/+1
| | | | llvm-svn: 86651
* I misread the parens, not so redundant after all.Chris Lattner2009-11-101-4/+4
| | | | llvm-svn: 86648
* make jump threading recursively simplify expressions instead of doing it Chris Lattner2009-11-102-20/+74
| | | | | | | | | | | | | | | | | | | just one level deep. On the testcase we go from getting this: F1: ; preds = %T2 %F = and i1 true, %cond ; <i1> [#uses=1] br i1 %F, label %X, label %Y to a fully threaded: F1: ; preds = %T2 br label %Y This changes gets us to the point where we're forming (too many) switch instructions on doug's strswitch testcase. llvm-svn: 86646
* remove some redundant parens.Chris Lattner2009-11-101-4/+4
| | | | llvm-svn: 86645
* CMake: Remove unnecessary `unset' which was not supported by old cmakeOscar Fuentes2009-11-101-1/+0
| | | | | | releases. llvm-svn: 86644
* Remove an unused variable.Dan Gohman2009-11-101-1/+0
| | | | llvm-svn: 86642
* Minor code simplification.Dan Gohman2009-11-101-1/+1
| | | | llvm-svn: 86641
* Trim a bunch of unneeded code from this testcase.Dan Gohman2009-11-101-94/+1
| | | | llvm-svn: 86640
* don't invalidate PN, rewrite of this code is in progress anyway.Chris Lattner2009-11-101-4/+5
| | | | llvm-svn: 86639
* add a new SimplifyInstruction API, which is like ConstantFoldInstruction, Chris Lattner2009-11-103-7/+30
| | | | | | | | except that the result may not be a constant. Switch jump threading to use it so that it gets things like (X & 0) -> 0, which occur when phi preds are deleted and the remaining phi pred was a zero. llvm-svn: 86637
* Fix DenseMap iterator constness.Jeffrey Yasskin2009-11-1014-61/+76
| | | | | | | | | | | | | | | | | | | This patch forbids implicit conversion of DenseMap::const_iterator to DenseMap::iterator which was possible because DenseMapIterator inherited (publicly) from DenseMapConstIterator. Conversion the other way around is now allowed as one may expect. The template DenseMapConstIterator is removed and the template parameter IsConst which specifies whether the iterator is constant is added to DenseMapIterator. Actually IsConst parameter is not necessary since the constness can be determined from KeyT but this is not relevant to the fix and can be addressed later. Patch by Victor Zverovich! llvm-svn: 86636
* factor simplification logic for AND and OR out to InstSimplify from instcombine.Chris Lattner2009-11-103-111/+196
| | | | llvm-svn: 86635
* Fixed to address code review. No functional changes.David Goodwin2009-11-107-23/+40
| | | | llvm-svn: 86634
* Fix MemoryBuffer::getSTDIN to *not* return null if stdin is empty, this is a ↵Daniel Dunbar2009-11-104-41/+33
| | | | | | | | lame API. Also, Stringrefify some more MemoryBuffer functions, and add two performance FIXMEs. llvm-svn: 86630
* Allow targets to specify register classes whose member registers should not ↵David Goodwin2009-11-106-11/+37
| | | | | | be renamed to break anti-dependencies. llvm-svn: 86628
* pull a bunch of logic out of instcombine into instsimplify for compare Chris Lattner2009-11-092-61/+106
| | | | | | simplification, this handles the foldable fcmp x,x cases among many others. llvm-svn: 86627
* Pass the (optional) TargetData object to ConstantFoldInstOperandsDan Gohman2009-11-091-9/+10
| | | | | | and ConstantFoldCompareInstOperands. llvm-svn: 86626
* inline a simple function.Chris Lattner2009-11-091-17/+20
| | | | llvm-svn: 86625
* rename SimplifyCompare -> SimplifyCmpInst and split it into Chris Lattner2009-11-095-14/+65
| | | | | | | Simplify[IF]Cmp pieces. Add some predicates to CmpInst to determine whether a predicate is fp or int. llvm-svn: 86624
* Now that the default is 'enabled,' a separate command line option for ARM isJim Grosbach2009-11-091-8/+1
| | | | | | not necessary. llvm-svn: 86621
* Add testcase for recent checkin.Mike Stump2009-11-091-0/+55
| | | | llvm-svn: 86620
* fix ConstantFoldCompareInstOperands to take the LHS/RHS asChris Lattner2009-11-095-36/+28
| | | | | | individual operands instead of taking a temporary array llvm-svn: 86619
* Add StringSwitch::Cases overloads, for matching multiple strings to a singleDaniel Dunbar2009-11-091-0/+19
| | | | | | value. llvm-svn: 86618
* use instructionsimplify instead of a weak clone of ad-hoc folding stuff.Chris Lattner2009-11-091-22/+2
| | | | llvm-svn: 86616
* Update testJim Grosbach2009-11-091-1/+1
| | | | llvm-svn: 86614
* stub out a new libanalysis "instruction simplify" interface thatChris Lattner2009-11-093-0/+95
| | | | | | | | takes decimated instructions and applies identities to them. This is pretty minimal at this point, but I plan to pull some instcombine logic out into these and similar routines. llvm-svn: 86613
* Remove dlsym stubs, with Nate Begeman's permission.Jeffrey Yasskin2009-11-098-166/+9
| | | | llvm-svn: 86606
* Enable dynamic stack realignment by default.Jim Grosbach2009-11-091-1/+1
| | | | llvm-svn: 86604
* stub out a new form of BasicBlock::RemovePredecessorAndSimplify whichChris Lattner2009-11-091-5/+65
| | | | | | | simplifies instruction users of PHIs when the phi is eliminated. This will be moved to transforms/utils after some other refactoring. llvm-svn: 86603
* Set dynamic stack realignment to real values.Jim Grosbach2009-11-091-11/+3
| | | | llvm-svn: 86602
* Remove an unneeded #include.Dan Gohman2009-11-091-1/+0
| | | | llvm-svn: 86601
* Fix for 64-bit builds.Mike Stump2009-11-091-1/+1
| | | | llvm-svn: 86600
* Similar to r86588, but for Darwin this time.Bill Wendling2009-11-091-3/+3
| | | | llvm-svn: 86592
* The jump table was being generated before the end label for exception handlingBill Wendling2009-11-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | was generated. This caused code like this: ## The asm code for the function .section __TEXT,__const .align 2 lJTI11_0: LJTI11_0: .long LBB11_16 .long LBB11_4 .long LBB11_5 .long LBB11_6 .long LBB11_7 .long LBB11_8 .long LBB11_9 .long LBB11_10 .long LBB11_11 .long LBB11_12 .long LBB11_13 .long LBB11_14 Leh_func_end11: ## <---now in the wrong section! The `Leh_func_end11' would then end up in the wrong section, causing the resulting EH frame information to be wrong: __ZL11CheckRightsjPKcbRbRP6NSData.eh: .set Lset500eh,Leh_frame_end11-Leh_frame_begin11 .long Lset500eh ; Length of Frame Information Entry Leh_frame_begin11: .long Leh_frame_begin11-Leh_frame_common .long Leh_func_begin11-. .set Lset501eh,Leh_func_end11-Leh_func_begin11 .long Lset501eh ; FDE address range `Lset501eh' is now something huge instead of the real value. The X86 back-end generates the jump table after the EH information is emitted. Do the same here. llvm-svn: 86588
* Print "..." instead of all the uninteresting register clobbers on callDan Gohman2009-11-092-14/+60
| | | | | | | | | | | | instructions. This makes CodeGen dumps significantly less noisy. Example before: BL <ga:@bar>, %R0<imp-def>, %R1<imp-def,dead>, %R2<imp-def,dead>, %R3<imp-def,dead>, %R12<imp-def,dead>, %LR<imp-def,dead>, %D0<imp-def,dead>, %D1<imp-def,dead>, %D2<imp-def,dead>, %D3<imp-def,dead>, %D4<imp-def,dead>, %D5<imp-def,dead>, %D6<imp-def,dead>, %D7<imp-def,dead>, %D16<imp-def,dead>, %D17<imp-def,dead>, %D18<imp-def,dead>, %D19<imp-def,dead>, %D20<imp-def,dead>, %D21<imp-def,dead>, %D22<imp-def,dead>, %D23<imp-def,dead>, %D24<imp-def,dead>, %D25<imp-def,dead>, %D26<imp-def,dead>, %D27<imp-def,dead>, %D28<imp-def,dead>, %D29<imp-def,dead>, %D30<imp-def,dead>, %D31<imp-def,dead>, %CPSR<imp-def,dead>, %FPSCR<imp-def,dead> Same example after: BL <ga:@bar>, %R0<imp-def>, %R1<imp-def,dead>, %LR<imp-def,dead>, %CPSR<imp-def,dead>, ... llvm-svn: 86583
* Default-addressspace null pointers don't alias anything. This allowsDan Gohman2009-11-092-0/+29
| | | | | | GVN to be more aggressive. Patch by Hans Wennborg! (with a comment added by me) llvm-svn: 86582
OpenPOWER on IntegriCloud