Commit Graph

6230 Commits

Author SHA1 Message Date
Chris Lattner
f86d799a29 move a trunc-specific xform out of commonIntCastTransforms into visitTrunc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92768 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 20:57:30 +00:00
Chris Lattner
3168c7dd25 reduce indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92766 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 20:56:24 +00:00
Benjamin Kramer
11acaa374c Convert a ton of simple integer type equality tests to the new predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92760 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 20:07:06 +00:00
Chris Lattner
033574074d optimize comparisons against cttz/ctlz/ctpop, patch by Alastair Lynn!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92745 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 18:09:56 +00:00
Dan Gohman
ba25f0924e Nick Lewycky pointed out that this code makes changes unconditionally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92739 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 17:50:58 +00:00
Dan Gohman
9fff2187a2 Set Changed properly after calling DeleteDeadPHIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92735 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 16:31:45 +00:00
Dan Gohman
321a813c53 Use do+while instead of while for loops which obviously have a
non-zero trip count. Use SmallVector's pop_back_val().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92734 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 16:27:25 +00:00
Dan Gohman
b7a9f2b504 Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92733 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 16:20:55 +00:00
Dan Gohman
90fe0bd68c Make RecursivelyDeleteTriviallyDeadInstructions,
RecursivelyDeleteDeadPHINode, and DeleteDeadPHIs return a flag
indicating whether they made any changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92732 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 15:45:31 +00:00
Benjamin Kramer
eade002094 Add newline at EOF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92727 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 13:32:48 +00:00
Benjamin Kramer
f012705c7e Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92726 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 13:12:22 +00:00
Chris Lattner
804272c8d6 prune some #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92712 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:54:43 +00:00
Chris Lattner
25f2a23b4a split and/or/xor out into one overly-large (2000LOC) file. However, I think
it does make sense to keep them together, at least for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92711 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:50:36 +00:00
Chris Lattner
d3c5b2d322 missed file with previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92710 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:45:02 +00:00
Chris Lattner
9cdd5f3fe3 split instcombine of shifts out to its own file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92709 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:44:46 +00:00
Chris Lattner
948cdeba97 eliminate getBitCastOperand and simplify some over-complex inbounds stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92708 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:42:10 +00:00
Chris Lattner
753a2b464d split call handling out to InstCombineCalls.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92707 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:32:13 +00:00
Chris Lattner
16507fe9fd optimize cttz and ctlz when we can prove something about the
leading/trailing bits.  Patch by Alastair Lynn!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92706 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:23:56 +00:00
Chris Lattner
f87cd93e0c this inline function moved to addsub
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92705 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:20:54 +00:00
Chris Lattner
53a19b73b5 split add/sub out to its own file. Eliminate use of
dyn_castNotVal in the X+~X transform.  dyn_castNotVal is
dramatic overkill for what the xform needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92704 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:18:46 +00:00
Chris Lattner
248a84beb3 all the places we use hasOneUse() we know are instructions, so inline
and simplify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92700 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:04:23 +00:00
Chris Lattner
dea34da6f8 eliminate AssociativeOpt and its last uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92697 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:01:16 +00:00
Chris Lattner
a317e044fb inline the FoldICmpLogical functor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92695 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 06:59:49 +00:00
Chris Lattner
32c0cf5af9 inline the 'AddRHS' transformation, simplifying things significantly.
Eliminate the 'AddMaskingAnd' transformation, it is redundant with this
more general code right below it:
  // A+B --> A|B iff A and B have no bits set in common.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92693 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 06:29:13 +00:00
Chris Lattner
d0db8e8bad remove massive over-genality manifested as a big template
that got instantiated.  There is no reason for instcombine
to try this hard for simple associative optimizations.  Next
up, eliminate the template completely.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92692 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 06:24:06 +00:00
Chris Lattner
d12c27ce00 split mul/div/rem instructions out to their own file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92689 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 06:09:35 +00:00
Chris Lattner
1c22c80d71 clean up header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92688 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 06:05:07 +00:00
Chris Lattner
c6334b97e1 split select out to its own file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92687 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 06:03:12 +00:00
Chris Lattner
8d9b8d717e split out load/store/alloca.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92685 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 05:57:49 +00:00
Chris Lattner
d5da271863 reduce indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92684 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 05:42:08 +00:00
Chris Lattner
b8a5cecd6b split vector stuff out to InstCombineVectorOps.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92683 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 05:36:20 +00:00
Chris Lattner
f54e729629 split PHI node stuff out to InstCombinePHI.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92682 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 05:31:55 +00:00
Chris Lattner
43fd9017a6 convert various IntrinsicInst's to use class instead of struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92681 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 05:21:26 +00:00
Chris Lattner
5f94af0f72 fix an infinite loop in reassociate building emacs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92679 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 04:55:35 +00:00
David Greene
5ededf7d42 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92639 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:28:37 +00:00
David Greene
3307e95188 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92636 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:28:29 +00:00
David Greene
3a078b5208 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92633 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:28:12 +00:00
David Greene
fd2ab9ff44 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92631 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:28:07 +00:00
David Greene
3215b0ee82 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92629 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:28:05 +00:00
David Greene
09d70db3ed Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92627 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:27:54 +00:00
David Greene
c0aa67950a Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92625 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:27:51 +00:00
David Greene
cb33fd17cc Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92624 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:27:47 +00:00
David Greene
d241e38d26 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92623 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:27:44 +00:00
David Greene
163fb1f93e Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92622 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:27:39 +00:00
David Greene
7439239fca Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92620 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:27:33 +00:00
David Greene
f15826999b Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92619 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:27:30 +00:00
David Greene
a1fa76cb54 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92617 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:27:24 +00:00
David Greene
6a6b90ebd9 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92615 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:27:21 +00:00
David Greene
fe7fe6603f Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92614 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:27:19 +00:00
David Greene
bf7f78e625 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92613 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:27:17 +00:00