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

4612 Commits

Author SHA1 Message Date
Bill Wendling
4020b2b907 Fix error where it wasn't getting the correct caller function.
llvm-svn: 59758
2008-11-21 00:09:21 +00:00
Bill Wendling
f85b54db6c If the function being inlined has a higher stack protection level than the
inlining function, then increase the stack protection level on the inlining
function.

llvm-svn: 59757
2008-11-21 00:06:32 +00:00
Devang Patel
0c43c5a17f Don't forget arguments!
llvm-svn: 59745
2008-11-20 19:50:17 +00:00
Devang Patel
20dec363b1 Do not forget llvm.dbg.declare's first argument while removing debugging information.
llvm-svn: 59688
2008-11-20 01:20:42 +00:00
Oscar Fuentes
212b29b9d9 CMake: Removed source file.
llvm-svn: 59662
2008-11-19 19:32:19 +00:00
Devang Patel
e5a07d989e Do not use separate utility to walk all instructions and remove dead dbg intrinsics. Let instcombiner do this job.
llvm-svn: 59659
2008-11-19 19:01:37 +00:00
Devang Patel
79a342d7d3 Let instcombiner remove redundant dbg intrinsics.
llvm-svn: 59658
2008-11-19 18:59:41 +00:00
Devang Patel
cd2e68c069 If there are two consecutive llvm.dbg.stoppoint calls then
it is likely that the optimizer deleted code in between these
two intrinsics. Keep only the last llvm.dbg.stoppoint in this case.

llvm-svn: 59657
2008-11-19 18:56:50 +00:00
Devang Patel
dd2491943e Remove unused variables.
llvm-svn: 59570
2008-11-19 00:22:02 +00:00
Devang Patel
b49b40c2fb Fix typo.
llvm-svn: 59569
2008-11-19 00:19:18 +00:00
Devang Patel
233728e8c3 Add new helper pass that strips all symbol names except debugging information.
This pass makes it easier to test wheter debugging info. influences optimization passes or not.

llvm-svn: 59552
2008-11-18 21:34:39 +00:00
Devang Patel
0728a7d7e5 Remove even more llvm.dbg variables.
Remove all dead globals from llvm.metadata.
Ignore linkonce linkage for selected llvm.dbg values.

llvm-svn: 59547
2008-11-18 21:13:41 +00:00
Devang Patel
d8981479c2 Initialize MallocFunc and FreeFunc properly.
llvm-svn: 59538
2008-11-18 18:43:07 +00:00
Bill Wendling
5ba12c88c1 Cast to remove warning about comparing signed and unsigned.
llvm-svn: 59518
2008-11-18 10:57:27 +00:00
Devang Patel
2a0aa9fa51 Give SIToFPInst preference over UIToFPInst because it is faster on platforms that are widely used.
llvm-svn: 59476
2008-11-18 00:40:02 +00:00
Devang Patel
705f88d5b5 While handling floating point IVs lift restrictions on initial value and increment value.
llvm-svn: 59471
2008-11-17 23:27:13 +00:00
Devang Patel
2d0c234523 Handle floating point ivs during doInitialization().
llvm-svn: 59466
2008-11-17 21:32:02 +00:00
Devang Patel
6c2dd85bf3 Let AnalyzeAlloca() remove debug intrinsics.
llvm-svn: 59454
2008-11-17 18:37:53 +00:00
Torok Edwin
f67e9bb406 If SI->size() is 0, we are not allowed to dereference ->begin().
This fixed PR3078.

llvm-svn: 59416
2008-11-16 17:21:25 +00:00
Chris Lattner
ba8e67c635 eliminate some std::set's.
llvm-svn: 59409
2008-11-16 07:17:51 +00:00
Chris Lattner
d85de82f04 simplify loop
llvm-svn: 59406
2008-11-16 06:35:18 +00:00
Chris Lattner
652917424d simplify a bunch more instcombines to use m_Specific etc.
llvm-svn: 59403
2008-11-16 05:38:51 +00:00
Chris Lattner
c487057a1e factor the code for simplifying (icmp)|(icmp) into its own function.
llvm-svn: 59402
2008-11-16 05:20:07 +00:00
Chris Lattner
6b5b2c3606 do some computation with apints instead of ConstantInts.
llvm-svn: 59401
2008-11-16 05:14:43 +00:00
Chris Lattner
f47d16afe3 merge a check into a place where it is simpler.
llvm-svn: 59400
2008-11-16 05:10:52 +00:00
Chris Lattner
3b058783bc factor a whole bunch of code out into a helper function.
llvm-svn: 59398
2008-11-16 05:06:21 +00:00
Chris Lattner
f9dd858359 simplify the conditions on two gigantic if's, decreasing indentation
a bit.  Next step is to factor out into their own helper functions.

