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

582 Commits

Author SHA1 Message Date
Reid Spencer
b27fcd8cb6 Clean up variable names in operator*.
Attempt #3 for getting a portable INFINITY value.

llvm-svn: 34454
2007-02-20 20:42:10 +00:00
Reid Spencer
4caebb1af8 Use INFINITY macro from math.h instead of constructing hex floating point
constants (avoids warnings).

llvm-svn: 34452
2007-02-20 18:29:12 +00:00
Reid Spencer
80b41ab5f7 First version that can process arith.cpp test case up to 1024 bits:
1. Ensure pVal is set to 0 in each constructor.
2. Fix roundToDouble to make correct calculations and not read beyond the
   end of allocated memory.
3. Implement Knuth's "classical algorithm" for division from scratch and
   eliminate buffer overflows and uninitialized mememory reads. Document
   it properly too.
4. Implement a wrapper function for KnuthDiv which handles the 64-bit to
   32-bit conversion and back. It also implement short division for the
   n == 1 case that Knuth's algorithm can't handle.
5. Simplify the logic of udiv and urem a little, make them exit early, and
   have them use the "divide" wrapper function to perform the division
   or remainder operation.
6. Move the toString function to the end of the file, closer to where
   the division functions are located.

Note: division is still broken for some > 64 bit values, but at least it
      doesn't crash any more.
llvm-svn: 34449
2007-02-20 08:51:03 +00:00
Chris Lattner
b22fb7fc60 Not all managedstatics need object pointers.
llvm-svn: 34444
2007-02-20 06:18:57 +00:00
Reid Spencer
a177605511 1. Fix some indentation and variable names in the get{Min,Max}Value methods.
2. Implement toString for power-of-2 radix without using divide and always
   printing full words. This allows hex/binary to look at the bit
   respresentation of the APInt as well as avoid bugs in divide.

llvm-svn: 34396
2007-02-18 22:29:05 +00:00
Reid Spencer
ce1322ccf6 1. Use APINT_WORD_SIZE instead of sizeof(uint64_t)
2. Teach slt about signedness.
3. Teach roundToDouble to properly sign extend.

llvm-svn: 34391
2007-02-18 20:09:41 +00:00
Reid Spencer
035cf2fca2 1. Remove dead code (lshift function).
2. Consolidate memory allocation into just two inline functions.
3. Convert "unsigned" to uint32_t to gaurantee its size.
4. Eliminate magic constants and replace with symbolic equivalent.
5. Improve code documentation slightly.
6. Simplify the logical operator code because bitwidths must be the same.
7. Fix indentation per coding standards.
8. Use exit-early style to reduce indentation in several functions.

llvm-svn: 34389
2007-02-18 18:38:44 +00:00
Reid Spencer
19f4e9457e Make add_1 exit early if carry is 0.
Fix line breaks and 80 cols violation.
Simplify operator^= since bitwidths must be the same.

llvm-svn: 34388
2007-02-18 06:39:42 +00:00
Reid Spencer
62b55a934b Implement signed output for toString.
Fix bugs in countLeadingZeros and countTrailingZeros.

llvm-svn: 34386
2007-02-18 00:44:22 +00:00
Reid Spencer
3390126870 Fix some bugs in division logic.
llvm-svn: 34384
2007-02-17 22:38:07 +00:00
Reid Spencer
401a49c4e2 Move static functions closer to their usage.
llvm-svn: 34363
2007-02-17 03:16:00 +00:00
Reid Spencer
31731e9a99 Clean up the divide and remainder logic a bit (exit early). Use more
meaningful variable names. Add comments to document the flow.

llvm-svn: 34362
2007-02-17 02:07:07 +00:00
Reid Spencer
9c5efbcef2 Fix bugs introduced by constructor parameter order change.
llvm-svn: 34357
2007-02-17 00:18:01 +00:00
Reid Spencer
d22266f456 Review changes:
1. Function style changes.
2. 80-col violations.
3. Better names for things.
4. Arrange constructors so they all take bit width first.
5. Add named signed and unsigned comparison functions and remove the
   corresponding operators.
6. Remove operator&& and operator|| but provide a getBoolValue function which
   converts to bool as comparison against 0. This allows the normal && and
   || operators to be used as if (X.getBoolValue() && Y.getBoolValue())

