1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

10342 Commits

Author SHA1 Message Date
Chris Lattner
cb59c59db8 rearrange some code.
llvm-svn: 92234
2009-12-28 21:56:07 +00:00
Chris Lattner
f1704b24be remove #include that comes in from ConstantFolder.h
llvm-svn: 92232
2009-12-28 21:52:06 +00:00
Chris Lattner
28de6cdbf5 remove #include of Function.h from IRBuilder
llvm-svn: 92231
2009-12-28 21:50:56 +00:00
Chris Lattner
e70c40e8ac move debug info stuff out of line, allowing two #includes
to go away from IRBuilder.h

llvm-svn: 92230
2009-12-28 21:45:40 +00:00
Chris Lattner
e0b9847223 split code that doesn't need to be templated out of IRBuilder into a new
non-templated IRBuilderBase class.  Move that large CreateGlobalString
out of line, eliminating the need to #include GlobalVariable.h in IRBuilder.h

llvm-svn: 92227
2009-12-28 21:28:46 +00:00
Chris Lattner
13e5945d1d rename ivar to be more descriptive.
llvm-svn: 92226
2009-12-28 21:12:29 +00:00
Chris Lattner
cd3aa9d1ff rename getMDKind -> getMDKindID, make it autoinsert if an MD Kind
doesn't exist already, eliminate registerMDKind.  Tidy up a bunch
of random stuff.

llvm-svn: 92225
2009-12-28 20:45:51 +00:00
Chris Lattner
2b65f2d7d4 rename getHandlerNames to getMDKindNames, simplify its interface
and simplify all the clients that use it.

llvm-svn: 92224
2009-12-28 20:10:43 +00:00
Chris Lattner
8c6fbdc63e avoid a completely unneeded linear walk.
llvm-svn: 92221
2009-12-28 09:32:10 +00:00
Chris Lattner
14d3bc91c4 Rewrite the function-local validation logic for MDNodes (most of r91708).
Among other benefits, this doesn't leak the SmallPtrSet, has the verifier
code in the verifier pass, actually does the verification at the end,
and is considerably simpler.

llvm-svn: 92217
2009-12-28 09:07:21 +00:00
Chris Lattner
fcc7918518 rename MDNode instance variables to something meaningful.
llvm-svn: 92216
2009-12-28 08:48:12 +00:00
Chris Lattner
2f436b213d snip one more #include from Metadata.h
llvm-svn: 92214
2009-12-28 08:30:43 +00:00
Chris Lattner
ec51bdcaf7 prune #includes more.
llvm-svn: 92213
2009-12-28 08:26:43 +00:00
Chris Lattner
6dd4686b48 Metadata.h doesn't need to include ValueHandle.h anymore.
llvm-svn: 92211
2009-12-28 08:20:46 +00:00
Chris Lattner
739292d361 change the strange MetadataContext::getMDs function to expose less
irrelevant internal implementation details to clients.

llvm-svn: 92210
2009-12-28 08:14:54 +00:00
Chris Lattner
4967dbad20 change NamedMDNode to use a pimpl for its operand list instead
of making it a declared part of the value.

llvm-svn: 92209
2009-12-28 08:07:14 +00:00
Chris Lattner
0a47dbff64 eliminate the elem_* iterator stuff from NamedMDNode.
llvm-svn: 92208
2009-12-28 07:57:01 +00:00
Chris Lattner
19c825e082 move ElementVH out of the MDNode class into the MDNode.cpp file. Among
other things, this avoids vtable and rtti data for it being splatted in 
every translation unit that uses it.

llvm-svn: 92207
2009-12-28 07:41:54 +00:00
Sanjiv Gupta
d17915f6f0 Allow targets to specify the return type of libcalls that are generated for floating point comparisons, rather than hard-coding them as i32.
llvm-svn: 92199
2009-12-28 02:40:33 +00:00
Bill Wendling
baec6e54f4 Add an "ATTRIBUTE_UNUSED" macro (and use it). It's for variables which are
mainly used in debugging and/or assert situations. It should make the compiler
and the static analyzer stop nagging us about them.

llvm-svn: 92181
2009-12-28 01:20:29 +00:00
John McCall
75f1b8beeb Implement support for converting to string at "natural precision", and fix some
major bugs in long-precision conversion.

llvm-svn: 92150
2009-12-24 23:18:09 +00:00
John McCall
c71c44ec7f Add accessors for the largest-magnitude, smallest-magnitude, and
smallest-normalized-magnitude values in a given FP semantics.
Provide an APFloat-to-string conversion which I am quite ready to admit could
be much more efficient.

llvm-svn: 92126
2009-12-24 08:56:26 +00:00
David Greene
d411e1b728 Fix a comment.
llvm-svn: 92082
2009-12-23 23:19:43 +00:00
David Greene
1b160211dd Remove dump routine and the associated Debug.h from a header. Patch up
other files to compensate.

llvm-svn: 92075
2009-12-23 22:58:38 +00:00
David Greene
ac142c7e5d Convert debug messages to use dbgs(). Generally this means
s/errs/dbgs/g except for certain special cases.

llvm-svn: 92016
2009-12-23 18:25:37 +00:00
David Greene
ac3358994c Convert debug messages to use dbgs(). Generally this means
s/errs/dbgs/g except for certain special cases.

llvm-svn: 92013
2009-12-23 17:55:11 +00:00
David Greene
846ed71489 Convert debug messages to use dbgs(). Generally this means
s/errs/dbgs/g except for certain special cases.

