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

1358 Commits

Author SHA1 Message Date
Benjamin Kramer
cd6c025b08 Push twines deeper into SourceMgr's error handling methods.
llvm-svn: 114847
2010-09-27 17:42:11 +00:00
Dan Gohman
08f59bde05 Delete an unused declaration.
llvm-svn: 114839
2010-09-27 16:54:49 +00:00
Dan Gohman
773c8a1c76 Add support for viewing graphviz graphs with xdot.py.
llvm-svn: 114832
2010-09-27 16:28:34 +00:00
Duncan Sands
c128b42eb8 Add better support for environment portion of triple. Original patch by
Cameron Esfahani, tweaked to use array_lengthof.

llvm-svn: 114073
2010-09-16 08:25:48 +00:00
Duncan Sands
82768f4f13 Some versions of gcc still warn about "ignoring return value ... declared
with attribute warn_unused_result" here - suppress the warning harder.

llvm-svn: 114072
2010-09-16 08:20:49 +00:00
Nick Lewycky
cad1395824 Create PTX backend. Patch by Che-Liang Chiou!
llvm-svn: 113235
2010-09-07 18:14:24 +00:00
Nick Lewycky
9698dae1df Add completely hokey binary-and and binary-or operations to ConstantRange and
teach LazyValueInfo to use them.

llvm-svn: 113196
2010-09-07 05:39:02 +00:00
Nick Lewycky
ca54f909d8 Add a new isSignWrappedSet() method to ConstantRange.
Fix zeroExtend and signExtend to support empty sets, and to return the smallest
possible result set which contains the extension of each element in their
inputs. For example zext i8 [100, 10) to i16 is now [0, 256), not i16 [100, 10)
which contains 63446 members.

llvm-svn: 113187
2010-09-06 23:52:49 +00:00
Dan Gohman
603d00d632 Use the FindProgramByName fallback only with known absolute paths.
I wasn't able to convince myself that all GetMainExecutable
implementations always return absolute paths; this prevents
unexpected behavior in case they ever don't.

llvm-svn: 112888
2010-09-02 22:32:38 +00:00
John McCall
b91df6e799 After some discussion with djg, teach SmallVector to grow from a zero
capacity and remove the workaround in SmallVector<T,0>.  There are some
theoretical benefits to a N->2N+1 growth policy anyway.

llvm-svn: 112870
2010-09-02 21:55:03 +00:00
NAKAMURA Takumi
500a204a62 llvm::FindExecutable(): Retrieve the name with suffix.exe, if available.
bugpoint uses it.

llvm-svn: 112803
2010-09-02 03:46:04 +00:00
Dan Gohman
f9e09104f1 Make tool_output_file's raw_ostream instance a member variable instead
of a base class.

This makes it possible to unregister the file from FilesToRemove when
the file is done. Also, this eliminates the need for
formatted_tool_output_file.

llvm-svn: 112706
2010-09-01 14:20:41 +00:00
Duncan Sands
3e49fe09db Remove a hack that tries to understand incorrect triples from the
Triple class constructor.  Only valid triples should now be used
inside LLVM - front-ends are now responsable for rejecting or
correcting invalid target triples.  The Triple::normalize method
can be used to straighten out funky triples provided by users.
Give this a whirl through the buildbots to see if I caught all
places where triples enter LLVM.

llvm-svn: 112470
2010-08-30 10:57:54 +00:00
Benjamin Kramer
7dcd303d9c StringRef::compare_numeric also differed from StringRef::compare for characters > 127.
llvm-svn: 112189
2010-08-26 15:25:35 +00:00
Benjamin Kramer
25003daf90 Do unsigned char comparisons in StringRef::compare_lower to be more consistent with compare in corner cases.
llvm-svn: 112185
2010-08-26 14:21:08 +00:00
Dan Gohman
8d2ed57538 Use Bits.data() instead of &Bits[0].
llvm-svn: 111993
2010-08-24 23:16:53 +00:00
Benjamin Kramer
926ba6058b Avoid O(n*m) complexity in StringRef::find_first(_not)_of(StringRef).
- Cache used characters in a bitset to reduce memory overhead to just 32 bytes.
- On my core2 this code is faster except when the checked string was very short
  (smaller than the list of delimiters).

