Owen Anderson
5a1acd9912
Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
...
metadata related, which I'm waiting on to avoid conflicting with Devang.
llvm-svn: 77721
2009-07-31 20:28:14 +00:00
Dan Gohman
ef3ef7f645
Fix GVN's debug output, now that operator<< on Value* doesn't print
...
a trailing newline.
llvm-svn: 77719
2009-07-31 20:24:18 +00:00
Bill Wendling
2602bb4cdc
- Convert the rest of the DOUTs to DEBUG+errs().
...
- One formatting change.
No intended functionality change.
llvm-svn: 77717
2009-07-31 19:52:24 +00:00
Eli Friedman
ca9a4f1045
PR4662: Fix a crash introduced by the recent LLVMContext changes.
...
llvm-svn: 77716
2009-07-31 19:36:47 +00:00
Owen Anderson
23a204d91b
Move getTrue() and getFalse() to 2.5-like APIs.
...
llvm-svn: 77685
2009-07-31 17:39:07 +00:00
Owen Anderson
b292b8ce70
Move more code back to 2.5 APIs.
...
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
Daniel Dunbar
132f78395a
Twines: Don't allow implicit conversion from integers, this is too tricky.
...
llvm-svn: 77605
2009-07-30 17:37:43 +00:00
Daniel Dunbar
6afdc5e694
Switch obvious clients to Twine instead of utostr (when they were already using
...
a Twine, e.g., for names).
- I am a little ambivalent about this; we don't want the string conversion of
utostr, but using overload '+' mixed with string and integer arguments is
sketchy. On the other hand, this particular usage is something of an idiom.
llvm-svn: 77579
2009-07-30 04:20:37 +00:00
Douglas Gregor
47d02732e0
Eliminate a few unused-variable warnings
...
llvm-svn: 77519
2009-07-29 22:41:10 +00:00
Owen Anderson
4056ca9568
Move types back to the 2.5 API.
...
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Daniel Dunbar
98ddd164d8
Fix PR4645 which was fallout from the fix for PR4641.
...
- Call RAUW to delete all instructions (this is a patch from Nick Lewycky).
llvm-svn: 77512
2009-07-29 22:00:43 +00:00
Benjamin Kramer
21d75078b5
Remove now unused Context variables.
...
llvm-svn: 77495
2009-07-29 19:14:17 +00:00
Owen Anderson
487375e9a2
Move ConstantExpr to 2.5 API.
...
llvm-svn: 77494
2009-07-29 18:55:55 +00:00
Nick Lewycky
f82326b984
Bulk erasing instructions without RAUWing them is unsafe. Instead, break them
...
into a new BB that has no predecessors.
llvm-svn: 77433
2009-07-29 05:17:50 +00:00
Devang Patel
a4f43fb5dd
Rename MDNode.h header. It defines MDnode and other metadata classes.
...
New name is Metadata.h.
llvm-svn: 77370
2009-07-28 21:49:47 +00:00
Owen Anderson
4aa3295a65
Return ConstantVector to 2.5 API.
...
llvm-svn: 77366
2009-07-28 21:19:26 +00:00
Owen Anderson
c2c7932c64
Change ConstantArray to 2.5 API.
...
llvm-svn: 77347
2009-07-28 18:32:17 +00:00
Dan Gohman
31a9b9880b
Teach instcombine to respect and preserve inbounds. Add inbounds
...
to a few tests where it is required for the expected transformation.
llvm-svn: 77290
2009-07-28 01:40:03 +00:00
Mike Stump
38a579fe5a
Fix a small little typo.
...
llvm-svn: 77289
2009-07-28 01:35:34 +00:00
Dan Gohman
9ba43abc70
Replace dyn_castGetElementPtr with dyn_cast<GEPOperator>.
...
llvm-svn: 77286
2009-07-28 00:37:50 +00:00
Dan Gohman
a3dcff5900
Grab the LLVMContext and parent Module of SI ahead of the
...
point where SI can get deleted. This fixes a use of free'd memory.
This fixes Externals/Povray.
llvm-svn: 77285
2009-07-28 00:37:06 +00:00
Mike Stump
4798763e14
Fix a release-asserts warning. Debug functions should be marked used,
...
if there are no other uses. If people don't need this routine
anymore, if should be deleted.
llvm-svn: 77274
2009-07-27 23:33:34 +00:00
Mike Stump
d934cc06c6
Avoid build warnings.
...
llvm-svn: 77271
2009-07-27 23:14:11 +00:00
Owen Anderson
45308b578b
Move ConstantStruct back to 2.5 API.
...
llvm-svn: 77266
2009-07-27 22:29:26 +00:00
Owen Anderson
69c464dec4
Move ConstantFP construction back to the 2.5-ish API.
...
llvm-svn: 77247
2009-07-27 20:59:43 +00:00
Devang Patel
de6f46c32e
Do not seed mstadata into the value map.
...
llvm-svn: 77208
2009-07-27 17:17:04 +00:00
Daniel Dunbar
6115b39ffd
Remove Value::getName{Start,End}, the last of the old Name APIs.
...
llvm-svn: 77152
2009-07-26 09:48:23 +00:00
Daniel Dunbar
ca414c7cae
Remove Value::getNameLen
...
llvm-svn: 77148
2009-07-26 08:34:35 +00:00
Daniel Dunbar
9813b0b025
Eliminate some uses of DOUT, cerr, and getNameStart().
...
llvm-svn: 77145
2009-07-26 07:49:05 +00:00
Daniel Dunbar
e03eecb75f
Remove Value::{isName, getNameRef}.
...
Also, change MDString to use a StringRef.
llvm-svn: 77098
2009-07-25 23:55:21 +00:00
Daniel Dunbar
4975db6276
Initial update to VMCore to use Twines for string arguments.
...
- The only meat here is in Value.{h,cpp} the rest is essential 'const
std::string &' -> 'const Twine &'.
llvm-svn: 77048
2009-07-25 04:41:11 +00:00
Eric Christopher
53e1cd7254
Fix 80-col violations.
...
llvm-svn: 77045
2009-07-25 02:45:27 +00:00
Eric Christopher
c974225976
Move ExtractElementInst to ::Create instead of new. Update all uses.
...
llvm-svn: 77044
2009-07-25 02:28:41 +00:00
Dan Gohman
1ddf98ad8e
Convert a few more things to use raw_ostream.
...
llvm-svn: 77039
2009-07-25 01:43:01 +00:00
Dan Gohman
29f2baf3b3
Convert a few more uses of llvm/Support/Streams.h to raw_ostream.
...
llvm-svn: 77033
2009-07-25 01:13:51 +00:00
Dan Gohman
43d19d61d4
Make AliasAnalysis and related classes use
...
getAnalysisIfAvailable<TargetData>().
llvm-svn: 77028
2009-07-25 00:48:42 +00:00
Daniel Dunbar
0dd5e1ed39
More migration to raw_ostream, the water has dried up around the iostream hole.
...
- Some clients which used DOUT have moved to DEBUG. We are deprecating the
"magic" DOUT behavior which avoided calling printing functions when the
statement was disabled. In addition to being unnecessary magic, it had the
downside of leaving code in -Asserts builds, and of hiding potentially
unnecessary computations.
llvm-svn: 77019
2009-07-25 00:23:56 +00:00
Owen Anderson
edb4a70325
Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
...
llvm-svn: 77011
2009-07-24 23:12:02 +00:00
Dan Gohman
85a791ef7a
AliasAnalysis wants sizes in address-units, not bits.
...
llvm-svn: 77009
2009-07-24 23:01:30 +00:00
Dan Gohman
0b5be94c79
Fix this condition I accidentally inverted.
...
llvm-svn: 76988
2009-07-24 18:31:07 +00:00
Dan Gohman
67243a4bec
Convert several more passes to use getAnalysisIfAvailable<TargetData>()
...
instead of getAnalysis<TargetData>().
llvm-svn: 76982
2009-07-24 18:13:53 +00:00
Daniel Dunbar
796e43eede
Move more to raw_ostream, provide support for writing MachineBasicBlock,
...
LiveInterval, etc to raw_ostream.
llvm-svn: 76965
2009-07-24 10:36:58 +00:00
Daniel Dunbar
12368685d8
Switch to getNameStr().
...
llvm-svn: 76962
2009-07-24 08:24:36 +00:00
Daniel Dunbar
5bf72e20eb
Convert StringMap to using StringRef for its APIs.
...
- Yay for '-'s and simplifications!
- I kept StringMap::GetOrCreateValue for compatibility purposes, this can
eventually go away. Likewise the StringMapEntry Create functions still follow
the old style.
- NIFC.
llvm-svn: 76888
2009-07-23 18:17:34 +00:00
Chris Lattner
88ab854873
refactor a blob of code out to a new 'FoldOrOfFCmps' function and
...
simplify it.
llvm-svn: 76866
2009-07-23 05:46:22 +00:00
Chris Lattner
7d55541e56
Make some existing optimizations that would only trigger on scalars
...
also apply to vectors. This allows us to compile this:
#include <emmintrin.h>
__m128i a(__m128 a, __m128 b) { return a==a & b==b; }
__m128i b(__m128 a, __m128 b) { return a!=a | b!=b; }
to:
_a:
cmpordps %xmm1, %xmm0
ret
_b:
cmpunordps %xmm1, %xmm0
ret
with clang instead of to a ton of horrible code.
llvm-svn: 76863
2009-07-23 05:32:17 +00:00
Chris Lattner
9085438e4b
refactor a bunch of code out into a helper function,
...
no functionality change.
llvm-svn: 76859
2009-07-23 05:14:02 +00:00
Daniel Dunbar
0989a9a338
Remove unnecessary store to temporary std::string.
...
llvm-svn: 76782
2009-07-22 20:46:46 +00:00
Eli Friedman
315596c39c
Don't give a massive inlining cost bonus to available_externally
...
functions with a single use; eliminating the single use may eliminate
the function from the current module, but usually doesn't eliminate
it from the final program.
llvm-svn: 76730
2009-07-22 08:12:59 +00:00
Owen Anderson
47db941fd3
Get rid of the Pass+Context magic.
...
llvm-svn: 76702
2009-07-22 00:24:57 +00:00