Devang Patel
25662f3e4a
Remove unused variables.
...
llvm-svn: 59570
2008-11-19 00:22:02 +00:00
Devang Patel
ebd2363339
Fix typo.
...
llvm-svn: 59569
2008-11-19 00:19:18 +00:00
Devang Patel
b5e867acff
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
3b7a2be88e
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
a13f1f38fa
Initialize MallocFunc and FreeFunc properly.
...
llvm-svn: 59538
2008-11-18 18:43:07 +00:00
Bill Wendling
cf194e9a27
Cast to remove warning about comparing signed and unsigned.
...
llvm-svn: 59518
2008-11-18 10:57:27 +00:00
Devang Patel
f1e9329209
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
180afd2c55
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
aa3d68d301
Handle floating point ivs during doInitialization().
...
llvm-svn: 59466
2008-11-17 21:32:02 +00:00
Devang Patel
b63c74730c
Let AnalyzeAlloca() remove debug intrinsics.
...
llvm-svn: 59454
2008-11-17 18:37:53 +00:00
Torok Edwin
026259faeb
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
7917b43a28
eliminate some std::set's.
...
llvm-svn: 59409
2008-11-16 07:17:51 +00:00
Chris Lattner
f8f6270f14
simplify loop
...
llvm-svn: 59406
2008-11-16 06:35:18 +00:00
Chris Lattner
44152742a0
simplify a bunch more instcombines to use m_Specific etc.
...
llvm-svn: 59403
2008-11-16 05:38:51 +00:00
Chris Lattner
d397fef50d
factor the code for simplifying (icmp)|(icmp) into its own function.
...
llvm-svn: 59402
2008-11-16 05:20:07 +00:00
Chris Lattner
909b969b18
do some computation with apints instead of ConstantInts.
...
llvm-svn: 59401
2008-11-16 05:14:43 +00:00
Chris Lattner
feaea9bdf7
merge a check into a place where it is simpler.
...
llvm-svn: 59400
2008-11-16 05:10:52 +00:00
Chris Lattner
269cbd5770
factor a whole bunch of code out into a helper function.
...
llvm-svn: 59398
2008-11-16 05:06:21 +00:00
Chris Lattner
b37b6e7e96
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
f1be285134
simplify some instcombine matches by using m_Specific
...
llvm-svn: 59395
2008-11-16 04:46:19 +00:00
Chris Lattner
fae5e33111
Use new m_SelectCst template to eliminate macros.
...
llvm-svn: 59392
2008-11-16 04:33:38 +00:00
Chris Lattner
569d78cbb5
simplify code.
...
llvm-svn: 59390
2008-11-16 04:26:55 +00:00
Chris Lattner
c3f3b059d0
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
5f6d9a313b
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
68d2da2a19
rearrange some code, no functionality change.
...
llvm-svn: 59381
2008-11-16 03:56:24 +00:00
Chris Lattner
e02c7c7ad2
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
8ada1d5de5
Refactor code.
...
Strip debug information before stripping symbol names.
llvm-svn: 59328
2008-11-14 22:49:37 +00:00
Devang Patel
3dd51c5c62
Really remove all debug information.
...
llvm-svn: 59208
2008-11-13 01:28:40 +00:00
Oscar Fuentes
1b504d5372
CMake: Remove removed source file.
...
llvm-svn: 59098
2008-11-12 00:14:12 +00:00
Devang Patel
4f02a0b740
Remove
...
llvm-svn: 59093
2008-11-11 23:58:15 +00:00
Devang Patel
bf0835706c
Undo previous check-in.
...
llvm-svn: 59092
2008-11-11 23:57:33 +00:00
Oscar Fuentes
2353ef3e91
CMake: Updated list of source files for lib/Transforms/Utils.
...
llvm-svn: 59077
2008-11-11 19:51:36 +00:00
Devang Patel
6096f26bd4
Add utility pass to remove dbg info.
...
llvm-svn: 59068
2008-11-11 19:33:39 +00:00
Devang Patel
95b18126ee
Use actual function name in comments.
...
llvm-svn: 59063
2008-11-11 19:16:41 +00:00
Cedric Venet
8cb2e28e43
Update CMakeLists.txt
...
llvm-svn: 59039
2008-11-11 09:55:48 +00:00
Devang Patel
53b39b5467
Cleanup debug info. assocated with deleted instructions.
...
llvm-svn: 59012
2008-11-11 00:54:10 +00:00
Devang Patel
dc6699e82f
Add utility routines to remove dead debug info.
...
llvm-svn: 59011
2008-11-11 00:53:02 +00:00
Devang Patel
d0ce981372
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
7ef7314d1a
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
25f0106fd9
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
4fb13c051d
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
1579287550
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
Nuno Lopes
2e42927e7c
fix leakage of ValueNumbering
...
llvm-svn: 58933
2008-11-09 12:45:23 +00:00
Bill Wendling
3f547be28f
If the LHS of the FCMP is coming from a UIToFP instruction, then we don't want
...
to generate signed ICMP instructions to replace the FCMP. This would violate
the following:
define i1 @test1(i32 %val) {
%1 = uitofp i32 %val to double
%2 = fcmp ole double %1, 0.000000e+00
ret i1 %2
}
would be transformed into:
define i1 @test1(i32 %val) {
%1 = icmp slt i33 %val, 1
ret i1 %1
}
which is obviously wrong. This patch modifes InstCombiner::FoldFCmp_IntToFP_Cst
to handle when the LHS comes from UIToFP.
llvm-svn: 58929
2008-11-09 04:26:50 +00:00
Daniel Dunbar
2b9dce2669
Rework r58829, allowing removal of dbg info intrinsics during alloca
...
promotion.
- Eliminate uses after free and simplify tests.
Devang: Please check that this is still doing what you intended.
llvm-svn: 58887
2008-11-08 04:12:17 +00:00
Bill Wendling
b9656df4ac
BCUI + 1 doesn't work. Use next instead.
...
llvm-svn: 58830
2008-11-07 01:59:41 +00:00
Devang Patel
b8e0d59ceb
Handle (delete) dbg intrinsics while promoting alloca.
...
llvm-svn: 58826
2008-11-07 01:30:07 +00:00
Mon P Wang
5ca2ec65bd
Fixed scalarizing an extract subvector and prevent an infinite loop
...
when simplify a vector.
llvm-svn: 58820
2008-11-06 22:52:21 +00:00
Devang Patel
5a5ab730e0
InstructionNamer preserves everything.
...
llvm-svn: 58787
2008-11-06 01:00:16 +00:00
Devang Patel
f0ef35738c
Do now allow InlineAlways pass to remove dead functions.
...
llvm-svn: 58744
2008-11-05 01:39:16 +00:00