summaryrefslogtreecommitdiff
path: root/lib/Transforms
Commit message (Collapse)AuthorAge
...
* Insert new pre-header before new header. Original pre-header mayDevang Patel2007-04-09
| | | | | | | | | | happen to be an entry, in such case, it is not a good idea to insert new block before entry. Also fix typo in assertion check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35833 91177308-0d34-0410-b5e6-96231b3b80d8
* Preserve canonical loop form.Devang Patel2007-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35829 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't link against System or Support library. These things will alreadyReid Spencer2007-04-09
| | | | | | | be in the opt tool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35827 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not create new pre-header. Reuse original pre-header.Devang Patel2007-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35825 91177308-0d34-0410-b5e6-96231b3b80d8
* Simpler for() loops.Devang Patel2007-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35822 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix future bug. Of course, Chris spotted this.Devang Patel2007-04-09
| | | | | | | Handle Argument or Undef as an incoming PHI value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35821 91177308-0d34-0410-b5e6-96231b3b80d8
* More cosmetic changes.Devang Patel2007-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35820 91177308-0d34-0410-b5e6-96231b3b80d8
* Only cosmetic changes. Zero functionality Change.Devang Patel2007-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35819 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1304 and Transforms/InstCombine/2007-04-08-SingleEltVectorCrash.llChris Lattner2007-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35792 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate useless insertelement instructions. This implementsChris Lattner2007-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Transforms/InstCombine/vec_insertelt.ll and fixes PR1286. We now compile the code from that bug into: _foo: movl 4(%esp), %eax movdqa (%eax), %xmm0 movl 8(%esp), %ecx psllw (%ecx), %xmm0 movdqa %xmm0, (%eax) ret instead of: _foo: subl $4, %esp movl %ebp, (%esp) movl %esp, %ebp movl 12(%ebp), %eax movdqa (%eax), %xmm0 #IMPLICIT_DEF %eax pinsrw $2, %eax, %xmm0 xorl %ecx, %ecx pinsrw $3, %ecx, %xmm0 pinsrw $4, %eax, %xmm0 pinsrw $5, %ecx, %xmm0 pinsrw $6, %eax, %xmm0 pinsrw $7, %ecx, %xmm0 movl 8(%ebp), %eax movdqa (%eax), %xmm1 psllw %xmm0, %xmm1 movdqa %xmm1, (%eax) movl %ebp, %esp popl %ebp ret woo :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35788 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup some from my DomSet-removal changes. Add a newOwen Anderson2007-04-09
| | | | | | | | isReachableFromEntry test to ETForest to factor a common test out of code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35786 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo that broke SimplifyLibCalls/SPrintF.ll (pr1315)Chris Lattner2007-04-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35768 91177308-0d34-0410-b5e6-96231b3b80d8
* reenable this xform, whoops :)Chris Lattner2007-04-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35765 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix regression on Instcombine/apint-or2.llChris Lattner2007-04-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35763 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize the code that handles (A&B)|(A&C) to work where B/C are not ↵Chris Lattner2007-04-08
| | | | | | | | | constants. Add a new xform to simplify (A&B)|(~A&C). THis implements InstCombine/or2.ll:test1 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35760 91177308-0d34-0410-b5e6-96231b3b80d8
* implement a fixme: move optimizations for fwrite out of fputs into a newChris Lattner2007-04-08
| | | | | | | fwrite optimizer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35758 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove DominatorSet usage from LoopSimplify. Patch from Owen Anderson.Nick Lewycky2007-04-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35757 91177308-0d34-0410-b5e6-96231b3b80d8
* Significantly simplify the clients of GetConstantStringInfo, by having itChris Lattner2007-04-07
| | | | | | | just return the string itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35755 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix problems in the sprintf optimizerChris Lattner2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35754 91177308-0d34-0410-b5e6-96231b3b80d8
* Change CastToCStr to take a pointer instead of a reference.Chris Lattner2007-04-07
| | | | | | | Fix some miscompilations in fprintf optimizer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35753 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an off-by-one error that broke Prolangs/deriv2 with llc on x86Chris Lattner2007-04-07
| | | | | | | and Prolangs-C/cdecl git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35749 91177308-0d34-0410-b5e6-96231b3b80d8
* Add DomSet back, and revert the changes to LoopSimplify. Apparently theOwen Anderson2007-04-07
| | | | | | | | ETForest updating mechanisms don't work as I thought they did. These changes will be reapplied once the issue is worked out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35741 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for cast instructions.Nick Lewycky2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35734 91177308-0d34-0410-b5e6-96231b3b80d8
* Completely purge DomSet. This is the (hopefully) final patch for PR1171.Owen Anderson2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35731 91177308-0d34-0410-b5e6-96231b3b80d8
* Completely purge DomSet from LoopSimplify. This is part of theOwen Anderson2007-04-07
| | | | | | | continuing work on PR1171. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35730 91177308-0d34-0410-b5e6-96231b3b80d8
* BreakCriticalEdges does still preserve DominatorTree.Owen Anderson2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35729 91177308-0d34-0410-b5e6-96231b3b80d8
* Expunge DomSet from BreakCriticalEdges. This is part of the continuingOwen Anderson2007-04-07
| | | | | | | work for PR 1171. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35728 91177308-0d34-0410-b5e6-96231b3b80d8
* Expunge DomSet from CodeExtractor. This is part of the continuing workOwen Anderson2007-04-07
| | | | | | | on PR1171. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35726 91177308-0d34-0410-b5e6-96231b3b80d8
* Support NE inequality in ValueRanges.Nick Lewycky2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35724 91177308-0d34-0410-b5e6-96231b3b80d8
* Expunge a bunch of uses of DomSet from LoopSimplify. Many more remain.Owen Anderson2007-04-07
| | | | | | | This is the beginning of work for PR1171. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35720 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup. Refactor out the applying of value ranges to its own method.Nick Lewycky2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35719 91177308-0d34-0410-b5e6-96231b3b80d8
* Use TargetData to find the size of a type.Nick Lewycky2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35718 91177308-0d34-0410-b5e6-96231b3b80d8
* Strengthen icmp snuggling by doing 'compare-or-equal-to' to 'compare'Nick Lewycky2007-04-07
| | | | | | | first and then range testing second. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35715 91177308-0d34-0410-b5e6-96231b3b80d8
* Add loop rotation pass.Devang Patel2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35714 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a miscompilation in printf optimizer.Chris Lattner2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35713 91177308-0d34-0410-b5e6-96231b3b80d8
* trunc to bool no longer compares against zeroChris Lattner2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35712 91177308-0d34-0410-b5e6-96231b3b80d8
* cleanups for strlen optimizerChris Lattner2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35711 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a new ReplaceCallWith method, which simplifies a lot of code.Chris Lattner2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35710 91177308-0d34-0410-b5e6-96231b3b80d8
* fixes for strcpy optimizerChris Lattner2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35709 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bugs in strncmp.Chris Lattner2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35708 91177308-0d34-0410-b5e6-96231b3b80d8
* fix 3 miscompilations and several compielr crashes in strcmp optimizer.Chris Lattner2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35707 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix several nasty bugs in the strchr optimizer, this fixesChris Lattner2007-04-06
| | | | | | | SimplifyLibCalls/2007-04-06-strchr-miscompile.ll and PR1307 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35706 91177308-0d34-0410-b5e6-96231b3b80d8
* clean up strcat optimizer, no functionality change.Chris Lattner2007-04-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35704 91177308-0d34-0410-b5e6-96231b3b80d8
* rename getConstantStringLength -> GetConstantStringInfo. Make it returnChris Lattner2007-04-06
| | | | | | | the start index of the array as well as the length. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35703 91177308-0d34-0410-b5e6-96231b3b80d8
* implement Transforms/InstCombine/malloc2.ll and PR1313Chris Lattner2007-04-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35700 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Transforms/GlobalOpt/2007-04-05-Crash.llChris Lattner2007-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35689 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a worklist-driven algorithm instead of a recursive one.Chris Lattner2007-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35680 91177308-0d34-0410-b5e6-96231b3b80d8
* Prevent transformConstExprCastCall from generating conversions that assertDale Johannesen2007-04-04
| | | | | | | elsewhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35668 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 2007-04-04-BadFoldBitcastIntoMalloc.llJeff Cohen2007-04-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35665 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment.Duncan Sands2007-04-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35655 91177308-0d34-0410-b5e6-96231b3b80d8