llvm-svn: 111817
2010-08-23 18:16:08 +00:00
Benjamin Kramer
482435cdb0 Update CMake build.
llvm-svn: 111669
2010-08-20 18:56:46 +00:00
Dan Gohman
730afb791f Delete SlowOperationInformer, which is no longer used.
llvm-svn: 111661
2010-08-20 18:07:37 +00:00
Dan Gohman
b316c3de4e Make outs() close its file when its stream is destructed, so that
pending output errors are detected.

llvm-svn: 111643
2010-08-20 16:44:56 +00:00
Dan Gohman
20fe555d22 Delete raw_stdout_ostream and raw_stderr_ostream, which are unused
outside of outs() and errs() themselves, and they don't really
need custom classes.

llvm-svn: 111642
2010-08-20 16:39:41 +00:00
Dan Gohman
4d1241b6b6 Move raw_ostream's Error flag into raw_fd_ostream, as that's the only
class which is using it.

llvm-svn: 111639
2010-08-20 16:34:20 +00:00
Dan Gohman
d88735e805 Introduce a new tool_output_file class, which extends raw_ostream with
functionality that most command-line tools need: ensuring that the
output file gets deleted if the tool is interrupted or encounters an
error.

llvm-svn: 111595
2010-08-20 00:48:10 +00:00
Dale Johannesen
579b1bef32 Do not assert when reading an exponent out of range.
llvm-svn: 111534
2010-08-19 17:58:35 +00:00
Dan Gohman
95e334dbca Make raw_fd_ostream consider itself the owner of STDOUT_FILENO when
constructed with an output filename of "-". In particular, allow the
file descriptor to be closed, and close the file descriptor in the
destructor if it hasn't been explicitly closed already, to ensure
that any write errors are detected.

llvm-svn: 111436
2010-08-18 22:26:19 +00:00
Dan Gohman
b1aa643484 Tidy.
llvm-svn: 111432
2010-08-18 22:04:43 +00:00
Dan Gohman
95cda1f1ef Revert r111321. This doesn't fix a problem.
llvm-svn: 111339
2010-08-18 01:34:52 +00:00
Chris Lattner
ba9f26fade stomp some more undefined behavior, PR7775.
llvm-svn: 111337
2010-08-18 00:33:47 +00:00
Chris Lattner
116d5c1431 include config.h to get config params, hopefully unbreaking mingw builder.
llvm-svn: 111325
2010-08-17 23:22:10 +00:00
Chris Lattner
1657977d0d Fix the rest of rdar://8318441 which happens when a raw_fd_ostream
(e.g. errs()) fails in close() due to (e.g.) a broken pipe.  As
previously written, the had_error() flag would get set and then
the raw_ostream dtor would report a fatal error.  There is nothing
the client can do about this and we have no way to report the error,
so just eat it.

llvm-svn: 111321
2010-08-17 23:11:56 +00:00
Chris Lattner
659fd704e8 report_fatal_error can't use errs(), because errs() can call
into report_fatal_error.  Just blast the string to stderr with write(2)
and hope for the best!  Part of rdar://8318441