llvm-svn: 92006
2009-12-23 17:24:22 +00:00
David Greene
32ec2e9057 Convert debug messages to use dbgs(). Generally this means
s/errs/dbgs/g except for certain special cases.

llvm-svn: 92005
2009-12-23 17:18:22 +00:00
David Greene
3f7cf289ed Provide dbgs(), a circular-buffering debug output stream. By default it
simply passes output to errs().  If -debug-buffer-size=N is set N > 0,
dbgs() buffers its output until program termination and dumps the last N
characters sent to it.  This is handy when debugging very large inputs.

llvm-svn: 92002
2009-12-23 16:39:06 +00:00
David Greene
f1f78a15e1 Add circular_raw_ostream, which buffers its output in a circular queue
and outputs it when explicitly flushed.  The intent is to use it in
situations such as debug output logging where a signal handler can take
care of flushing the buffer at program termination.

llvm-svn: 92001
2009-12-23 16:08:15 +00:00
Eric Christopher
ce677a909d Update objectsize intrinsic and associated dependencies. Fix
lowering code and update testcases.

llvm-svn: 91979
2009-12-23 02:51:48 +00:00
Anton Korobeynikov
903c2a0cb5 Restore snprintf weirdness for VCPP only
llvm-svn: 91918
2009-12-22 20:11:00 +00:00
Chris Lattner
e1abf0437c don't run GVN at -O1, GCC doesn't do it's equivalent at that optimization level.
llvm-svn: 91886
2009-12-22 04:47:41 +00:00
Chris Lattner
cd79ebb23c The phi translated pointer can be computed when returning a partially cached result
instead of stored.  This reduces memdep memory usage, and also eliminates a bunch of
weakvh's.  This speeds up gvn on gcc.c-torture/20001226-1.c from 23.9s to 8.45s (2.8x)
on a different machine than earlier.

llvm-svn: 91885
2009-12-22 04:25:02 +00:00
Bill Wendling
fc4c238bd5 Add more plumbing. This time in the LowerArguments and "get" functions which
return partial registers. This affected the back-end lowering code some.

Also patch up some places I missed before in the "get" functions.

llvm-svn: 91880
2009-12-22 02:10:19 +00:00
Chris Lattner
b70718aecc fix unit test that I broke.
llvm-svn: 91877
2009-12-22 01:38:23 +00:00
Chris Lattner
33b4e8a9b2 types don't need atomic inc/dec, they are local to an llvmcontext.
llvm-svn: 91873
2009-12-22 01:17:43 +00:00
Chris Lattner
41047d373d comment fix: weakvh -> tracking vh
llvm-svn: 91867
2009-12-22 00:51:57 +00:00
Lang Hames
64d9eb0c06 Changed slot index ranges for MachineBasicBlocks to be exclusive of endpoint.
This fixes an in-place update bug where code inserted at the end of basic blocks may not be covered by existing intervals which were live across the entire block. It is also consistent with the way ranges are specified for live intervals.

llvm-svn: 91859
2009-12-22 00:11:50 +00:00
Bill Wendling
97d31ee226 - Add a bit more plumbing assigning an order to SDNodes.
- Modify the "dump" method to emit the order of an SDNode.

llvm-svn: 91845
2009-12-21 21:59:52 +00:00
Anton Korobeynikov
299ec7d3e7 Remove uber-gross hack. The define _snprintf to snprintf is invalid due to two reasons: 1. Accroding to C++ standard snprintf should be available in std namespace (and __gnu_cxx in case of GCC to). Such ifdef will change all snprintf's to _snprintf's, but won't bring snprintf to all necessary namespaces. Thus e.g. any locale-using code on mingw will yield an error (include this file + string to see the result) 2. MSVCRT's _snprintf does not comply with C99 standard. Standard one is snprintf.
llvm-svn: 91842
2009-12-21 20:19:37 +00:00
Bill Wendling
ecb9172c96 Place SDNodeOrdering.h in the directory it's used.
llvm-svn: 91834
2009-12-21 19:34:59 +00:00
Eric Christopher
5c812e2396 Fix setting and default setting of code model for jit. Do this
by allowing backends to override routines that will default
the JIT and Static code generation to an appropriate code model
for the architecture.

Should fix PR 5773.

llvm-svn: 91824
2009-12-21 08:15:29 +00:00
Chris Lattner
609eded2e8 add a helper ctor.
llvm-svn: 91819
2009-12-21 07:15:15 +00:00
Eli Friedman
fe6a796851 Change StringRef::startswith and StringRef::endswith to versions which are a
bit more verbose, but optimize to much shorter code.

llvm-svn: 91817
2009-12-21 06:49:24 +00:00
Lang Hames
cd218ab335 Fixed use of phi param in SlotIndex constructors.
llvm-svn: 91790
2009-12-19 23:32:32 +00:00
Douglas Gregor
f39dd74a3f Fix a bunch of little errors that Clang complains about when its being pedantic
llvm-svn: 91764
2009-12-19 07:05:23 +00:00
Douglas Gregor
d8c669390b Remove spurious semicolon. Thanks, Clang
llvm-svn: 91752
2009-12-19 03:21:36 +00:00
Dan Gohman
b65e2548c8 Delete unused code.
llvm-svn: 91743
2009-12-19 01:47:13 +00:00
Chris Lattner
e390b70e2c Make some methods const. The only interesting change here is that
it changes raw_fd_ostream::preferred_buffer_size to return zero on
a scary stat failure instead of setting the stream to an error state.
This method really should not mutate the stream.

llvm-svn: 91740
2009-12-19 01:38:42 +00:00