Commit Graph

918 Commits

Author SHA1 Message Date
Dan Gohman
a3755d8d36 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75177 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 22:07:27 +00:00
David Greene
00ad26ff57 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75144 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 17:06:18 +00:00
David Greene
229509a8bc 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75056 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 21:53:41 +00:00
Mike Stump
d33007eb5f Fix build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74936 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:52:14 +00:00
Owen Anderson
a9d1f2c559 Have scoped mutexes take referenes instead of pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74931 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:33:04 +00:00
Torok Edwin
f361238a93 Fix braces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74923 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 17:39:53 +00:00
Torok Edwin
31e2466f15 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74922 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 17:32:34 +00:00
Chris Lattner
eeb4a84ac8 switch the .ll parser to use SourceMgr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74735 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 23:08:13 +00:00
Chris Lattner
2f510aed9c 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
          ^



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74732 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 22:24:20 +00:00
Daniel Dunbar
74a81813c2 Tweak FindExecutable so that relative executable paths work as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74645 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 21:36:28 +00:00
Daniel Dunbar
93696a38b7 Fix FindExecutable to work if given an absolute executable path name.
- Patch by Viktor Kutuzov, with tweaks by me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74608 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 15:26:13 +00:00
Dan Gohman
38a253ddf7 Reapply 74494, this time removing the conflicting definition of operator<<
in APIntTest.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74550 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 20:10:56 +00:00
Bill Wendling
527b6e6292 Temporarily revert r74494. It was causing failures in the unit tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74515 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 07:05:27 +00:00
Owen Anderson
5ec56cc438 Fix the build on Cygwin. Patch by Aaron Gray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74510 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 05:33:46 +00:00
Dan Gohman
670031666c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74494 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 01:28:08 +00:00
Daniel Dunbar
3fb7683bec 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): ...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74489 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 00:49:23 +00:00
Duncan Sands
cd1267d2d6 Add triple for OpenBSD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74422 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 13:36:13 +00:00
Owen Anderson
cb73734247 Use atomic operations for accessing this global counter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 18:09:03 +00:00
Douglas Gregor
8947881444 Fix linking of llvm-ld and lli with CMake, from Xerxes Rånby
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74285 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 15:37:00 +00:00
Owen Anderson
0b49c32c56 Support thread-local pretty stack traces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74227 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 23:31:33 +00:00
Owen Anderson
92915e31e9 Use atomic operations when accessing statistics, and make the lazy initialization of statistics actually threadsafe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74005 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 21:19:38 +00:00
Owen Anderson
46d9a64944 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74002 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 20:52:29 +00:00
Owen Anderson
6f2c64d70a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73993 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 20:17:22 +00:00
Lang Hames
b2889959c4 Switched size_t to int64_t to prevent type mismatch in call to max.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73988 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 19:49:23 +00:00
Owen Anderson
14112e5169 Actually, these need to be signed integers, not unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73978 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 18:21:13 +00:00
Owen Anderson
cd92c1000e Use 64-bit integer counters for tracking time, rather than doubles. This will be more atomic op friendly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73974 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 18:12:30 +00:00
Owen Anderson
3b8d135879 Make the lazy initialization of DefaultTimerGroup threadsafe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73963 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 17:33:37 +00:00
Owen Anderson
200aa6d89b Revert r73923, which broke clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73957 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 16:36:10 +00:00
Owen Anderson
61ffc0c7fd Guard the plugin loader.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73925 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 00:02:39 +00:00
Owen Anderson
af2e2b54b6 Add guards around timer groups, which can be shared.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73923 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 23:37:06 +00:00
Owen Anderson
5de83afcdc Guard the statistics table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73916 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 23:08:27 +00:00
Owen Anderson
521db56182 Guard the global annotation tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73913 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 22:44:15 +00:00
Chris Lattner
14ee48a5ba rename SourceMgr::PrintError to PrintMessage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73861 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 21:22:11 +00:00
Chris Lattner
7ee5d5f97b move include searching logic from TGLexer to SourceMgr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73845 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 05:06:04 +00:00
Chris Lattner
8070ea3f06 Rename TGSourceMgr -> SourceMgr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73844 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 03:41:50 +00:00
Chris Lattner
1e3a8a4924 rename TGLoc -> SMLoc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73843 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 03:39:35 +00:00
Chris Lattner
099e198ae8 move TGSourceMgr class out of TableGen into libsupport.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73842 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 03:36:54 +00:00
Duncan Sands
852cd112ed Add support for AuroraUX. Patch by evocallaghan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73766 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-19 14:40:01 +00:00
Ted Kremenek
e53118ea32 Update CMake files to account for new location of Threading.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73708 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 17:47:09 +00:00
Owen Anderson
e3cd5ca7e7 Move Threading.[h|cpp] from Support to System.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73707 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 16:54:52 +00:00
Owen Anderson
1cca27ebb6 Add newline at end of file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73551 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 20:53:09 +00:00
Douglas Gregor
dd0ae752ed Add Threading.cpp to the CMake project files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73516 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 17:45:38 +00:00
Owen Anderson
4c7ac18fc9 Split the thread-related APIs out into their own file, and add a few more
calls for convenience.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73512 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 17:33:51 +00:00
Torok Edwin
e8ebb0fe1b Add support for outputting ANSI colors to raw_fd_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72854 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 07:09:50 +00:00
Mike Stump
c5ca713b80 Add support for letting the client choose different flavors of NaNs. Testcase to be
added in clang.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72606 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-30 03:49:43 +00:00
Bill Wendling
51b16f4737 Untabification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72604 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-30 01:09:53 +00:00
Douglas Gregor
0d09b83a48 Minor fix for CMake build system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72480 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27 16:52:17 +00:00
Daniel Dunbar
7eaf057e54 Add llvm::triple constructor from arch, vendor, os strings, and recognize
DragonFly OS type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72242 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-22 02:24:11 +00:00
Evan Cheng
cf69a743b7 80 column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72235 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-21 23:47:47 +00:00
Owen Anderson
6afe2fa288 Have llvm_start_multithreaded return a bool indicating whether multithreaded
initialization succeeded or not, rather than just asserting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72182 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20 21:03:06 +00:00