llvm-svn: 111320
2010-08-17 23:03:53 +00:00
Daniel Dunbar
e88f283f80 CrashRecovery: Clear the current context on the first crash, to avoid re-entering it if the cleanup code crashes.
llvm-svn: 111309
2010-08-17 22:32:39 +00:00
Daniel Dunbar
b5312b0f26 CrashRecovery: Add CrashRecoveryContext::GetCurrent(), so clients can find the active context from anywhere.
llvm-svn: 111308
2010-08-17 22:32:37 +00:00
Daniel Dunbar
0fc35d7284 CrashRecovery: Make CrashRecoveryContext static methods thread safe.
llvm-svn: 111307
2010-08-17 22:32:34 +00:00
Jim Grosbach
4cf3acbde6 remove trailing whitespace
llvm-svn: 111254
2010-08-17 17:37:22 +00:00
Dan Gohman
06963ff7c4 Add hooks to FoldingSetTrait to allow specializations to provide
implementations of equality comparison and hash computation. This
can be used to optimize node lookup by avoiding creating lots of
temporary ID values just for hashing and comparison purposes.

llvm-svn: 111130
2010-08-16 15:30:39 +00:00
Dan Gohman
4446294688 Reverse the order of GetNodeProfile's arguments, for consistency
with FoldingSetTrait::Profile.

llvm-svn: 111127
2010-08-16 14:53:42 +00:00
Duncan Sands
6f5776e1d2 Add a 'normalize' method to the Triple class, which takes a mucked up
target triple and straightens it out.  This does less than gcc's script
config.sub, for example it turns i386-mingw32 into i386--mingw32 not
i386-pc-mingw32, but it does a decent job of turning funky triples into
something that the rest of the Triple class can understand.  The plan
is to use this to canonicalize triple's when they are first provided
by users, and have the rest of LLVM only deal with canonical triples.
Once this is done the special case workarounds in the Triple constructor
can be removed, making the class more regular and easier to use.  The
comments and unittests for the Triple class are already adjusted in this
patch appropriately for this brave new world of increased uniformity.

llvm-svn: 110909
2010-08-12 11:31:39 +00:00
Nick Lewycky
90e835b327 Clean up ConstantRange a bit:
- remove ashr which never worked.
 - fix lshr and shl and add tests.
 - remove dead function "intersect1Wrapped".
 - add a new sub method to subtract ranges, with test.

llvm-svn: 110861
2010-08-11 22:04:36 +00:00
Eric Christopher
bdc651b7c3 Fix a couple of warnings.
llvm-svn: 110527
2010-08-08 00:00:34 +00:00
Benjamin Kramer
a7febd985f Roll back my last two commits, valgrind complains.
llvm-svn: 110518
2010-08-07 13:27:41 +00:00
Benjamin Kramer
70df356537 Kill rarely used std::sort.
llvm-svn: 110516
2010-08-07 12:37:00 +00:00
Owen Anderson
d17104afda Remove layering violation.
llvm-svn: 110505
2010-08-07 06:01:13 +00:00
Owen Anderson
e59c4411b3 Add an inverse() method to ConstantRange.
llvm-svn: 110504
2010-08-07 05:47:46 +00:00
Owen Anderson
31ced50119 Add a convenience constructor.
llvm-svn: 110493
2010-08-07 00:42:06 +00:00
Chris Lattner
aa6eb3d13d avoid undef behavior on minint, fixing PR7783.
llvm-svn: 110114
2010-08-03 16:41:24 +00:00
Daniel Dunbar
c97e760282 Fix -Wmissing-field-initializers warnings.
llvm-svn: 109872
2010-07-30 17:49:04 +00:00
Daniel Dunbar
d516b0a1bd CrashRecovery: Use ThreadLocal::erase() instead of set(0).
llvm-svn: 109752
2010-07-29 15:24:21 +00:00
Daniel Dunbar
d62252d9f8 Make sure to include config.h, to pickup LLVM_ON_WIN32.
llvm-svn: 109721
2010-07-29 01:52:04 +00:00
Daniel Dunbar
a5b23b4df1 CrashRecoveryContext: Add a simple POSIX implementation.
- This works, but won't handle crashes on stack overflow, or signals delivered
   to a thread other than the one that crashed. The latter is particular annoying
   on Darwin, because SIGABRT tends to go to the main thread.

llvm-svn: 109717
2010-07-29 01:21:47 +00:00