Nick Lewycky
ddc2f9ba57
Clarify the language. Pointed out by Duncan Sands.
...
llvm-svn: 39857
2007-07-14 17:41:03 +00:00
Nick Lewycky
61b4a265ee
Add alternate ConstantRange intersection algorithm.
...
llvm-svn: 39851
2007-07-14 02:51:34 +00:00
Owen Anderson
e33356b18e
Make the assignment operator for SmallPtrSet much faster for normal cases.
...
llvm-svn: 38474
2007-07-09 22:27:20 +00:00
Owen Anderson
3364abbb36
Make the assignment operator for SmallPtrSet return a reference, and fix a long-standing bug in the copy
...
ctor while I'm at it.
Thanks to Chris Lattner for help with this patch.
llvm-svn: 38470
2007-07-09 20:59:01 +00:00
Owen Anderson
aee901745d
Fix an error in the assignment operator that was causing an infinite loop in GVNPRE.cpp.
...
Patch by Chis Lattner.
llvm-svn: 38467
2007-07-09 18:51:15 +00:00
Chris Lattner
85049a470e
implement operator= for smallptrset
...
llvm-svn: 38460
2007-07-09 16:54:03 +00:00
Gabor Greif
e16561cd5d
Here is the bulk of the sanitizing.
...
Almost all occurrences of "bytecode" in the sources have been eliminated.
llvm-svn: 37913
2007-07-05 17:07:56 +00:00
Nick Lewycky
5105adfcd1
Fix undefined behaviour reported by the new --enable-expensive-checks option.
...
llvm-svn: 37829
2007-07-01 03:06:30 +00:00
Owen Anderson
6d7b6f1ab8
Fix a bug in SmallPtrSet that was causing GVNPRE to enter an infinite loop.
...
llvm-svn: 37697
2007-06-22 00:11:18 +00:00
Chris Lattner
836e8f3f39
Two changes:
...
1. Make SmallPtrSet::erase faster in the small case by replacing a memmove
with a pointer copy.
2. Fix a bug where the null terminator at the end of the array in the small
case was not copied
llvm-svn: 37696
2007-06-21 23:23:32 +00:00
Nick Lewycky
d18b16034a
Fix edge case.
...
llvm-svn: 37532
2007-06-09 04:20:33 +00:00
Dale Johannesen
82810c8a13
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
b6af1aae35
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
5c138133b7
Get rid of leading zeros in the output of toString.
...
llvm-svn: 37175
2007-05-17 19:23:02 +00:00
Reid Spencer
fffdf10566
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
a93c981f66
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
98ed7db7ab
Make the results for the rotate functions correct when rotateAmt == 0.
...
llvm-svn: 37026
2007-05-14 00:15:28 +00:00
Reid Spencer
4c50b52f63
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
81ee020f64
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
436370bac8
fix a memory leak
...
llvm-svn: 36981
2007-05-11 00:43:26 +00:00
Jeff Cohen
b6e144cffe
Unbreak VC++ build.
...
llvm-svn: 36901
2007-05-07 15:21:46 +00:00
Chris Lattner
275757a05e
Enhance MemoryBuffer to return error messages in strings if they occur.
...
llvm-svn: 36899
2007-05-06 23:32:36 +00:00
Chris Lattner
4211c20988
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
2fce8c5df8
remove libbzip2, it is dead
...
llvm-svn: 36875
2007-05-06 19:05:34 +00:00
Chris Lattner
d2517d6767
don't build bzip2 for now
...
llvm-svn: 36871
2007-05-06 09:31:32 +00:00
Chris Lattner
1761e05c5b
disable this for now
...
llvm-svn: 36870
2007-05-06 09:31:06 +00:00
Chris Lattner
5db36d3d82
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
357882d27c
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
dad2d0939c
silence some annoying gcc 4.3 warnings
...
llvm-svn: 36680
2007-05-03 18:15:36 +00:00
Jeff Cohen
990a58f242
Fix MemoryBuffer breakage correctly.
...
llvm-svn: 36561
2007-04-29 14:43:31 +00:00
Jeff Cohen
50b2d2c6e3
Unbreak build.
...
llvm-svn: 36559
2007-04-29 14:21:44 +00:00
Chris Lattner
ee2d1f1ed2
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
3178736d50
Using APInt more efficiently.
...
llvm-svn: 36475
2007-04-26 16:42:07 +00:00
Jeff Cohen
e7ce8f23f6
Fix PR1329.
...
llvm-svn: 36016
2007-04-14 21:50:21 +00:00
Reid Spencer
67378b22bb
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
9329e7b626
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
01c175ec52
Make the apint construction more effective.
...
llvm-svn: 35960
2007-04-13 05:57:32 +00:00
Chris Lattner
af039c53c0
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
83b53a5964
Fix PR1318 by reacting appropriately to a mutating option list.
...
llvm-svn: 35905
2007-04-11 15:35:18 +00:00
Reid Spencer
c49f2ef236
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
21b76a9b99
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
b89804f246
Add signExtend to ConstantRange, to complement zeroExtend and truncate.
...
llvm-svn: 35733
2007-04-07 15:41:33 +00:00
Chris Lattner
0e1c1d4ae3
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
5247f60d20
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
2031b02faf
remove the dead removeArgument method, rename Options to OptionsMap.
...
llvm-svn: 35690
2007-04-05 21:58:17 +00:00
Chris Lattner
c770a0273d
stringmap memory managed with malloc now
...
llvm-svn: 35666
2007-04-04 17:24:28 +00:00
Chris Lattner
adf83a3513
use calloc instead of new/memset, it is more efficient
...
llvm-svn: 35644
2007-04-04 00:44:31 +00:00
Chris Lattner
2376346a8e
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
64df4ba422
greatly reduce hte default size of stringmap.
...
llvm-svn: 35632
2007-04-03 22:15:38 +00:00
Nick Lewycky
f22938af1b
Implement union of wrapped sets.
...
llvm-svn: 35534
2007-04-01 03:47:44 +00:00