Dale Johannesen
fe0fe14411
Make tail merging the default, except on powerPC. There was no prior art
...
for a target-dependent default with a command-line override; this way
should be generally usable.
llvm-svn: 37285
2007-05-22 17:14:46 +00:00
Reid Spencer
fe3c213178
Fix an assertion introduced by my last change to the toString method. We
...
can't use getZExtValue() to extract the low order bits for each digit.
Instead, we need to access the low order word directly.
llvm-svn: 37242
2007-05-19 00:29:55 +00:00
Reid Spencer
fe3fc94a44
Get rid of leading zeros in the output of toString.
...
llvm-svn: 37175
2007-05-17 19:23:02 +00:00
Reid Spencer
39e03f53ca
For lshr by 0 bits, just return *this as a short cut. This also prevents
...
undefined behavior when the width > 64 bits.
llvm-svn: 37153
2007-05-17 06:26:29 +00:00
Reid Spencer
1ec1e07949
Fix a bug in the "fromString" method where radix 2,8 and 16 values were
...
not being generated correctly because the shl operator does not mutate its
object but returns a new value. Also, make the distinction between radix
16 and the others more clear.
llvm-svn: 37111
2007-05-16 19:18:22 +00:00
Reid Spencer
3dab764309
Make the results for the rotate functions correct when rotateAmt == 0.
...
llvm-svn: 37026
2007-05-14 00:15:28 +00:00
Reid Spencer
a17d02ad08
Add some things needed by the llvm-gcc version supporting bit accurate integer
...
types:
1. Functions to compute div/rem at the same time.
2. Further assurance that an APInt with 0 bitwidth cannot be constructed.
3. Left and right rotate operations.
4. An exactLogBase2 function which requires an exact power of two or it
returns -1.
llvm-svn: 37025
2007-05-13 23:44:59 +00:00
Reid Spencer
8c2e0f85eb
Fix shl to produce the correct result when the bitwidth is > 64 and the
...
shift amount is 0. Previously this code would do a lshr by the bit width
which can lead to incorrect results.
llvm-svn: 37010
2007-05-12 18:01:57 +00:00
Chris Lattner
b601311b07
fix a memory leak
...
llvm-svn: 36981
2007-05-11 00:43:26 +00:00
Jeff Cohen
2e8263c013
Unbreak VC++ build.
...
llvm-svn: 36901
2007-05-07 15:21:46 +00:00
Chris Lattner
112d26a164
Enhance MemoryBuffer to return error messages in strings if they occur.
...
llvm-svn: 36899
2007-05-06 23:32:36 +00:00
Chris Lattner
4dca43cc6d
remove this file for now, we can bring it back from cvs if we need it in
...
the future (and integrate it with membuffer, etc)
llvm-svn: 36876
2007-05-06 19:10:47 +00:00
Chris Lattner
71eb8d5e89
remove libbzip2, it is dead
...
llvm-svn: 36875
2007-05-06 19:05:34 +00:00
Chris Lattner
5bd1b5b32d
don't build bzip2 for now
...
llvm-svn: 36871
2007-05-06 09:31:32 +00:00
Chris Lattner
5f94a8492f
disable this for now
...
llvm-svn: 36870
2007-05-06 09:31:06 +00:00
Chris Lattner
9fa29b4027
Fix MemoryBuffer::getFile to return null if it has an error opening the
...
file instead of aborting.
llvm-svn: 36858
2007-05-06 07:24:46 +00:00
Chris Lattner
49b1ec44eb
This is a patch to fix a compile error in STLExtras.h, and
...
a bug in GraphWriter.cpp.
Patch by Florian Brandner
llvm-svn: 36684
2007-05-03 18:32:10 +00:00
Chris Lattner
d363044771
silence some annoying gcc 4.3 warnings
...
llvm-svn: 36680
2007-05-03 18:15:36 +00:00
Jeff Cohen
7cfc4b404f
Fix MemoryBuffer breakage correctly.
...
llvm-svn: 36561
2007-04-29 14:43:31 +00:00
Jeff Cohen
349056458a
Unbreak build.
...
llvm-svn: 36559
2007-04-29 14:21:44 +00:00
Chris Lattner
4749cca517
Add a new memorybuffer class, to unify all the file reading code in the system
...
llvm-svn: 36553
2007-04-29 06:58:52 +00:00
Zhou Sheng
8c150f133c
Using APInt more efficiently.
...
llvm-svn: 36475
2007-04-26 16:42:07 +00:00
Jeff Cohen
5a502fb622
Fix PR1329.
...
llvm-svn: 36016
2007-04-14 21:50:21 +00:00
Reid Spencer
84c2475e77
We want the number of bits needed, not the power of 2.
...
llvm-svn: 35977
2007-04-14 00:00:10 +00:00
Reid Spencer
6e7854339e
Implement a getBitsNeeded method to determine how many bits are needed to
...
represent a string in binary form by an APInt.
llvm-svn: 35968
2007-04-13 19:19:07 +00:00
Zhou Sheng
dedfc40044
Make the apint construction more effective.
...
llvm-svn: 35960
2007-04-13 05:57:32 +00:00
Chris Lattner
9564abbfb5
improve the patch for PR1318 to also support grouped options with custom
...
handlers (like the pass list). My previous fix only supported *new* command
line options, not additions to old ones.
This fixes test/Feature/load_module.ll
llvm-svn: 35935
2007-04-12 00:36:29 +00:00
Chris Lattner
32f6730bb1
Fix PR1318 by reacting appropriately to a mutating option list.
...
llvm-svn: 35905
2007-04-11 15:35:18 +00:00
Reid Spencer
9b497be3c4
Fix an approximate calculation in an assertion not to give false negatives.
...
llvm-svn: 35901
2007-04-11 13:00:04 +00:00
Reid Spencer
875a2bc4db
For PR1291:
...
Change uses of sys::Path class to sys::PathWithStatus in those places where
the file status information is needed.
llvm-svn: 35743
2007-04-07 18:53:16 +00:00
Nick Lewycky
ec51e934ef
Add signExtend to ConstantRange, to complement zeroExtend and truncate.
...
llvm-svn: 35733
2007-04-07 15:41:33 +00:00
Chris Lattner
c1bce783e8
Fix a bug in my earlier commit which exposed positional options backwards.
...
This fixes llvm-ar.
llvm-svn: 35727
2007-04-07 05:38:53 +00:00
Chris Lattner
0160bf7114
rearchitect the registration mechanism used by the command line option stuff.
...
This dramatically reduce the amount of memory allocated by the commandline stuff
at static init time, changing it to build local data structures when ParseCommandLineOptions
is called. In a dummy empty program that links some llvm libraries, this reduces
the number of malloc'd bytes from 4864 to 3360 on entry to main. Most of that
memory is now allocated by non-commandline related stuff.
llvm-svn: 35701
2007-04-06 21:06:55 +00:00
Chris Lattner
d33f94f2d2
remove the dead removeArgument method, rename Options to OptionsMap.
...
llvm-svn: 35690
2007-04-05 21:58:17 +00:00
Chris Lattner
ed593d6789
stringmap memory managed with malloc now
...
llvm-svn: 35666
2007-04-04 17:24:28 +00:00
Chris Lattner
8a4ca643dd
use calloc instead of new/memset, it is more efficient
...
llvm-svn: 35644
2007-04-04 00:44:31 +00:00
Chris Lattner
dbf6a79a71
Extend StringMap to support being initialized as completely empty. When
...
initialized this way, they do not do a malloc to allocate their buckets.
llvm-svn: 35642
2007-04-04 00:29:37 +00:00
Chris Lattner
59994ede6b
greatly reduce hte default size of stringmap.
...
llvm-svn: 35632
2007-04-03 22:15:38 +00:00
Nick Lewycky
03f9c0ffc9
Implement union of wrapped sets.
...
llvm-svn: 35534
2007-04-01 03:47:44 +00:00
Reid Spencer
4269ae1274
For PR789:
...
Make the sys::Path::getFileStatus function more efficient by having it
return a pointer to the FileStatus structure rather than copy it. Adjust
uses of the function accordingly. Also, fix some memory issues in sys::Path.
llvm-svn: 35476
2007-03-29 19:05:44 +00:00
Reid Spencer
50b83584c4
For PR789:
...
Updates for change in interface of getFileStatus method of sys::Path class.
llvm-svn: 35458
2007-03-29 16:48:16 +00:00
Zhou Sheng
427b6bec97
Fix a bug in getAllOnesValue() which broke
...
some test cases for bitwidth > 64.
llvm-svn: 35232
2007-03-21 04:34:37 +00:00
Jeff Cohen
21c7fc9c1f
Fix (and simplify) 48-bit byte swap.
...
Get pos/neg infinity the correct way.
llvm-svn: 35223
2007-03-20 20:42:36 +00:00
Reid Spencer
41d254c7f4
Fix coding standards violation.
...
llvm-svn: 35189
2007-03-19 21:19:02 +00:00
Reid Spencer
b7d0a60da1
Implement extension of sign bits for negative values in the uint64_t
...
constructor. This helps to fix test/Assembler/2007-03-19-NegValue.ll
llvm-svn: 35180
2007-03-19 20:37:47 +00:00
Reid Spencer
7be576b4b0
Revert the last patch as it violates the conditions of sext/zext.
...
llvm-svn: 35068
2007-03-12 18:37:25 +00:00
Zhou Sheng
0145067d85
For APInt::z/sext(width), if width == BitWidth, just return *this.
...
llvm-svn: 35065
2007-03-12 17:47:45 +00:00
Nick Lewycky
2af4a3ab17
Add getter methods for the extremes of a ConstantRange.
...
llvm-svn: 35056
2007-03-10 15:54:12 +00:00
Jeff Cohen
98c99a3a02
Unbreak VC++ build.
...
llvm-svn: 34917
2007-03-05 00:00:42 +00:00
Reid Spencer
3e3980a403
Fix ashr for bitwidths > 64. This is now validated up to 1024 bits.
...
llvm-svn: 34852
2007-03-02 22:39:11 +00:00