1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

2039 Commits

Author SHA1 Message Date
Devang Patel
d39b9d41bb Avoid nested loops at the moment.
llvm-svn: 41090
2007-08-14 23:53:57 +00:00
Devang Patel
7ff808f08e Fix dominance frontier update while removing blocks.
llvm-svn: 41082
2007-08-14 18:35:57 +00:00
Owen Anderson
b970937b06 Eliminate PHI nodes with constant values during normal GVN processing, even when
they're not related to eliminating a load.

llvm-svn: 41081
2007-08-14 18:33:27 +00:00
Owen Anderson
d9a7b61a64 Be more aggressive in pruning unnecessary PHI nodes when doing PHI construction.
llvm-svn: 41080
2007-08-14 18:16:29 +00:00
Owen Anderson
c855195b2f Make GVN iterative.
llvm-svn: 41078
2007-08-14 18:04:11 +00:00
Owen Anderson
8d15350c4e Fix a case where GVN was failing to return true when it had, in fact, modified
the function.

llvm-svn: 41077
2007-08-14 17:59:48 +00:00
Devang Patel
5d8b2b3293 Handle last value assignments.
llvm-svn: 41063
2007-08-14 01:30:57 +00:00
Devang Patel
55b6a8f212 StartValue is already calculated.
llvm-svn: 41062
2007-08-14 00:15:45 +00:00
Devang Patel
762259ba73 Preserve simple analysis.
llvm-svn: 41054
2007-08-13 22:22:13 +00:00
Devang Patel
e3ea62e49a Preserve dominator info.
llvm-svn: 41053
2007-08-13 22:13:24 +00:00
Devang Patel
63d1affed8 Split loops and do CFG cleanup.
llvm-svn: 41029
2007-08-12 07:02:51 +00:00
Reid Spencer
c71871ba30 Remove unused variables.
llvm-svn: 41028
2007-08-12 04:45:36 +00:00
Chris Lattner
50f25115cd Transform a load from an undef/zero global into an undef/global even if we
have complex pointer manipulation going on.  This allows us to compile
stuff like this:

__m128i foo(__m128i x){
                static const unsigned int c_0[4] = { 0, 0, 0, 0 };
                __m128i v_Zero = _mm_loadu_si128((__m128i*)c_0);
                x  = _mm_unpacklo_epi8(x,  v_Zero);
                return x;
}

into:

_foo:
        xorps   %xmm1, %xmm1
        punpcklbw       %xmm1, %xmm0
        ret

llvm-svn: 41022
2007-08-11 18:48:48 +00:00
Devang Patel
c8cff19c2e Clone loop.
llvm-svn: 40998
2007-08-10 18:07:13 +00:00
Devang Patel
b1160475fd Remove unncessary duplication.
llvm-svn: 40979
2007-08-10 00:59:03 +00:00
Devang Patel
23c5e2dcd3 Calculate exit and start value of true loop and false loop respectively.
llvm-svn: 40978
2007-08-10 00:53:35 +00:00
Devang Patel
51da0a465a ExitCondition and Induction variable are loop constraints
not split condition constraints.

llvm-svn: 40977
2007-08-10 00:33:50 +00:00
Chris Lattner
3548932573 when we see a unaligned load from an insufficiently aligned global or
alloca, increase the alignment of the load, turning it into an aligned load.

This allows us to compile:

#include <xmmintrin.h>
__m128i foo(__m128i x){
 static const unsigned int c_0[4] = { 0, 0, 0, 0 };
	  __m128i v_Zero = _mm_loadu_si128((__m128i*)c_0);
  x  = _mm_unpacklo_epi8(x,  v_Zero);
  return x;
}

into:

_foo:
	punpcklbw	_c_0.5944, %xmm0
	ret
	.data
	.lcomm	_c_0.5944,16,4		# c_0.5944

instead of:

_foo:
	movdqu	_c_0.5944, %xmm1
	punpcklbw	%xmm1, %xmm0
	ret
	.data
	.lcomm	_c_0.5944,16,2		# c_0.5944