Note: this still doesn't function 100% yet. I'm working on the bugs now.
llvm-svn: 34353
2007-02-16 22:36:51 +00:00
Anton Korobeynikov
87e945c62d Add possibility to set memory limit for binaries run via libSystem. This
is especially needed for bugpoint. This partly implements PR688

llvm-svn: 34349
2007-02-16 19:11:07 +00:00
Zhou Sheng
9868d8d7db Fix some buges:
1. Make getMinValue() returns the right value.
2. Fix the ByteSwap() crash problem.
3. Make Postfix increment work correctly.
4. Fix some bugs in LogBase2, Hi/LoBits and UDiv.

llvm-svn: 34304
2007-02-15 06:36:31 +00:00
Reid Spencer
5e1e7c4e59 Use brute-force algorithm for to_string. It doesn't have to be efficient
at this point, it just needs to work so we can test things reliably.

llvm-svn: 34262
2007-02-14 02:52:25 +00:00
Reid Spencer
80ac48cfdf Make some minor improvements to APInt:
1. Make all the operators use uppercase
2. Rename APIntRoundToDouble method just RoundToDouble, the APInt is
   redundant.
3. Turn the class on for compilation.

llvm-svn: 34253
2007-02-13 22:41:58 +00:00
Zhou Sheng
7b47556f5c 1. Make APInt::shl work correctly and more efficiently.
2. Add functions to support the numberical conversion between APInt and
   double/float.

llvm-svn: 34201
2007-02-12 20:02:55 +00:00
Chris Lattner
ce3f5f906a Add support for removing elements out of StringMap.
llvm-svn: 34185
2007-02-11 20:58:00 +00:00
Chris Lattner
3a9d38035f Replace the ugly FindValue method with STL-like find methods.
llvm-svn: 34183
2007-02-11 19:49:41 +00:00
Chris Lattner
f1e2e9e259 remove support for stringmap visitors now that iterators exist.
llvm-svn: 34180
2007-02-11 08:22:15 +00:00
Chris Lattner
e98f4bc0ce add support for iterators.
llvm-svn: 34179
2007-02-11 08:20:35 +00:00
Zhou Sheng
20d0f4e319 Eliminates friend function declaration inside APInt, instead, adds public
methods as those global function's internal implementation.

llvm-svn: 34083
2007-02-09 07:48:24 +00:00
Chris Lattner
d16cc5ebcb Rename CStringMap -> StringMap, since it now supports nul characters in the
strings.

llvm-svn: 34064
2007-02-08 19:20:57 +00:00
Chris Lattner
3705cf294c Allow cstringmap to contain strings with nul characters in them.
llvm-svn: 34062
2007-02-08 19:08:37 +00:00
Zhou Sheng
a6babf6288 Switched this file on accidently.
llvm-svn: 34054
2007-02-08 16:45:48 +00:00
Zhou Sheng
6efcdc8049 As Chris and Reid suggested, remove "isSigned" field from APInt, instead,
add some signed/unsigned arithmetic operation functions into APInt.h to
handle the signed/unsigned issue. These functions will be defined inside a
namespace "APIntOps" which is inside llvm namespace.

llvm-svn: 34053
2007-02-08 14:35:19 +00:00
Zhou Sheng
9495a1a5c7 As Chris suggested, fixed some problems. (This is the first part)
llvm-svn: 33989
2007-02-07 06:14:53 +00:00
Chris Lattner
2c3df2a958 do not let the table fill up with tombstones.
llvm-svn: 33973
2007-02-07 01:11:25 +00:00
Zhou Sheng
cdcd2d0201 As Reid suggested, fixed some problems.
llvm-svn: 33955
2007-02-06 06:04:53 +00:00
Chris Lattner
5a58c58552 Disable this for now.
llvm-svn: 33953
2007-02-06 05:38:37 +00:00
Zhou Sheng
677cc21b01 Add a class APInt to represent arbitrary precision constant integral values.
It is a functional replacement for common case integer type like "unsigned",
"uint64_t", but also allows non-byte-width integer type and large integer
value types such as 3-bits, 15-bits, or more than 64-bits of precision. For
more details, see pr1043.

