Daniel Dunbar
995f9a8a15
Improve sys::Path::makeAbsolute on Win32.
...
- Patch by Viktor Kutuzov!
- Minor tweak by me to add llvm_unreachable calls on FIXMEd error paths.
llvm-svn: 75424
2009-07-12 20:23:56 +00:00
Nick Lewycky
dc5ef94320
Implement udiv for ConstantRanges.
...
llvm-svn: 75413
2009-07-12 05:18:18 +00:00
Nick Lewycky
6663d6ad6f
Implement ConstantRange::multiply based on the code in LoopVR.
...
llvm-svn: 75410
2009-07-12 02:19:05 +00:00
Torok Edwin
ae8a3ff177
assert(0) -> LLVM_UNREACHABLE.
...
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.
llvm-svn: 75379
2009-07-11 20:10:48 +00:00
Nick Lewycky
3e43cd4105
Fix handling of max and full set.
...
A full set is a constant range that represents any number. If you take the
umax of that and [5, 10) you end up with [5, INT_MAX] because the values less
than 5 would be umax's against a value which is at least 5.
llvm-svn: 75372
2009-07-11 19:22:21 +00:00
Nick Lewycky
58a6fd9824
Clarify and simplify.
...
llvm-svn: 75366
2009-07-11 17:04:01 +00:00
Torok Edwin
9b41a5faf2
Convert more assert(0)+abort() -> LLVM_UNREACHABLE,
...
and abort()/exit() -> llvm_report_error().
llvm-svn: 75363
2009-07-11 13:10:19 +00:00
Nick Lewycky
fee40fdcd9
Move a method that creates constant ranges relative to another constant range
...
per icmp predicate out of predsimplify and into ConstantRange.
Add another utility method that determines whether one range is a subset of
another. Combine with the former to determine whether icmp pred range, range
is known to be true or not.
llvm-svn: 75357
2009-07-11 06:15:39 +00:00
David Greene
a60479705b
Make changes suggested by Chris and eliminate newly-added raw_ostream
...
hooks as they're no longer needed.
The major change with this patch is to make formatted_raw_ostream usable
by any client of raw_ostream.
llvm-svn: 75283
2009-07-10 21:14:44 +00:00
David Greene
98610d5cfd
Add some hooks that a redesigned AsmStream needs to do its job. These
...
allow derived classes to examine the stream buffer before it's flushed.
llvm-svn: 75199
2009-07-09 23:43:41 +00:00
Dan Gohman
8a58b8f83b
Revert the part of 75177 that split ConstantRange into two classes, and
...
merge the new functionality and unittests into ConstantRange. Thanks to
Nick Lewycky for pointing out that it isn't necessary to have two separate
classes here.
llvm-svn: 75191
2009-07-09 23:16:10 +00:00
Dan Gohman
33251eff97
Add a ConstantSignedRange class, which does for signed integers
...
what ConstantRange does for unsigned integers. Factor out a
common base class for common functionality.
Add some new functions for performing arithmetic on constant
ranges. Some of these are currently just stubbed out with
conservative implementations.
Add unittests for ConstantRange and ConstantSignedRange.
llvm-svn: 75177
2009-07-09 22:07:27 +00:00
David Greene
3612687754
Add support for other GraphViz display tools. This can help
...
with very large graphs, where dot isn't necessarily the
most visually pleasing way of looking at the graph.
llvm-svn: 75144
2009-07-09 17:06:18 +00:00
David Greene
d185fbe8a1
Allow users of GraphWriter to display graphs asynchronously. This
...
provides a way to quickly dump a bunch of graph information to dot files
and display them. It's a timesaver when working on large systems.
llvm-svn: 75056
2009-07-08 21:53:41 +00:00
Mike Stump
99dbf32ce2
Fix build.
...
llvm-svn: 74936
2009-07-07 18:52:14 +00:00
Owen Anderson
75f0f1cc6c
Have scoped mutexes take referenes instead of pointers.
...
llvm-svn: 74931
2009-07-07 18:33:04 +00:00
Torok Edwin
b794d90868
Fix braces.
...
llvm-svn: 74923
2009-07-07 17:39:53 +00:00
Torok Edwin
375564339a
Introduce new error handling API.
...
This will replace exit()/abort() style error handling with an API
that allows clients to register custom error handling hooks.
The default is to call exit(1) when no error handler is provided.
llvm-svn: 74922
2009-07-07 17:32:34 +00:00
Chris Lattner
d49e5380ec
switch the .ll parser to use SourceMgr.
...
llvm-svn: 74735
2009-07-02 23:08:13 +00:00
Chris Lattner
1e3e84eb39
add an explicit class for holding llvm::SourceMgr diagnostics and use
...
it to print them. This gives us column numbers in the diag line. Before:
t.s:4: error: unexpected token in argument list
mov %eax %edx
^
now:
t.s:4:11: error: unexpected token in argument list
mov %eax %edx
^
llvm-svn: 74732
2009-07-02 22:24:20 +00:00
Daniel Dunbar
8247f1ffe2
Tweak FindExecutable so that relative executable paths work as well.
...
llvm-svn: 74645
2009-07-01 21:36:28 +00:00
Daniel Dunbar
2b25b9ba77
Fix FindExecutable to work if given an absolute executable path name.
...
- Patch by Viktor Kutuzov, with tweaks by me.
llvm-svn: 74608
2009-07-01 15:26:13 +00:00
Dan Gohman
148d3bb9b4
Reapply 74494, this time removing the conflicting definition of operator<<
...
in APIntTest.cpp.
llvm-svn: 74550
2009-06-30 20:10:56 +00:00
Bill Wendling
1121a4ce5e
Temporarily revert r74494. It was causing failures in the unit tests.
...
llvm-svn: 74515
2009-06-30 07:05:27 +00:00
Owen Anderson
4b4ba9f06c
Fix the build on Cygwin. Patch by Aaron Gray.
...
llvm-svn: 74510
2009-06-30 05:33:46 +00:00
Dan Gohman
f207911974
Define an operator<< for APInt to be used with std::ostream.
...
This will allow it to be used in unittests that use gtest's
EXPECT_EQ.
llvm-svn: 74494
2009-06-30 01:28:08 +00:00
Daniel Dunbar
5bec168037
Normalize SourceMgr messages.
...
- Don't print "Parsing" in front of every message.
- Take additional "type" argument which is prepended to the message (with ": ")
if given.
- Update clients to print errors (warnings) as:
<filename>:<line number>: error(warning): ...
llvm-svn: 74489
2009-06-30 00:49:23 +00:00
Duncan Sands
efb6d3b78e
Add triple for OpenBSD.
...
llvm-svn: 74422
2009-06-29 13:36:13 +00:00
Owen Anderson
1069071612
Use atomic operations for accessing this global counter.
...
llvm-svn: 74294
2009-06-26 18:09:03 +00:00
Douglas Gregor
6d9b0e8c19
Fix linking of llvm-ld and lli with CMake, from Xerxes Rånby
...
llvm-svn: 74285
2009-06-26 15:37:00 +00:00
Owen Anderson
5417ad7e3b
Support thread-local pretty stack traces.
...
llvm-svn: 74227
2009-06-25 23:31:33 +00:00
Owen Anderson
2d65e89f30
Use atomic operations when accessing statistics, and make the lazy initialization of statistics actually threadsafe.
...
llvm-svn: 74005
2009-06-23 21:19:38 +00:00
Owen Anderson
226e1d8bda
Make timers threadsafe again. This isn't quite as nice as I'd hoped (it uses locking rather than atomic arithmetic),
...
but should work on all the platforms we care about.
I might revisit this if a totally awesome way to do it occurs to me.
llvm-svn: 74002
2009-06-23 20:52:29 +00:00
Owen Anderson
c11dfb46c1
Revert my last series of commits related to Timer and 64-bit atomics. Not all the targets
...
we care about are capable of supporting it.
llvm-svn: 73993
2009-06-23 20:17:22 +00:00
Lang Hames
7640e42869
Switched size_t to int64_t to prevent type mismatch in call to max.
...
llvm-svn: 73988
2009-06-23 19:49:23 +00:00
Owen Anderson
27a85303fe
Actually, these need to be signed integers, not unsigned.
...
llvm-svn: 73978
2009-06-23 18:21:13 +00:00
Owen Anderson
7b3570b242
Use 64-bit integer counters for tracking time, rather than doubles. This will be more atomic op friendly.
...
llvm-svn: 73974
2009-06-23 18:12:30 +00:00
Owen Anderson
24a1453189
Make the lazy initialization of DefaultTimerGroup threadsafe.
...
llvm-svn: 73963
2009-06-23 17:33:37 +00:00
Owen Anderson
0cab9cae36
Revert r73923, which broke clang.
...
llvm-svn: 73957
2009-06-23 16:36:10 +00:00
Owen Anderson
7bce26b269
Guard the plugin loader.
...
llvm-svn: 73925
2009-06-23 00:02:39 +00:00
Owen Anderson
f00516f54d
Add guards around timer groups, which can be shared.
...
llvm-svn: 73923
2009-06-22 23:37:06 +00:00
Owen Anderson
9826df9126
Guard the statistics table.
...
llvm-svn: 73916
2009-06-22 23:08:27 +00:00
Owen Anderson
d6704d5985
Guard the global annotation tables.
...
llvm-svn: 73913
2009-06-22 22:44:15 +00:00
Chris Lattner
dd95ab3ca9
rename SourceMgr::PrintError to PrintMessage.
...
llvm-svn: 73861
2009-06-21 21:22:11 +00:00
Chris Lattner
c865ea76a6
move include searching logic from TGLexer to SourceMgr.
...
llvm-svn: 73845
2009-06-21 05:06:04 +00:00
Chris Lattner
5b9a2d79c0
Rename TGSourceMgr -> SourceMgr.
...
llvm-svn: 73844
2009-06-21 03:41:50 +00:00
Chris Lattner
4ff2620742
rename TGLoc -> SMLoc.
...
llvm-svn: 73843
2009-06-21 03:39:35 +00:00
Chris Lattner
4ed87b8790
move TGSourceMgr class out of TableGen into libsupport.
...
llvm-svn: 73842
2009-06-21 03:36:54 +00:00
Duncan Sands
30dcb8401d
Add support for AuroraUX. Patch by evocallaghan.
...
llvm-svn: 73766
2009-06-19 14:40:01 +00:00
Ted Kremenek
e88e953645
Update CMake files to account for new location of Threading.cpp.
...
llvm-svn: 73708
2009-06-18 17:47:09 +00:00