Chris Lattner
31d34baa89
Make ValueIsOnlyUsedLocallyOrStoredToOneGlobal smart enough to see through
...
bitcasts and phis. This is a step to fixing PR1639.
llvm-svn: 41928
2007-09-13 16:37:20 +00:00
Chris Lattner
b83dee72ee
Make AllUsesOfLoadedValueWillTrapIfNull strong enough to see through PHI
...
nodes. This is the first step of the fix for PR1639.
llvm-svn: 41927
2007-09-13 16:30:19 +00:00
Dale Johannesen
86f367a6b7
Next round of APFloat changes.
...
Use APFloat in UpgradeParser and AsmParser.
Change all references to ConstantFP to use the
APFloat interface rather than double. Remove
the ConstantFP double interfaces.
Use APFloat functions for constant folding arithmetic
and comparisons.
(There are still way too many places APFloat is
just a wrapper around host float/double, but we're
getting there.)
llvm-svn: 41747
2007-09-06 18:13:44 +00:00
David Greene
8cda5af2e7
Update GEP constructors to use an iterator interface to fix
...
GLIBCXX_DEBUG issues.
llvm-svn: 41697
2007-09-04 15:46:09 +00:00
David Greene
5b85021be8
Update InvokeInst to work like CallInst
...
llvm-svn: 41506
2007-08-27 19:04:21 +00:00
Dan Gohman
0b3fc43d5e
Change comments to refer to @malloc and @free instead of %malloc and %free.
...
llvm-svn: 41488
2007-08-27 16:11:48 +00:00
Chris Lattner
742b745b0c
rename APInt::toString -> toStringUnsigned for symmetry with toStringSigned()
...
Add an APSInt::toString() method.
llvm-svn: 41309
2007-08-23 05:15:32 +00:00
Devang Patel
f06e667e9c
Use SmallVector instead of std::vector.
...
llvm-svn: 41207
2007-08-21 00:31:24 +00:00
Dan Gohman
7dd04fb91c
More explicit keywords.
...
llvm-svn: 40673
2007-08-01 15:32:29 +00:00
David Greene
f06a395bb9
New CallInst interface to address GLIBCXX_DEBUG errors caused by
...
indexing an empty std::vector.
Updates to all clients.
llvm-svn: 40660
2007-08-01 03:43:44 +00:00
Devang Patel
a03e82d7ee
Use SmallPtrSet.
...
llvm-svn: 40560
2007-07-27 18:34:27 +00:00
Devang Patel
d7b401bafd
Add BasicInliner interface.
...
This interface allows clients to inline bunch of functions with module
level call graph information.:wq
llvm-svn: 40486
2007-07-25 18:00:25 +00:00
Chris Lattner
64e8e4af59
fix Transforms/Inline/2007-06-25-WeakInline.ll by not inlining functions
...
with weak linkage.
llvm-svn: 37723
2007-06-25 21:50:09 +00:00
Tanya Lattner
b2aae813b6
Moved Inliner.h to include/llvm/Transforms/IPO/InlinerPass.h
...
llvm-svn: 37666
2007-06-19 22:31:52 +00:00
Tanya Lattner
a2e912bf51
Inliner pass header file was moved.
...
llvm-svn: 37665
2007-06-19 22:29:50 +00:00
Devang Patel
3daf3625ab
Do not use ETForest as well as DomiantorTree. DominatorTree is sufficient.
...
llvm-svn: 37501
2007-06-07 22:17:16 +00:00
Tanya Lattner
968030663f
Formating fixes.
...
llvm-svn: 37491
2007-06-07 17:12:16 +00:00
Tanya Lattner
9672d69be2
Instruct the inliner to obey the noinline attribute. Add test case.
...
llvm-svn: 37481
2007-06-06 21:59:26 +00:00
Chris Lattner
c5d0dc3554
simplify this code and fix PR1493, now that llvm-gcc3 is dead.
...
llvm-svn: 37478
2007-06-06 20:51:41 +00:00
Chris Lattner
7726564331
When rebuilding constant structs, make sure to honor the isPacked bit.
...
This fixes PR1491 and GlobalOpt/2007-06-04-PackedStruct.ll
llvm-svn: 37423
2007-06-04 22:23:42 +00:00
Chris Lattner
701ec7ae28
selects can also reach here
...
llvm-svn: 37081
2007-05-15 06:42:04 +00:00
Chris Lattner
8ed56b8c48
Fix Transforms/GlobalOpt/2007-05-13-Crash.ll
...
llvm-svn: 37020
2007-05-13 21:28:07 +00:00
Chris Lattner
8e9063c571
Fix PR1395, by passing the ID correctly
...
llvm-svn: 36894
2007-05-06 23:13:56 +00:00
Nick Lewycky
c2306ff5b4
Fix typo in comment.
...
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Devang Patel
cd45427a87
Drop 'const'
...
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
8ee9065162
Use 'static const char' instead of 'static const int'.
...
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Devang Patel
38a66bc82e
Do not use typeinfo to identify pass in pass manager.
...
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Anton Korobeynikov
cb2004f82c
Implement review feedback
...
llvm-svn: 36564
2007-04-29 18:02:48 +00:00
Anton Korobeynikov
45162c6dad
Implement review feedback. Aliasees can be either GlobalValue's or
...
bitcasts of them.
llvm-svn: 36537
2007-04-28 13:45:00 +00:00
Anton Korobeynikov
25dc9a61cb
Implement aliases. This fixes PR1017 and it's dependent bugs. CFE part
...
will follow.
llvm-svn: 36435
2007-04-25 14:27:10 +00:00
Anton Korobeynikov
f3e62a428a
Removed tabs everywhere except autogenerated & external files. Add make
...
target for tabs checking.
llvm-svn: 36146
2007-04-16 18:10:23 +00:00
Chris Lattner
798749cafe
fix SimplifyLibCalls/IsDigit.ll
...
llvm-svn: 36047
2007-04-15 05:38:40 +00:00
Chris Lattner
3cebebfdd4
avoid iterator invalidation.
...
llvm-svn: 36002
2007-04-14 18:06:52 +00:00
Jeff Cohen
6e724c5338
An even better fix.
...
llvm-svn: 35998
2007-04-14 17:18:29 +00:00
Jeff Cohen
114799eab9
Fix recent regression that broke several llvm-tests.
...
llvm-svn: 35996
2007-04-14 16:55:19 +00:00
Chris Lattner
a283acb406
Implement a few missing xforms: printf("foo\n") -> puts. printf("x") -> putchar
...
printf("") -> noop. Still need to do the xforms for fprintf.
This implements Transforms/SimplifyLibCalls/Printf.ll
llvm-svn: 35984
2007-04-14 01:17:48 +00:00
Chris Lattner
25f2c932b7
in addition to merging, constantmerge should also delete trivially dead globals,
...
in order to clean up after simplifylibcalls.
llvm-svn: 35982
2007-04-14 01:11:54 +00:00
Lauro Ramos Venancio
a76c2806de
Implement the "thread_local" keyword.
...
llvm-svn: 35950
2007-04-12 18:32:50 +00:00
Chris Lattner
4ed32d0891
Fix a typo that broke SimplifyLibCalls/SPrintF.ll (pr1315)
...
llvm-svn: 35768
2007-04-08 18:11:26 +00:00
Chris Lattner
34464bdf2b
implement a fixme: move optimizations for fwrite out of fputs into a new
...
fwrite optimizer.
llvm-svn: 35758
2007-04-08 07:00:35 +00:00
Chris Lattner
16fe035aa4
Significantly simplify the clients of GetConstantStringInfo, by having it
...
just return the string itself.
llvm-svn: 35755
2007-04-07 21:58:02 +00:00
Chris Lattner
5b3be230d4
Fix problems in the sprintf optimizer
...
llvm-svn: 35754
2007-04-07 21:17:51 +00:00
Chris Lattner
99a7ea0b00
Change CastToCStr to take a pointer instead of a reference.
...
Fix some miscompilations in fprintf optimizer.
llvm-svn: 35753
2007-04-07 21:04:50 +00:00
Chris Lattner
fcc6fe0a9c
Fix an off-by-one error that broke Prolangs/deriv2 with llc on x86
...
and Prolangs-C/cdecl
llvm-svn: 35749
2007-04-07 20:19:08 +00:00
Owen Anderson
41bf50021d
Expunge DomSet from CodeExtractor. This is part of the continuing work
...
on PR1171.
llvm-svn: 35726
2007-04-07 05:31:27 +00:00
Chris Lattner
dbf5d6cf68
fix a miscompilation in printf optimizer.
...
llvm-svn: 35713
2007-04-07 01:18:36 +00:00
Chris Lattner
9aa0d009c1
trunc to bool no longer compares against zero
...
llvm-svn: 35712
2007-04-07 01:03:46 +00:00
Chris Lattner
312c204869
cleanups for strlen optimizer
...
llvm-svn: 35711
2007-04-07 01:02:00 +00:00
Chris Lattner
5f27ea3613
Introduce a new ReplaceCallWith method, which simplifies a lot of code.
...
llvm-svn: 35710
2007-04-07 00:42:32 +00:00
Chris Lattner
fba13c72ef
fixes for strcpy optimizer
...
llvm-svn: 35709
2007-04-07 00:26:18 +00:00