llvm-svn: 33951
2007-02-06 03:00:16 +00:00
Chris Lattner
153ccbe7f9 Fix a bug in smallptrset::erase: in the small case, return true if the
element was in the set.

llvm-svn: 33931
2007-02-05 23:10:31 +00:00
Chris Lattner
8b8100ecf5 Encode small integers more densely in foldingset, avoiding overflowing the SmallVector as often.
llvm-svn: 33864
2007-02-04 01:48:10 +00:00
Chris Lattner
9795be05c4 improve comments, add an assertion
llvm-svn: 33750
2007-02-01 05:33:21 +00:00
Devang Patel
46a1a617f5 Add PrintVersionMessage() that tools can use to print version number
without exiting program.

llvm-svn: 33737
2007-02-01 01:43:37 +00:00
Reid Spencer
6d6e7a072b Add some debug output.
llvm-svn: 33718
2007-01-31 21:27:38 +00:00
Chris Lattner
b8f4cada84 minor cleanups. Fix off-by-one in accounting the number of nodes when the
table grows.

llvm-svn: 33698
2007-01-31 06:04:41 +00:00
Chris Lattner
6bd1447e03 reformat comment
llvm-svn: 33675
2007-01-30 23:16:22 +00:00
Chris Lattner
2ca5edd29e implement SmallPtrSet::erase
llvm-svn: 33581
2007-01-27 07:59:10 +00:00
Chris Lattner
a7fec4020b add a note
llvm-svn: 33578
2007-01-27 07:18:32 +00:00
Chris Lattner
22513a4828 Add a new SmallSet ADT specialized for pointers.
llvm-svn: 33577
2007-01-27 07:10:46 +00:00
Anton Korobeynikov
2079992c16 Moved disassembler to libSystem
llvm-svn: 33461
2007-01-23 10:26:08 +00:00
Anton Korobeynikov
944088f221 Adding disassembler interface and external hook to udis86 library.
llvm-svn: 33358
2007-01-19 17:25:17 +00:00
Chris Lattner
051f1b7f78 wow, the link was already broken :)
llvm-svn: 32963
2007-01-06 23:20:51 +00:00
Chris Lattner
94f6358ce0 add a note
llvm-svn: 32962
2007-01-06 23:19:38 +00:00
Bill Wendling
05f7a367a2 The previous implementation of LLVM Streams wasn't removing symbols. This
one should.

llvm-svn: 32845
2007-01-03 22:37:27 +00:00
Chris Lattner
87e0f0787e eliminate constructor from Statistic class. It is now impossible to get a
static constructor for them :).   Transition complete.

llvm-svn: 32710
2006-12-19 23:17:40 +00:00
Chris Lattner
c18ec8716e Refactor statistic a big and introduce a horrible-but-necessary macro
(STATISTIC), which allows us to define statistics that don't introduce
static ctors into the .o files.  I'm migrating code over to use this
incrementally.

llvm-svn: 32687
2006-12-19 21:27:47 +00:00
Bill Wendling
7f6a73eb5c Added an automatic cast to "std::ostream*" etc. from OStream. We then can
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.

llvm-svn: 32636
2006-12-17 05:15:13 +00:00
Chris Lattner
9c52dc6c34 Change the implementation of statistic to not need destructors at all.
Instead, the stat info is printed when llvm_shutdown() is called.
These also don't need static ctors, but getting rid of them is uglier:
still investigating.  This reduces the number of static dtors in llvm from
~1400 to ~750.

llvm-svn: 32372
2006-12-08 20:00:42 +00:00
Bill Wendling
fe0af72bc4 Don't use <sstream> in Streams.h but <iosfwd> instead.
llvm-svn: 32340
2006-12-07 23:41:45 +00:00
Bill Wendling
4d1444725b Removed more <iostream> includes
llvm-svn: 32321
2006-12-07 20:28:15 +00:00
Bill Wendling
a3246c4272 Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.

llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Chris Lattner
e626f6de68 merge the Statistic and StatisticBase classes, eliminating virtual methods
and eliminating #includes from the Statistic.h file.

llvm-svn: 32282
2006-12-06 18:20:44 +00:00
Chris Lattner
a531ce882e Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'.

