1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

5459 Commits

Author SHA1 Message Date
Owen Anderson
1dc40e205b 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
0831bdef1d 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
6920c80ab6 - 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
7bb0485237 PR4662: Fix a crash introduced by the recent LLVMContext changes.
llvm-svn: 77716
2009-07-31 19:36:47 +00:00
Owen Anderson
d0e6352c97 Move getTrue() and getFalse() to 2.5-like APIs.
llvm-svn: 77685
2009-07-31 17:39:07 +00:00
Owen Anderson
93ccaf5c60 Move more code back to 2.5 APIs.
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
Daniel Dunbar
81f704c26a 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
4d07efb3c4 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
8c9b60cabc Eliminate a few unused-variable warnings
llvm-svn: 77519
2009-07-29 22:41:10 +00:00
Owen Anderson
881d928f9b Move types back to the 2.5 API.
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Daniel Dunbar
89cb72a6bc 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
da986c3fc9 Remove now unused Context variables.
llvm-svn: 77495
2009-07-29 19:14:17 +00:00
Owen Anderson
0ce2151b36 Move ConstantExpr to 2.5 API.
llvm-svn: 77494
2009-07-29 18:55:55 +00:00
Nick Lewycky
e0524c1795 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
cb23671431 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
390e9778d4 Return ConstantVector to 2.5 API.
llvm-svn: 77366
2009-07-28 21:19:26 +00:00
Owen Anderson
aa8c94b051 Change ConstantArray to 2.5 API.
llvm-svn: 77347
2009-07-28 18:32:17 +00:00
Dan Gohman
0d0dd7b732 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
8902846c69 Fix a small little typo.
llvm-svn: 77289
2009-07-28 01:35:34 +00:00
Dan Gohman
11eb2ee32c Replace dyn_castGetElementPtr with dyn_cast<GEPOperator>.
llvm-svn: 77286
2009-07-28 00:37:50 +00:00
Dan Gohman
361e911b89 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
6cc3ea28df 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
be4029ff76 Avoid build warnings.
llvm-svn: 77271
2009-07-27 23:14:11 +00:00
Owen Anderson
d729f993b8 Move ConstantStruct back to 2.5 API.
llvm-svn: 77266
2009-07-27 22:29:26 +00:00
Owen Anderson
256c2c250e Move ConstantFP construction back to the 2.5-ish API.
llvm-svn: 77247
2009-07-27 20:59:43 +00:00
Devang Patel
dfa0528df7 Do not seed mstadata into the value map.
llvm-svn: 77208
2009-07-27 17:17:04 +00:00
Daniel Dunbar
4a36d5dcfd 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
64abfd0337 Remove Value::getNameLen
llvm-svn: 77148
2009-07-26 08:34:35 +00:00
Daniel Dunbar
75a66c519b Eliminate some uses of DOUT, cerr, and getNameStart().
llvm-svn: 77145
2009-07-26 07:49:05 +00:00
Daniel Dunbar
038a7f0d35 Remove Value::{isName, getNameRef}.
Also, change MDString to use a StringRef.

llvm-svn: 77098
2009-07-25 23:55:21 +00:00
Daniel Dunbar
251177c96e 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
b5f8390b6c Fix 80-col violations.
llvm-svn: 77045
2009-07-25 02:45:27 +00:00
Eric Christopher
df9c86fc26 Move ExtractElementInst to ::Create instead of new. Update all uses.
llvm-svn: 77044
2009-07-25 02:28:41 +00:00
Dan Gohman
9a7deba67e Convert a few more things to use raw_ostream.
llvm-svn: 77039
2009-07-25 01:43:01 +00:00
Dan Gohman
fdf1a11a27 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
acc5d6eaae Make AliasAnalysis and related classes use
getAnalysisIfAvailable<TargetData>().

llvm-svn: 77028
2009-07-25 00:48:42 +00:00
Daniel Dunbar
8496064116 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
cc33e89571 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
b895f668cc AliasAnalysis wants sizes in address-units, not bits.
llvm-svn: 77009
2009-07-24 23:01:30 +00:00
Dan Gohman
58619d5ad2 Fix this condition I accidentally inverted.
llvm-svn: 76988
2009-07-24 18:31:07 +00:00
Dan Gohman
f1a01b8cc0 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
339c88008f 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
e3fea713f1 Switch to getNameStr().
llvm-svn: 76962
2009-07-24 08:24:36 +00:00
Daniel Dunbar
b5adc13728 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
2ed4453d0e 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
c687344f0c 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
af6fdef894 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
51818313fe Remove unnecessary store to temporary std::string.
llvm-svn: 76782
2009-07-22 20:46:46 +00:00
Eli Friedman
ca2e01b721 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
cc287b28c9 Get rid of the Pass+Context magic.
llvm-svn: 76702
2009-07-22 00:24:57 +00:00