summaryrefslogtreecommitdiff
path: root/lib/Support
Commit message (Collapse)AuthorAge
* Initial support for the CMake build system.Oscar Fuentes2008-09-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56419 91177308-0d34-0410-b5e6-96231b3b80d8
* Updating VC++ project.Cedric Venet2008-08-24
| | | | | | Adding one include file and correct one declaration from class to struct in order to make llvm compile on VC2005. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55279 91177308-0d34-0410-b5e6-96231b3b80d8
* Add raw_stream adaptors that write into an std::string and ↵Chris Lattner2008-08-23
| | | | | | SmallVector/SmallString. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55265 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch the asmprinter (.ll) and all the stuff it requires over toChris Lattner2008-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55263 91177308-0d34-0410-b5e6-96231b3b80d8
* add #includeChris Lattner2008-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55252 91177308-0d34-0410-b5e6-96231b3b80d8
* add a simple mechanism for formatted output. This gives raw_ostream's Chris Lattner2008-08-23
| | | | | | | | | | all the power and risk of fprintf format strings. Use them like this: OS << format("%10.4f", 42.0) << "\n" << format("%x", 42) << '\n'; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55246 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a clear() method to FoldingSet.Dan Gohman2008-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55210 91177308-0d34-0410-b5e6-96231b3b80d8
* improve support for systems that need unistd.h to get STDOUT_FILENO.Chris Lattner2008-08-22
| | | | | | | Patch contributed by Bjorn Reese! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55179 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix write() when the string being written is larger than the buffer. This ↵Owen Anderson2008-08-21
| | | | | | | | | broke various ObjC testcases with very long symbol names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55148 91177308-0d34-0410-b5e6-96231b3b80d8
* Move non-trivial methods out of line to avoid code-size bloat.Owen Anderson2008-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55138 91177308-0d34-0410-b5e6-96231b3b80d8
* Use raw_ostream throughout the AsmPrinter.Owen Anderson2008-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55092 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the fast-path (<=i64) cases of various APInt methods inlineChris Lattner2008-08-20
| | | | | | | | and the slow-path cases out of line. This speeds up instcombine a bit in real world cases. Patch contributed by m-s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55063 91177308-0d34-0410-b5e6-96231b3b80d8
* It's not necessary to check if a value is null before delete[].Dan Gohman2008-08-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55053 91177308-0d34-0410-b5e6-96231b3b80d8
* Get raw_ostream.cpp to compile on MSVC.Argyrios Kyrtzidis2008-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54879 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework the routines that convert AP[S]Int into a string. Now, instead ofChris Lattner2008-08-17
| | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54873 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a dead APInt ctor.Chris Lattner2008-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54869 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for a cout/cerr analog (outs()/errs()) as well asChris Lattner2008-08-17
| | | | | | | | a simple adaptor class to give raw output capabilities to something that wants to write to an ostream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54865 91177308-0d34-0410-b5e6-96231b3b80d8
* opening "-" automatically yields stdout.Chris Lattner2008-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54863 91177308-0d34-0410-b5e6-96231b3b80d8
* rename OutputData to 'write' to match ostream.Chris Lattner2008-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54857 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new raw_ostream class which is an extremely high performance ostream thatChris Lattner2008-08-17
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54855 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid repeatedly reallocating the FoldingSetNodeID when searchingDan Gohman2008-08-12
| | | | | | | through multiple nodes in a bucket. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54687 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix several const-correctness issues, resolving some -Wcast-qual warnings.Dan Gohman2008-08-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54349 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold the useful features of alist and alist_node into ilist, andDan Gohman2008-07-28
| | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54146 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2088. Use modulo linear equation solver to compute loop iterationWojciech Matyjewicz2008-07-20
| | | | | | | count. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53810 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 53476 and 53480, with a fix so that it properly updatesDan Gohman2008-07-14
| | | | | | | | the BB member to the current basic block after emitting instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53567 91177308-0d34-0410-b5e6-96231b3b80d8
* Back out 53476 and 53480 for now. Somehow they cause llc to miscompile 179.art.Evan Cheng2008-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53502 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for putting NamedRegionTimers in TimerGroups, andDan Gohman2008-07-11
| | | | | | | | | use a timer group for the timers in SelectionDAGISel. Also, Split scheduling out from emitting, to give each their own timer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53476 91177308-0d34-0410-b5e6-96231b3b80d8
* Use find instead of lower_bound.Dan Gohman2008-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53474 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some basic Pool-allocation infrastructure. This adds a Recycler class,Dan Gohman2008-07-07
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53210 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a version of AddString that takes a const char* so we can avoid extraneousOwen Anderson2008-07-01
| | | | | | | conversions to std::string. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52995 91177308-0d34-0410-b5e6-96231b3b80d8
* Append to the ActiveTimers std::vector before looking at the timer insteadDan Gohman2008-06-24
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52693 91177308-0d34-0410-b5e6-96231b3b80d8
* First step to fix PR2088. Implement routine to compute the Wojciech Matyjewicz2008-06-23
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52638 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid creating a redundant zero APInt.Dan Gohman2008-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52602 91177308-0d34-0410-b5e6-96231b3b80d8
* Consistently set "Buckets[NumBuckets] = reinterpret_cast<void*>(-1)" ↵Ted Kremenek2008-06-17
| | | | | | throughout FoldingSet.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52425 91177308-0d34-0410-b5e6-96231b3b80d8
* As comments said, for negative value, the arithmetic Zhou Sheng2008-06-05
| | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51999 91177308-0d34-0410-b5e6-96231b3b80d8
* Give a proper error message when a command line option is defined more thanMatthijs Kooijman2008-05-30
| | | | | | | | once (ie, at two different places in the source, not two times on the commandline). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51771 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove more iostream header includes. Needed to implement a "FlushStream"Bill Wendling2008-05-29
| | | | | | | function to flush a specified std::ostream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51705 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up whitespace in ConstantRange::print output.Dan Gohman2008-05-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51606 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't assume underlying APInt type is limitedDale Johannesen2008-05-14
| | | | | | | | to 64 bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51135 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove undefined behavior in hex string->APFloatDale Johannesen2008-05-14
| | | | | | | | conversion. Try 0x1.0000a4p+0f. Neil, please review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51132 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-13
| | | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51017 91177308-0d34-0410-b5e6-96231b3b80d8
* Make firstEightPowers const.Dan Gohman2008-05-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50975 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove uses of llvm/System/IncludeFile.h that are no longer needed.Dan Gohman2008-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50695 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix more -Wshorten-64-to-32 warnings.Evan Cheng2008-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50659 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress -Wshorten-64-to-32 warnings for 64-bit hosts.Evan Cheng2008-05-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50590 91177308-0d34-0410-b5e6-96231b3b80d8
* fcntl.h is pretty standard on unix (without the sys/)Gabor Greif2008-04-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50475 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a pointer-arithmetic bug that caused 64-bit host pointer values toDan Gohman2008-04-28
| | | | | | | | be truncated to 32 bits. This fixes the recent Benchmarks/McCat/09-vor regression on x86-64, among other things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50372 91177308-0d34-0410-b5e6-96231b3b80d8
* Bug fix in BumpPtrAllocator: don't assume that all objects have the same ↵Ted Kremenek2008-04-28
| | | | | | alignment. "Bump" of the pointer for the next allocated object to be of the specified alignment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50362 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for response files to the CommandLine library.Mikhail Glushenkov2008-04-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50355 91177308-0d34-0410-b5e6-96231b3b80d8
* Make these variables static.Dan Gohman2008-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50196 91177308-0d34-0410-b5e6-96231b3b80d8