llvm-svn: 32279
2006-12-06 17:46:33 +00:00
Chris Lattner
339c732e0b Add a helper function
llvm-svn: 31981
2006-11-28 22:32:35 +00:00
Bill Wendling
d933b6630c Removed #include <iostream> and replace with llvm_* streams.
llvm-svn: 31927
2006-11-26 10:52:51 +00:00
Reid Spencer
b1fe5794f7 Make the absolute/relative tolerance information easier to read/understand.
llvm-svn: 31908
2006-11-25 08:38:44 +00:00
Bill Wendling
a3ba38284c Moved definition of llvm_ostream wrappers to the Streams.cpp file.
llvm-svn: 31819
2006-11-17 09:54:47 +00:00
Bill Wendling
dbbb5112c5 Added wrappers for the std::cerr/std::cout objects. The wrappers will
soon replace all uses of those objects.

llvm-svn: 31817
2006-11-17 09:51:22 +00:00
Bill Wendling
748f1ae70b Added "DOUT" macro. This is used as a replacement for the std::cerr
stream. It centralizes the use of std::cerr so that static c'tor/d'tors
aren't scattered around all over the place. The way to use it is like this:

       DOUT << "This is a status line: " << Var << "\n";

If "-debug" is specified, it will print. Otherwise, it'll not print. If
NDEBUG is defined, the DOUT does nothing.

llvm-svn: 31798
2006-11-17 00:49:12 +00:00
Jim Laskey
28fec74f1b Remove redundant <cmath>.
llvm-svn: 31561
2006-11-08 19:16:44 +00:00
John Criswell
335eb0232a Include llvm/Support/DataTypes.h to define intptr_t.
This fixes the build on OpenBSD and potentially other systems.

llvm-svn: 31550
2006-11-08 15:04:35 +00:00
Rafael Espindola
ef14a04371 assert.h -> cassert
llvm-svn: 31399
2006-11-03 01:38:14 +00:00
Rafael Espindola
e2f969dccb #include <assert.h>
llvm-svn: 31386
2006-11-02 23:48:53 +00:00
Jim Laskey
c770e68c11 Allow FoldingSet clients to pump up the initial hash size.
llvm-svn: 31377
2006-11-02 14:21:26 +00:00
Chris Lattner
1db6efc297 add a highly efficient hash table that is specialized for mapping C strings
to some other type.

llvm-svn: 31286
2006-10-29 23:42:03 +00:00
Chris Lattner
6a498a7658 Add a new llvm::Allocator abstraction, which will be used by a container
I'm about to add.  This is similar to, but necessarily different than, the
STL allocator class.

llvm-svn: 31285
2006-10-29 22:08:03 +00:00
Jim Laskey
0a32281238 Try again.
llvm-svn: 31278
2006-10-29 09:19:59 +00:00
Jim Laskey
7c8f89c34e Not handling zero length strings.
llvm-svn: 31277
2006-10-29 08:27:07 +00:00
Jim Laskey
d3d001e012 SmallVector append not insert.
llvm-svn: 31224
2006-10-27 19:38:32 +00:00
Jim Laskey
904dfc49e6 Grrr.
llvm-svn: 31223
2006-10-27 19:20:12 +00:00
Jim Laskey
398ce23c4d Temp patch for missing functionality.
llvm-svn: 31222
2006-10-27 19:14:16 +00:00
Bill Wendling
7b6f145c8e MathExtras isn't in the llvm/ADT directory but in the llvm/Support directory.
llvm-svn: 31219
2006-10-27 18:47:29 +00:00
Jim Laskey
3d1116e32c Apply editorials.
llvm-svn: 31218
2006-10-27 18:05:12 +00:00
Jim Laskey
69b57830c2 Breakout folding hash set from SelectionDAGCSEMap.
llvm-svn: 31215
2006-10-27 16:16:16 +00:00
Reid Spencer
765ea73e59 Beef up the output from DiffFilesWithTolerance by setting the error code
to describe the difference being reported. This assists with understanding
differences an llvm-test and should help with bugpoint too.

