aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* Added Reset() to free all allocated memory regions and reset state to be the ↵Evan Cheng2007-09-051-0/+6
| | | | | | same as right after ctor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41728 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix mod so it actually works. Fix conversions toDale Johannesen2007-09-051-9/+33
| | | | | | | native types to handle denormals correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41726 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops, should be part of 41664; won't work very well without this piece.Dale Johannesen2007-08-311-0/+38
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41665 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance APFloat to retain bits of NaNs (fixes oggenc).Dale Johannesen2007-08-311-77/+76
| | | | | | | | Use APFloat interfaces for more references, mostly of ConstantFPSDNode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41632 91177308-0d34-0410-b5e6-96231b3b80d8
* Change LegalFPImmediates to use APFloat.Dale Johannesen2007-08-301-1/+1
| | | | | | | | | | Add APFloat interfaces to ConstantFP, SelectionDAG. Fix integer bit in double->APFloat conversion. Convert LegalizeDAG to use APFloat interface in ConstantFPSDNode uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41587 91177308-0d34-0410-b5e6-96231b3b80d8
* Poison APFloat::operator==. Replace existing uses with bitwiseIsEqual.Dale Johannesen2007-08-241-1/+1
| | | | | | | | This means backing out the preceding change to Constants.cpp, alas. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41378 91177308-0d34-0410-b5e6-96231b3b80d8
* Revised per review feedback from previous patch.Dale Johannesen2007-08-241-36/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41353 91177308-0d34-0410-b5e6-96231b3b80d8
* silence some warnings in an optimized build.Chris Lattner2007-08-241-11/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41352 91177308-0d34-0410-b5e6-96231b3b80d8
* Change internal representation of ConstantFP to use APFloat.Dale Johannesen2007-08-241-1/+187
| | | | | | | | Interface to rest of the compiler unchanged, as yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41348 91177308-0d34-0410-b5e6-96231b3b80d8
* rename APInt::toString -> toStringUnsigned for symmetry with toStringSigned()Chris Lattner2007-08-231-2/+2
| | | | | | | | Add an APSInt::toString() method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41309 91177308-0d34-0410-b5e6-96231b3b80d8
* initial checkin of Neil's APFloat work.Chris Lattner2007-08-202-10/+1518
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41203 91177308-0d34-0410-b5e6-96231b3b80d8
* This adds a bunch of static functions that implement unsignedChris Lattner2007-08-161-0/+566
| | | | | | | | | | | | | two's complement bignum arithmetic. They could be used to implement much of APInt, but the idea is they are enough to implement APFloat as well, which the current APInt interface is not suited for. Patch by Neil Booth! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41124 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly use const qualifiersAnton Korobeynikov2007-08-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41111 91177308-0d34-0410-b5e6-96231b3b80d8
* Make getSTDIN return null if the standard input is empty, as the header fileReid Spencer2007-08-081-2/+4
| | | | | | | documentation implies and as its uses depend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40939 91177308-0d34-0410-b5e6-96231b3b80d8
* Escape some escapes that confuse doxygen.Reid Spencer2007-08-051-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40850 91177308-0d34-0410-b5e6-96231b3b80d8
* When clearing a SmallPtrSet, if the set had a huge capacity, but theChris Lattner2007-08-051-0/+18
| | | | | | | | | | | contents of the set were small, deallocate and shrink the set. This avoids having us to memset as much data, significantly speeding up some pathological cases. For example, this speeds up the verifier from 0.3899s to 0.0763 (5.1x) on the testcase from PR1432 in a release build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40837 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow SmallPtrSet to hold pointers to const data.Owen Anderson2007-07-271-20/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40556 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the copy constructor of SmallPtrSet much faster.Owen Anderson2007-07-241-22/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40474 91177308-0d34-0410-b5e6-96231b3b80d8
* Remember to free the heap allocated array if we're not going to use it.Owen Anderson2007-07-191-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40043 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an issue where assignments that caused a SmallPtrSet to become non-smallOwen Anderson2007-07-181-4/+8
| | | | | | | | would result in calling realloc() on a null pointer. Instead, if we encounter this situation, make a normal call to malloc(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40014 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak the build by putting calls to free into the implementation file andReid Spencer2007-07-171-0/+7
| | | | | | | having that implementation file #include <cstdlib>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39952 91177308-0d34-0410-b5e6-96231b3b80d8
* Use realloc() to (potentially) resize the contents of SmallPtrSet in place.Owen Anderson2007-07-161-10/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39926 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify the language. Pointed out by Duncan Sands.Nick Lewycky2007-07-141-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39857 91177308-0d34-0410-b5e6-96231b3b80d8
* Add alternate ConstantRange intersection algorithm.Nick Lewycky2007-07-141-0/+81
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39851 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the assignment operator for SmallPtrSet much faster for normal cases.Owen Anderson2007-07-091-36/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38474 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the assignment operator for SmallPtrSet return a reference, and fix a ↵Owen Anderson2007-07-091-1/+1
| | | | | | | | | | | long-standing bug in the copy ctor while I'm at it. Thanks to Chris Lattner for help with this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38470 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an error in the assignment operator that was causing an infinite loop in ↵Owen Anderson2007-07-091-3/+11
| | | | | | | | | GVNPRE.cpp. Patch by Chis Lattner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38467 91177308-0d34-0410-b5e6-96231b3b80d8
* implement operator= for smallptrsetChris Lattner2007-07-091-0/+36
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38460 91177308-0d34-0410-b5e6-96231b3b80d8
* Here is the bulk of the sanitizing.Gabor Greif2007-07-051-4/+4
| | | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37913 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix undefined behaviour reported by the new --enable-expensive-checks option.Nick Lewycky2007-07-011-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37829 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in SmallPtrSet that was causing GVNPRE to enter an infinite loop.Owen Anderson2007-06-221-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37697 91177308-0d34-0410-b5e6-96231b3b80d8
* Two changes:Chris Lattner2007-06-211-4/+5
| | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37696 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix edge case.Nick Lewycky2007-06-091-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37532 91177308-0d34-0410-b5e6-96231b3b80d8
* Make tail merging the default, except on powerPC. There was no prior artDale Johannesen2007-05-221-0/+18
| | | | | | | | for a target-dependent default with a command-line override; this way should be generally usable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37285 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an assertion introduced by my last change to the toString method. WeReid Spencer2007-05-191-2/+2
| | | | | | | | can't use getZExtValue() to extract the low order bits for each digit. Instead, we need to access the low order word directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37242 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of leading zeros in the output of toString.Reid Spencer2007-05-171-8/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37175 91177308-0d34-0410-b5e6-96231b3b80d8
* For lshr by 0 bits, just return *this as a short cut. This also preventsReid Spencer2007-05-171-0/+6
| | | | | | | undefined behavior when the width > 64 bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37153 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in the "fromString" method where radix 2,8 and 16 values wereReid Spencer2007-05-161-8/+13
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37111 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the results for the rotate functions correct when rotateAmt == 0.Reid Spencer2007-05-141-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37026 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some things needed by the llvm-gcc version supporting bit accurate integerReid Spencer2007-05-131-1/+67
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37025 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix shl to produce the correct result when the bitwidth is > 64 and theReid Spencer2007-05-121-0/+6
| | | | | | | | shift amount is 0. Previously this code would do a lshr by the bit width which can lead to incorrect results. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37010 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a memory leakChris Lattner2007-05-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36981 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak VC++ build.Jeff Cohen2007-05-071-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36901 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance MemoryBuffer to return error messages in strings if they occur.Chris Lattner2007-05-061-7/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36899 91177308-0d34-0410-b5e6-96231b3b80d8
* remove this file for now, we can bring it back from cvs if we need it inChris Lattner2007-05-061-561/+0
| | | | | | | the future (and integrate it with membuffer, etc) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36876 91177308-0d34-0410-b5e6-96231b3b80d8
* remove libbzip2, it is deadChris Lattner2007-05-0615-6126/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36875 91177308-0d34-0410-b5e6-96231b3b80d8
* don't build bzip2 for nowChris Lattner2007-05-061-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36871 91177308-0d34-0410-b5e6-96231b3b80d8
* disable this for nowChris Lattner2007-05-061-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36870 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix MemoryBuffer::getFile to return null if it has an error opening theChris Lattner2007-05-061-8/+20
| | | | | | | file instead of aborting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36858 91177308-0d34-0410-b5e6-96231b3b80d8
* This is a patch to fix a compile error in STLExtras.h, andChris Lattner2007-05-031-0/+1
| | | | | | | | | a bug in GraphWriter.cpp. Patch by Florian Brandner git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36684 91177308-0d34-0410-b5e6-96231b3b80d8