llvm-svn: 59397
2008-11-16 04:55:20 +00:00
Chris Lattner
762c52d684 simplify some instcombine matches by using m_Specific
llvm-svn: 59395
2008-11-16 04:46:19 +00:00
Chris Lattner
a5aee38775 Use new m_SelectCst template to eliminate macros.
llvm-svn: 59392
2008-11-16 04:33:38 +00:00
Chris Lattner
cba75c1b7b simplify code.
llvm-svn: 59390
2008-11-16 04:26:55 +00:00
Chris Lattner
21f18c9760 Handle the case where there is no "not". It is possible it got
folded into the select.

llvm-svn: 59389
2008-11-16 04:25:26 +00:00
Chris Lattner
6afddeeed1 factor a bunch of copy/paste code out into a helper function.
Eliminate the cases checking for cond?0:-1, since that is already
handled by commutative checking.

llvm-svn: 59388
2008-11-16 04:24:12 +00:00
Chris Lattner
9dd963a73a rearrange some code, no functionality change.
llvm-svn: 59381
2008-11-16 03:56:24 +00:00
Chris Lattner
0c0c68bab4 if we're going to use a macro, use it maximally. no functionality change.
llvm-svn: 59380
2008-11-16 03:54:57 +00:00
Devang Patel
86c9f12e47 Refactor code.
Strip debug information before stripping symbol names. 

llvm-svn: 59328
2008-11-14 22:49:37 +00:00
Devang Patel
2876af73db Really remove all debug information.
llvm-svn: 59208
2008-11-13 01:28:40 +00:00
Oscar Fuentes
444fd3cc2d CMake: Remove removed source file.
llvm-svn: 59098
2008-11-12 00:14:12 +00:00
Devang Patel
0a73799659 Remove
llvm-svn: 59093
2008-11-11 23:58:15 +00:00
Devang Patel
0616706919 Undo previous check-in.
llvm-svn: 59092
2008-11-11 23:57:33 +00:00
Oscar Fuentes
ac819d0394 CMake: Updated list of source files for lib/Transforms/Utils.
llvm-svn: 59077
2008-11-11 19:51:36 +00:00
Devang Patel
c9fdfd2f0b Add utility pass to remove dbg info.
llvm-svn: 59068
2008-11-11 19:33:39 +00:00
Devang Patel
ef6a48b56f Use actual function name in comments.
llvm-svn: 59063
2008-11-11 19:16:41 +00:00
Cedric Venet
49a701ae17 Update CMakeLists.txt
llvm-svn: 59039
2008-11-11 09:55:48 +00:00
Devang Patel
fbb29cdaee Cleanup debug info. assocated with deleted instructions.
llvm-svn: 59012
2008-11-11 00:54:10 +00:00
Devang Patel
ec4ae29ae4 Add utility routines to remove dead debug info.
llvm-svn: 59011
2008-11-11 00:53:02 +00:00
Devang Patel
f0d6bd18d5 If the sign of exit condition and split condition does not match
then do not split loop index.

llvm-svn: 58995
2008-11-10 19:48:34 +00:00
Bill Wendling
b7d5ca543e Third time's a charm.
The previous patches didn't match correctly. Also, we need to make sure that
the conditional is the same before doing the transformation.

llvm-svn: 58978
2008-11-10 06:59:06 +00:00
Mon P Wang
911ee5bf8b Added support for the following definition of shufflevector
<result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask> 

llvm-svn: 58964
2008-11-10 04:46:22 +00:00
Bill Wendling
137550d34d Correction for the last patch. Should match the conditional in the first part
of the select match, not the select instruction itself.

llvm-svn: 58947
2008-11-09 23:37:53 +00:00
Bill Wendling
3b91357ef0 The method of doing the matching with a 'select' instruction was wrong. The
original code was matching like this:

	if (match(A, m_Not(m_Value(B))))

B was already matched as a 'select' instruction. However, this isn't matching
what we think it's matching. It would match B as a 'Value', so basically
anything would match to it. In this case, a Constant matched. B was replaced
with a constant representation. And then the wrong value would be used in the
SelectInst::Create statement, causing a crash.

After thinking on this for a moment, and after Nick L. told me how the pattern
matching stuff was supposed to work, the solution was to match NOT an m_Value,
but an m_Select.

llvm-svn: 58946
2008-11-09 23:17:42 +00:00