llvm-svn: 31044
2006-10-18 20:23:52 +00:00
Chris Lattner
9476464f86 avoid a ctor/dtor issue with the ProgramName global.
llvm-svn: 30925
2006-10-13 00:06:24 +00:00
Chris Lattner
f48558b3b6 shrink anon-ns and mark stuff static. No functionality changes
llvm-svn: 30922
2006-10-12 22:09:17 +00:00
Chris Lattner
ba99215347 Fix a static dtor issue
llvm-svn: 30726
2006-10-04 22:13:11 +00:00
Chris Lattner
d55928d5f6 Fix more static dtor issues
llvm-svn: 30725
2006-10-04 21:52:35 +00:00
Chris Lattner
1d0cc59e5b Define this in the correct n/s
llvm-svn: 30671
2006-09-29 18:43:14 +00:00
Chris Lattner
30da1ba0a2 new helper class to provide more explicit management of static ctor/dtors.
llvm-svn: 30638
2006-09-28 00:31:55 +00:00
Chris Lattner
e84b1b8352 Instantiate Statistic<> in one place, not in every .o file that uses it.
llvm-svn: 29971
2006-08-30 04:17:00 +00:00
Chris Lattner
c8276aeb22 Minor code cleanups
llvm-svn: 29917
2006-08-27 22:10:29 +00:00
Chris Lattner
91f098c9f7 Add external definitions for commonly-used template specializations and add
anchor methods to others.  This eliminates the vtable/template method bloat
in .o files that defining a cl::opt used to impose (~4K per .o file for one
cp::opt<unsigned>).

llvm-svn: 29909
2006-08-27 12:45:47 +00:00
Reid Spencer
d5644a74d8 Remove a character to avoid line exceeding 80 cols.
llvm-svn: 29860
2006-08-24 22:39:25 +00:00
Reid Spencer
d583e06b7d For PR797:
This library no longer throws nor handles exceptions, so turn off the
REQUIRES_EH flag.

llvm-svn: 29849
2006-08-23 20:39:25 +00:00
Reid Spencer
70a4459b3e For PR797:
Final remove of exception handling from this file. lib/System can no longer
throw exceptions so there's no need for try/catch blocks here.

llvm-svn: 29848
2006-08-23 20:37:59 +00:00
Reid Spencer
de93aba128 Make the ProgramName variable a std::string so we can eliminate the path
portion fo the program name via sys::Path().getLast(). This makes error
messages more readable since this is invariably used only in error
messages.  Instead of:
  /path/to/llvm/bin/directory/toolname: error message
we will now get:
  toolname: error message
Also, since we always have a program name (even if its defaulted), don't
check to see if it is set or not when generating error messages. This
eliminates a bunch of constant strings, saving a little under 1K of data.

llvm-svn: 29842
2006-08-23 07:10:06 +00:00
Reid Spencer
e9b9e6a6c2 For PR797:
Adjust users of MappedFile to its new non-throwing interface.  Note that in
most cases the lazy step of just throwing after a call to MappedFile was
installed. This was done in the name of incremental changes. Getting rid of
the new throw statements will take adjustment of interfaces and propagation
of errors to higher levels.  Those changes will come in subsequent patches.

llvm-svn: 29817
2006-08-22 16:06:27 +00:00
Jim Laskey
db9724d6e4 Adding new Dwarf constants.
llvm-svn: 29798
2006-08-21 21:18:10 +00:00
Reid Spencer
3a71eba80f For PR797:
Adjust usage of the ExecuteAndWait function to use the last argument which
is the ErrMsg string. This is necessitated because this function no longer
throws exceptions on error.

llvm-svn: 29791
2006-08-21 06:04:45 +00:00
Reid Spencer
5ed787710d For PR797:
Make sys::Program::ExecuteAndWait not throw exceptions and update any
affected code. It now return -9999 to signal that the program couldn't be
executed. Only one case (in bugpoint) actually examines the result code.

llvm-svn: 29785
2006-08-21 02:04:43 +00:00
Chris Lattner
4966686ef8 remove IncludeFile turds in MathExtras.h, which bloats every .o file that
#includes it.

llvm-svn: 29639
2006-08-11 23:52:54 +00:00
Reid Spencer
20aee8ad5d Remove the use of "IncludeFile" from this support facility. The mechanism
to build a loadable module is now correctly defined and documented so this
workaround isn't needed any longer.

llvm-svn: 29553
2006-08-07 23:20:15 +00:00
Jim Laskey
ce9ed8e5e5 If the Program name was NULL then all further output sent to std::cerr was
suppressed.