llvm-svn: 40971
2007-08-09 19:05:49 +00:00
Owen Anderson
3eba1e8f5c Make NonLocal and None const in the right way. :-)
llvm-svn: 40961
2007-08-09 04:42:44 +00:00
Devang Patel
652613b1db Traverse loop blocks' terminators to find split candidates.
llvm-svn: 40960
2007-08-09 01:39:01 +00:00
Devang Patel
30bf54b9d3 Add cost analysis.
llvm-svn: 40952
2007-08-08 22:25:28 +00:00
Devang Patel
ed9b08c44f Preserve dom info while processing one iteration loop.
llvm-svn: 40947
2007-08-08 21:39:47 +00:00
Owen Anderson
f988c3ee5c Change the None and NonLocal markers in memdep to be const.
llvm-svn: 40946
2007-08-08 21:39:39 +00:00
Devang Patel
a74e533c5e Clear split info.
llvm-svn: 40944
2007-08-08 21:18:27 +00:00
Devang Patel
4bd07b86ae Handle multiple split conditions.
llvm-svn: 40941
2007-08-08 21:02:17 +00:00
Owen Anderson
04ba98d0f5 Global values also don't undead-ify pointers in our dead alloca's set.
llvm-svn: 40936
2007-08-08 19:12:31 +00:00
Owen Anderson
fd772509e9 Make handleEndBlock significantly faster with one trivial improvement,
and one hack to avoid hitting a bad case when the alias analysis is imprecise.

llvm-svn: 40935
2007-08-08 18:38:28 +00:00
Owen Anderson
930610cceb Small improvement: if a function doesn't access memory, we don't need to scan
it for potentially undeading pointers.

llvm-svn: 40933
2007-08-08 17:58:56 +00:00
Owen Anderson
ecd9348bd6 Add some comments, remove a dead argument, and simplify some control flow.
No functionality change.

llvm-svn: 40932
2007-08-08 17:50:09 +00:00
Owen Anderson
02298f7388 A few more small cleanups.
llvm-svn: 40922
2007-08-08 06:06:02 +00:00
Owen Anderson
a9facda8db First round of cleanups from Chris' feedback.
llvm-svn: 40919
2007-08-08 04:52:29 +00:00
Devang Patel
62f8bf41c3 Embrace patch review feedback.
llvm-svn: 40915
2007-08-08 01:51:27 +00:00
Devang Patel
08504a95b0 Fix new compare instruction's signness. Caught by Chris during review.
llvm-svn: 40912
2007-08-07 23:17:52 +00:00
Owen Anderson
2c98f8ee3c Don't insert nearly as many redundant phi nodes.
llvm-svn: 40909
2007-08-07 23:12:31 +00:00
Devang Patel
92d6834fd7 Use eraseFromParent().
llvm-svn: 40903
2007-08-07 17:45:35 +00:00
David Greene
310b0d7e39 Fix comment typo
llvm-svn: 40898
2007-08-07 16:52:03 +00:00
David Greene
7eea029403 Fix GLIBCXX_DEBUG error triggered by incrementing erased iterator.
llvm-svn: 40897
2007-08-07 16:44:38 +00:00
Devang Patel
228dc09ff6 Begin loop index split pass.
llvm-svn: 40883
2007-08-07 00:25:56 +00:00
Nick Lewycky
34cf98c558 It's safe to fold not of fcmp.
llvm-svn: 40870
2007-08-06 20:04:16 +00:00
David Greene
02ac5cfce9 Make this code more efficient.
llvm-svn: 40861
2007-08-06 15:09:17 +00:00
Reid Spencer
ac9262072f Silence some warnings from doxygen about @param argument name not matching the
actual argument name of the documented function.

llvm-svn: 40851
2007-08-05 19:35:22 +00:00
Chris Lattner
6d8e77a703 at the end of instcombine, explicitly clear WorklistMap.
This shrinks it down to something small.  On the testcase
from PR1432, this speeds up instcombine from 0.7959s to 0.5000s,
(59%)

llvm-svn: 40840
2007-08-05 08:47:58 +00:00
Nick Lewycky
4e96222245 Clean up comments, fix up some confusing code logic.
Predsimplify fails llvm-gcc bootstrap.

llvm-svn: 40815
2007-08-04 18:45:32 +00:00
Chandler Carruth
00e56b0e81 This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.

llvm-svn: 40807
2007-08-04 01:51:18 +00:00
Owen Anderson
891f5b4d28 Fix a subtle miscompilation. This allows 197.parser to be compiled correctly.
llvm-svn: 40791
2007-08-03 19:59:35 +00:00
Owen Anderson
d1063b7a3c Fix a subtle iterator invalidation bug in a recursive algorithm.
llvm-svn: 40776
2007-08-03 11:03:26 +00:00
Chris Lattner
cf6dd53ad8 Fix an accidental commit.
llvm-svn: 40758
2007-08-02 21:33:36 +00:00
Owen Anderson
414247c075 Fix 80 col. violations.
llvm-svn: 40751
2007-08-02 18:20:52 +00:00
Owen Anderson
ad74eeed3d Fix 80 col. violations.
llvm-svn: 40750
2007-08-02 18:16:06 +00:00
Owen Anderson
ae769ac824 Fix 80 col. violations.
llvm-svn: 40749
2007-08-02 18:11:11 +00:00