summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* fix PR2953, an off-by-one error handling formatted i/o. Chris Lattner2008-10-261-1/+1
| | | | | | Thanks to Török Edwin for the awesome reduced testcase. llvm-svn: 58199
* Added raw_fd_ostream::close().Ted Kremenek2008-10-231-3/+14
| | | | llvm-svn: 58052
* Fix for PR2881: fix a small leak exposed by valgrind, using a ManagedStatic.Julien Lerouge2008-10-221-6/+5
| | | | llvm-svn: 57984
* Clear raw_fd_ostream error string on success and explain behavior inDaniel Dunbar2008-10-211-3/+6
| | | | | | | | documentation. Add C++ header marker. llvm-svn: 57923
* Fix command-line option printing to print two spaces where needed,Dan Gohman2008-10-141-1/+1
| | | | | | | | | instead of requiring all "short description" strings to begin with two spaces. This makes these strings less mysterious, and it fixes some cases where short description strings mistakenly did not begin with two spaces. llvm-svn: 57521
* Change TAG_ names to DW_TAG for gcc (testsuite) compatibility.Dale Johannesen2008-10-121-59/+59
| | | | llvm-svn: 57425
* Change Dwarf comments starting with AT_ to DW_AT_ toDale Johannesen2008-10-121-96/+96
| | | | | | match gcc. Helps with the testsuite. llvm-svn: 57410
* rearrange some code.Chris Lattner2008-10-111-6/+6
| | | | llvm-svn: 57384
* Add a "loses information" return value to APFloat::convertDale Johannesen2008-10-091-14/+37
| | | | | | | and APFloat::convertToInteger. Restore return value to IEEE754. Adjust all users accordingly. llvm-svn: 57329
* Rename APFloat::convertToAPInt to bitcastToAPInt toDale Johannesen2008-10-091-4/+4
| | | | | | | make it clearer what the function does. No functional change. llvm-svn: 57325
* Mark negative-zero-to-int conversion as Inexact,Dale Johannesen2008-10-071-1/+2
| | | | | | | | | since -0.0 can't be represented as an int. This prevents llvm from reducing -0.0 to a load-and-convert of int 0. Fixes ieee.exp/mzero[2356].c in gcc testsuite. llvm-svn: 57224
* Be more precise about which conversions of NaNsDale Johannesen2008-10-061-3/+18
| | | | | | | | are Inexact. (These are not Inexact as defined by IEEE754, but that seems like a reasonable way to abstract what happens: information is lost.) llvm-svn: 57218
* Temporarily revert functionality change from my previous patch;Dale Johannesen2008-10-061-2/+1
| | | | | | it is too aggressive. llvm-svn: 57203
* Mark shortening NaN conversions as Inexact. PR 2856.Dale Johannesen2008-10-061-6/+9
| | | | | | Improve description of unsupported formats. llvm-svn: 57185
* Initial support for the CMake build system.Oscar Fuentes2008-09-221-0/+29
| | | | llvm-svn: 56419
* Updating VC++ project.Cedric Venet2008-08-241-0/+1
| | | | | | Adding one include file and correct one declaration from class to struct in order to make llvm compile on VC2005. llvm-svn: 55279
* Add raw_stream adaptors that write into an std::string and ↵Chris Lattner2008-08-231-0/+35
| | | | | | SmallVector/SmallString. llvm-svn: 55265
* Switch the asmprinter (.ll) and all the stuff it requires over toChris Lattner2008-08-233-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | use raw_ostream instead of std::ostream. Among other goodness, this speeds up llvm-dis of kc++ with a release build from 0.85s to 0.49s (88% faster). Other interesting changes: 1) This makes Value::print be non-virtual. 2) AP[S]Int and ConstantRange can no longer print to ostream directly, use raw_ostream instead. 3) This fixes a bug in raw_os_ostream where it didn't flush itself when destroyed. 4) This adds a new SDNode::print method, instead of only allowing "dump". A lot of APIs have both std::ostream and raw_ostream versions, it would be useful to go through and systematically anihilate the std::ostream versions. This passes dejagnu, but there may be minor fallout, plz let me know if so and I'll fix it. llvm-svn: 55263
* add #includeChris Lattner2008-08-231-0/+1
| | | | llvm-svn: 55252
* add a simple mechanism for formatted output. This gives raw_ostream's Chris Lattner2008-08-231-0/+50
| | | | | | | | all the power and risk of fprintf format strings. Use them like this: OS << format("%10.4f", 42.0) << "\n" << format("%x", 42) << '\n'; llvm-svn: 55246
* Add a clear() method to FoldingSet.Dan Gohman2008-08-231-12/+13
| | | | llvm-svn: 55210
* improve support for systems that need unistd.h to get STDOUT_FILENO.Chris Lattner2008-08-221-2/+10
| | | | | | Patch contributed by Bjorn Reese! llvm-svn: 55179
* Fix write() when the string being written is larger than the buffer. This ↵Owen Anderson2008-08-211-0/+1
| | | | | | | | broke various ObjC testcases with very long symbol names. llvm-svn: 55148
* Move non-trivial methods out of line to avoid code-size bloat.Owen Anderson2008-08-211-0/+92
| | | | llvm-svn: 55138
* Use raw_ostream throughout the AsmPrinter.Owen Anderson2008-08-211-11/+11
| | | | llvm-svn: 55092
* Move the fast-path (<=i64) cases of various APInt methods inlineChris Lattner2008-08-201-150/+40
| | | | | | | and the slow-path cases out of line. This speeds up instcombine a bit in real world cases. Patch contributed by m-s. llvm-svn: 55063
* It's not necessary to check if a value is null before delete[].Dan Gohman2008-08-201-1/+1
| | | | llvm-svn: 55053
* Get raw_ostream.cpp to compile on MSVC.Argyrios Kyrtzidis2008-08-171-5/+11
| | | | llvm-svn: 54879
* Rework the routines that convert AP[S]Int into a string. Now, instead ofChris Lattner2008-08-173-99/+100
| | | | | | | | | | | | | | | | | returning an std::string by value, it fills in a SmallString/SmallVector passed in. This significantly reduces string thrashing in some cases. More specifically, this: - Adds an operator<< and a print method for APInt that allows you to directly send them to an ostream. - Reimplements APInt::toString to be much simpler and more efficient algorithmically in addition to not thrashing strings quite as much. This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the asmprinter. This also fixes a bug I introduced into the asmwriter in a previous patch w.r.t. alias printing. llvm-svn: 54873
* remove a dead APInt ctor.Chris Lattner2008-08-172-8/+2
| | | | llvm-svn: 54869
* add support for a cout/cerr analog (outs()/errs()) as well asChris Lattner2008-08-171-0/+31
| | | | | | | a simple adaptor class to give raw output capabilities to something that wants to write to an ostream. llvm-svn: 54865
* opening "-" automatically yields stdout.Chris Lattner2008-08-171-0/+7
| | | | llvm-svn: 54863
* rename OutputData to 'write' to match ostream.Chris Lattner2008-08-171-1/+1
| | | | llvm-svn: 54857
* add a new raw_ostream class which is an extremely high performance ostream thatChris Lattner2008-08-171-0/+64
| | | | | | | | can *only* output data (no seeking, reading, etc). This is adapted from the clang "-E outputter", and is roughly 10% faster than stdio on darwin and 30% (or more) faster than std::ostream. llvm-svn: 54855
* Avoid repeatedly reallocating the FoldingSetNodeID when searchingDan Gohman2008-08-121-2/+4
| | | | | | through multiple nodes in a bucket. llvm-svn: 54687
* Fix several const-correctness issues, resolving some -Wcast-qual warnings.Dan Gohman2008-08-051-2/+2
| | | | llvm-svn: 54349
* Fold the useful features of alist and alist_node into ilist, andDan Gohman2008-07-281-2/+4
| | | | | | | | | | | | | | | | a new ilist_node class, and remove them. Unlike alist_node, ilist_node doesn't attempt to manage storage itself, so it avoids the associated problems, including being opaque in gdb. Adjust the Recycler class so that it doesn't depend on alist_node. Also, change it to use explicit Size and Align parameters, allowing it to work when the largest-sized node doesn't have the greatest alignment requirement. Change MachineInstr's MachineMemOperand list from a pool-backed alist to a std::list for now. llvm-svn: 54146
* Fix PR2088. Use modulo linear equation solver to compute loop iterationWojciech Matyjewicz2008-07-201-1/+1
| | | | | | count. llvm-svn: 53810
* Reapply 53476 and 53480, with a fix so that it properly updatesDan Gohman2008-07-141-2/+34
| | | | | | | the BB member to the current basic block after emitting instructions. llvm-svn: 53567
* Back out 53476 and 53480 for now. Somehow they cause llc to miscompile 179.art.Evan Cheng2008-07-121-34/+2
| | | | llvm-svn: 53502
* Add support for putting NamedRegionTimers in TimerGroups, andDan Gohman2008-07-111-2/+34
| | | | | | | | use a timer group for the timers in SelectionDAGISel. Also, Split scheduling out from emitting, to give each their own timer. llvm-svn: 53476
* Use find instead of lower_bound.Dan Gohman2008-07-111-2/+2
| | | | llvm-svn: 53474
* Add some basic Pool-allocation infrastructure. This adds a Recycler class,Dan Gohman2008-07-071-0/+7
| | | | | | | | for handling bookkeeping for deleted objects, as well as the alist class template, for keeping lists of objects allocated from Recyclers, and some related utilities. llvm-svn: 53210
* Add a version of AddString that takes a const char* so we can avoid extraneousOwen Anderson2008-07-011-0/+38
| | | | | | conversions to std::string. llvm-svn: 52995
* Append to the ActiveTimers std::vector before looking at the timer insteadDan Gohman2008-06-241-1/+1
| | | | | | | | of after, so that any reallocation it does doesn't get counted for the pass being timed. This probably doesn't account for a timing discrepancy I was looking into, but I'm fixing it anyway. llvm-svn: 52693
* First step to fix PR2088. Implement routine to compute the Wojciech Matyjewicz2008-06-231-7/+48
| | | | | | | | multiplicative inverse of a given number. Modify udivrem to allow input and output pairs of arguments to overlap. Patch is based on the work by Chandler Carruth. llvm-svn: 52638
* Avoid creating a redundant zero APInt.Dan Gohman2008-06-211-1/+1
| | | | llvm-svn: 52602
* Consistently set "Buckets[NumBuckets] = reinterpret_cast<void*>(-1)" ↵Ted Kremenek2008-06-171-1/+1
| | | | | | throughout FoldingSet.cpp. llvm-svn: 52425
* As comments said, for negative value, the arithmetic Zhou Sheng2008-06-051-1/+1
| | | | | | | | | over-shift-right should return -1. So here it should be signed-extended, when bitwidth larger than 64. test case: llvm/test/ExecutionEngine/2008-06-05-APInt-OverAShr.ll llvm-svn: 51999
* Give a proper error message when a command line option is defined more thanMatthijs Kooijman2008-05-301-1/+1
| | | | | | | once (ie, at two different places in the source, not two times on the commandline). llvm-svn: 51771
OpenPOWER on IntegriCloud