llvm-svn: 29477
2006-08-02 20:15:56 +00:00
Chris Lattner
5f46911e99 Finegrainify namespacification, minor cleanups
llvm-svn: 29399
2006-07-28 22:21:01 +00:00
Chris Lattner
f4c7ceebaf Change Path::getStatusInfo to return a boolean and error string on an error
instead of throwing an exception.  This reduces the amount of code that is
exposed to exceptions (e.g. FileUtilities), though it is clearly only one step
along the way.

llvm-svn: 29395
2006-07-28 22:03:44 +00:00
Chris Lattner
75be2cb1a0 libsupport still throws.
llvm-svn: 29394
2006-07-28 22:01:01 +00:00
Reid Spencer
10b9edbb69 For PR780:
1. Move IncludeFile.h to System library
2. Move IncludeFile.cpp to System library
3. #1 and #2 required to prevent cyclic library dependencies for libSystem
4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h
5. Add IncludeFile support to various lib/System classes.
6. Add new lib/System classes to LinkAllVMCore.h
All this in an attempt to pull in lib/System to what's required for VMCore

llvm-svn: 29287
2006-07-26 16:18:00 +00:00
Chris Lattner
d2ad578246 Add an out-of-line virtual method to provide a home for the cl::option class.
llvm-svn: 29191
2006-07-18 23:59:33 +00:00
Chris Lattner
0686fdb905 Add two helpers for escaping and unescaping strings.
llvm-svn: 29151
2006-07-14 22:54:39 +00:00
Chris Lattner
d5eb5a13ea LoadLibraryPermanently no longer throws an exception, so this code doesn't have
to catch it.  Other minor cleanups.

llvm-svn: 29050
2006-07-07 17:14:04 +00:00
Chris Lattner
e54ce5af47 This patch (written by Reid) changes compressor to never throw an exception.
llvm-svn: 29045
2006-07-07 17:00:12 +00:00
Chris Lattner
24d2f48b07 Modify the SlowOperationInformer interface to not throw exceptions.
llvm-svn: 29028
2006-07-06 22:34:06 +00:00
Chris Lattner
198d63f336 Print LLVM version info like this:
Low Level Virtual Machine (http://llvm.org/):
  llvm version 1.8cvs
  DEBUG build with assertions.

instead of like this:

Low Level Virtual Machine (llvm) 1.8cvs (see http://llvm.org/) ASSERTIONS ENABLED

Also, add a place for vendor version info.

llvm-svn: 29020
2006-07-06 18:33:03 +00:00
Reid Spencer
938be45012 For PR801:
Refactor the Graph writing code to use a common implementation which is
now in lib/Support/GraphWriter.cpp. This completes the PR.

Patch by Anton Korobeynikov. Thanks, Anton!

llvm-svn: 28925
2006-06-27 16:49:46 +00:00
Chris Lattner
a396e6d9ba Add some out-of-line virtual dtors so that the class has a "home", preventing
vtables for (e.g.) Instruction from being emitted into every .o file.

llvm-svn: 28898
2006-06-21 16:53:47 +00:00
Jim Laskey
849c76e55c 1. Support standard dwarf format (was bootstrapping in Apple format.)
2. Add vector support.

llvm-svn: 28807
2006-06-15 20:51:43 +00:00
Reid Spencer
3832b7f9c4 For PR780:
Break the "IncludeFile" mechanism into its own header file and adjust other
files accordingly. Use this facility for the IntrinsicInst problem which
was the subject of PR800.
More to follow on this.

llvm-svn: 28709
2006-06-07 20:00:19 +00:00
Chris Lattner
2701560055 Move toolrunner out of libsupport into the bugpoint tool
llvm-svn: 28700
2006-06-06 22:31:36 +00:00
Reid Spencer
ff02d7d45a Add the -Xlinker option to bugpoint which allows an option to be passed
through to gcc when its being used as a linker. This allows -L and -l
(and any other) options to be added so that non-complete bytecode files
can be processed with bugpoint. The -Xlinker option can be added as many
times as needed.

llvm-svn: 28692
2006-06-06 00:00:42 +00:00
Reid Spencer
24f0a4a816 Make it possible to override the standard version printer. Not all tools
built with CommandLine.h will want the --version option to report that the
tool belongs to LLVM. To override simply pass a void func() to the
cl::SetVersionPrinter() function and that void func() will be called when
it is time to print the version information.

llvm-svn: 28687
2006-06-05 16:22:56 +00:00
Reid Spencer
94a443bb29 Use archive libraries instead of object files for VMCore, BCReader,
BCWriter, and bzip2 libraries. Adjust the various makefiles to accommodate
these changes. This was done to speed up link times.

llvm-svn: 28610
2006-06-01 01:30:27 +00:00
Reid Spencer
3a6304d4e8 Squelch this warning:
/bzlib.c:126: warning: string length `1056' is greater than the length `509' ISO
C89 compilers are required to support

llvm-svn: 28602
2006-05-31 21:53:42 +00:00
Chris Lattner
f604017e47 Patches to make the LLVM sources more -pedantic clean. Patch provided
by Anton Korobeynikov!  This is a step towards closing PR786.

llvm-svn: 28447
2006-05-24 17:04:05 +00:00
Reid Spencer
243aaabbe7 For PR777:
Add an additional catch block to ensure that this function can't throw any
exceptions, even one's we're not expecting.

llvm-svn: 28309
2006-05-15 22:12:42 +00:00
Chris Lattner
a297ad27db Fix PR743: emit -help output of a tool to cout, not cerr.
llvm-svn: 28010
2006-04-28 05:36:25 +00:00
Jim Laskey
cb47e213c0 Qualify dwarf namespace inside llvm namespace.
llvm-svn: 26409
2006-02-27 22:37:23 +00:00
Jim Laskey
939d2084ad Re-orging file.
llvm-svn: 26401
2006-02-27 12:43:29 +00:00
Chris Lattner
d8d71c2b6a Let bugpoint work on sparc with v9 instructions enabled.
llvm-svn: 25958
2006-02-04 05:02:27 +00:00
Andrew Lenharth
a2054ac660 dynamically allocate plugin space as needed
llvm-svn: 25652
2006-01-26 19:38:58 +00:00
Andrew Lenharth
c2973ea159 Remember plugins should someone like bugpoint want to know them.
llvm-svn: 25649
2006-01-26 18:36:50 +00:00
Chris Lattner
adff158fbd Add explicit #includes of <iostream>
llvm-svn: 25509
2006-01-22 22:53:01 +00:00
Chris Lattner
84370bce71 Revert this, I didn't mean to commit it
llvm-svn: 25382
2006-01-17 00:40:24 +00:00
Chris Lattner
111de6b5cf Add support for programs with a null argv[0]
llvm-svn: 25379
2006-01-17 00:32:28 +00:00
Duraid Madina
210d54c990 HP aCC chokes on this, but it's not required anyway: according to
the bzip2 homepage, only ancient (gcc 2.7.x ?) versions of GCC
require this? It certainly isn't needed for the current bzip2
sources.

llvm-svn: 25013
2005-12-26 05:00:25 +00:00
Duraid Madina
392483ef73 MERRY CHRISTMAS EVERYONE!!! (what better way to spend christmas than
to try building LLVM on HP-UX! (the Right Way seems to be to tear out
the ancient STL that HP ship and use http://incubator.apache.org/stdcxx/ )

llvm-svn: 25012
2005-12-26 04:56:16 +00:00
Reid Spencer
d7c85dc01c For PR351:
Move the system dependent portion to lib/System/*/Alarm.inc. This makes the
SlowOperationInformer platform independent.

llvm-svn: 24938
2005-12-22 03:31:26 +00:00
Chris Lattner
5853bd7984 indicate when a tool is a debug build.
llvm-svn: 24374
2005-11-16 06:36:47 +00:00
Chris Lattner
e6f7a38925 DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now
llvm-svn: 23940
2005-10-24 02:26:13 +00:00
Chris Lattner
404681ff3f Only build .a file versions of these libraries, instead of .a and .o versions.
This should speed up build times.

llvm-svn: 23934
2005-10-24 02:05:35 +00:00
Chris Lattner
44fa3e3f08 Allow bugpoint+PPC codegen to use fsqrt
llvm-svn: 23128
2005-08-29 13:14:24 +00:00
Chris Lattner
f1d821b665 Allow tools with "consume after" options (like lli) to take more positional
opts than they take directly.  Thanks to John C for pointing this problem
out to me!

llvm-svn: 22717
2005-08-08 21:57:27 +00:00
Chris Lattner
e30b898fec Reject command lines that have too many positional arguments passed (e.g.,
'opt x y').  This fixes PR493.

Patch contributed by Owen Anderson!

llvm-svn: 22705
2005-08-08 17:25:38 +00:00
Chris Lattner
d2455468b5 200.sixtrack prints FP numbers with a very strange notation that uses D
instead of E for exponentials (e.g. 1.234D-43).  Add support for this
notation.

llvm-svn: 22574
2005-08-02 00:11:53 +00:00
Jeff Cohen
bd51ec7461 Eliminate all remaining tabs and trailing spaces.
llvm-svn: 22523
2005-07-27 06:12:32 +00:00
Reid Spencer
04d734c2f6 Final Changes For PR495:
This chagne just renames some sys::Path methods to ensure they are not
misused. The Path documentation now divides methods into two dimensions:
Path/Disk and accessor/mutator. Path accessors and mutators only operate
on the Path object itself without making any disk accesses. Disk accessors
and mutators will also access or modify the file system. Because of the
potentially destructive nature of disk mutators, it was decided that all
such methods should end in the work "Disk" to ensure the user recognizes
that the change will occur on the file system. This patch makes that
change. The method name changes are:

makeReadable        -> makeReadableOnDisk
makeWriteable       -> makeWriteableOnDisk
makeExecutable      -> makeExecutableOnDisk
setStatusInfo       -> setStatusInfoOnDisk
createDirectory     -> createDirectoryOnDisk
createFile          -> createFileOnDisk
createTemporaryFile -> createTemporaryFileOnDisk
destroy             -> eraseFromDisk
rename              -> renamePathOnDisk

These changes pass the Linux Deja Gnu tests.

llvm-svn: 22354
2005-07-08 03:08:58 +00:00
Nate Begeman
70532b9f00 Add support for assembling .s files on mac os x for intel
Add support for running bugpoint on mac os x for intel

llvm-svn: 22351
2005-07-08 00:23:26 +00:00
Reid Spencer
5534b2d505 For PR495:
Get rid of the difference between file paths and directory paths. The Path
class now simply stores a path that can refer to either a file or a
directory. This required various changes in the implementation and interface
of the class with the corresponding impact to its users. Doxygen comments were
also updated to reflect these changes. Interface changes are:

appendDirectory -> appendComponent
appendFile -> appendComponent
elideDirectory -> eraseComponent
elideFile -> eraseComponent
elideSuffix -> eraseSuffix
renameFile -> rename
setDirectory -> set
setFile -> set

Changes pass Dejagnu and llvm-test/SingleSource tests.

llvm-svn: 22349
2005-07-07 23:21:43 +00:00
Reid Spencer
fb7bca6fa6 For PR495:
Change interface to Path class:
readable -> canRead
writable -> canWrite
executable -> canExecute

More (incremental) changes coming to close 495.

llvm-svn: 22345
2005-07-07 18:21:42 +00:00
Duraid Madina
7391051c20 HP-UX system headers make a mess of isinf(), so much so that gcc fixincludes
can't patch it up for c++ (works in C though)

llvm-svn: 22079
2005-05-16 06:45:57 +00:00
Chris Lattner
f79a885a30 Capitalize
llvm-svn: 21964
2005-05-13 19:49:09 +00:00
Reid Spencer
77e3c97c8e Make sure that decompression checks for the case that bzip2 returns
BZ_OK (meaning more data is expected) but there is no more input data. In
this case, the input file is probably truncated. Generate an exception that
indicates this case when its detected.

llvm-svn: 21926
2005-05-13 07:05:37 +00:00
Chris Lattner
593c0e8957 Do not use "" as a sentinal for a missing argument! This fixes PR560.
llvm-svn: 21850
2005-05-10 23:20:17 +00:00
Misha Brukman
4fda633c59 Why output multiple strings, let the compiler concatenate them for us for free
llvm-svn: 21845
2005-05-10 22:03:50 +00:00
Misha Brukman
fdc5e95a10 * Order #includes as per style guide
* Combine multiple ``std::cerr <<'' statements into one for simplicity

llvm-svn: 21458
2005-04-22 19:13:22 +00:00