summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* move Signals to .rodataNuno Lopes2012-04-211-1/+1
| | | | llvm-svn: 155283
* YAMLParser: silence warning about tautological comparison on unsigned-char ↵Benjamin Kramer2012-04-211-1/+1
| | | | | | | | platforms. No functionality change. llvm-svn: 155280
* SourceMgr: Colorize diagnostics.Benjamin Kramer2012-04-181-7/+41
| | | | | | Same color scheme as clang uses. The colors are only enabled if the output is a tty. llvm-svn: 155035
* SmallPtrSet: Reuse DenseMapInfo's pointer hash function instead of inventing ↵Benjamin Kramer2012-04-181-1/+2
| | | | | | | | | | a bad one ourselves. DenseMap's hash function uses slightly more entropy and reduces hash collisions significantly. I also experimented with Hashing.h, but it didn't gave a lot of improvement while being much more expensive to compute. llvm-svn: 154996
* fix error check in assertSeth Cantrell2012-04-181-1/+1
| | | | llvm-svn: 154971
* C++ has newlines at the end of files (including include files).David Blaikie2012-04-171-1/+1
| | | | llvm-svn: 154962
* platform support for counting column widths and checking isprintSeth Cantrell2012-04-175-0/+104
| | | | llvm-svn: 154944
* Goodbye, JSONParser...Manuel Klimek2012-04-172-303/+0
| | | | llvm-svn: 154930
* Reapply 'Add reverseColor to raw_ostream'.Benjamin Kramer2012-04-163-0/+49
| | | | | | | To be used in printing unprintable source in clang diagnostics. Patch by Seth Cantrell, with a minor fix for mingw by me. llvm-svn: 154805
* Revert r154800 which breaks windows builders.Argyrios Kyrtzidis2012-04-163-50/+0
| | | | llvm-svn: 154802
* Add reverseColor to raw_ostream.Argyrios Kyrtzidis2012-04-163-0/+50
| | | | | | | To be used in printing unprintable source in clang diagnostics. Patch by Seth Cantrell! llvm-svn: 154800
* Fix the build under Debian GNU/Hurd.Sylvestre Ledru2012-04-113-2/+17
| | | | | | Thanks to Pino Toscano for the patch llvm-svn: 154500
* FoldingSet: Push the hash through FoldingSetTraits::Equals, so clients can ↵Benjamin Kramer2012-04-111-3/+3
| | | | | | use it. llvm-svn: 154496
* In MemoryBuffer::getOpenFile() make sure that the buffer is null-terminated ifArgyrios Kyrtzidis2012-04-051-0/+11
| | | | | | | | | | | | | the caller requested a null-terminated one. When mapping the file there could be a racing issue that resulted in the file being larger than the FileSize passed by the caller. We already have an assertion for this in MemoryBuffer::init() but have a runtime guarantee that the buffer will be null-terminated, so do a copy that adds a null-terminator. Protects against crash of rdar://11161822. llvm-svn: 154082
* Move yaml::Stream's dtor out of line so it can see Scanner's dtor.Benjamin Kramer2012-04-041-0/+2
| | | | llvm-svn: 154004
* Sorry about that. MSVC seems to accept just about any random string you give ↵Michael J. Spencer2012-04-031-2/+2
| | | | | | it ;/ llvm-svn: 153979
* Add YAML parser to Support.Michael J. Spencer2012-04-032-0/+2116
| | | | llvm-svn: 153977
* Add triple support for the IBM BG/P and BG/Q supercomputers.Hal Finkel2012-04-021-0/+6
| | | | llvm-svn: 153882
* Lowercase the tag name to match the rest of dwarf.Eric Christopher2012-03-291-1/+1
| | | | llvm-svn: 153691
* Fix GetMainExecutable on kFreeBSD.Anton Korobeynikov2012-03-261-3/+3
| | | | | | Patch by Sylvestre Ledru! llvm-svn: 153435
* Fix null to integer conversion warnings.Jean-Daniel Dupas2012-03-241-2/+2
| | | | llvm-svn: 153395
* [PathV2]: Fix bug in create_directories which caused infinite recursion onMichael J. Spencer2012-03-211-5/+6
| | | | | | | | som inputs. Bug found and fix proposed by Kal Conley! llvm-svn: 153225
* Move APInt::operator[] inline.Benjamin Kramer2012-03-141-6/+0
| | | | llvm-svn: 152692
* Move APInt::operator! inline, it's small and fuses well with surrounding ↵Benjamin Kramer2012-03-141-10/+0
| | | | | | code when inlined. llvm-svn: 152688
* Add a sanity check in MemoryBuffer::getOpenFile() to make sure we don't hangArgyrios Kyrtzidis2012-03-131-1/+5
| | | | | | | | if the passed in FileSize is inaccurate. rdar://11034179 llvm-svn: 152662
* Inline a trivial helper function.Benjamin Kramer2012-03-121-7/+3
| | | | llvm-svn: 152577
* Don't cast away constant qualifier.Duncan Sands2012-03-121-1/+1
| | | | llvm-svn: 152553
* Replace a hand-coded leading one counting loop with the magic from MathExtras.h.Benjamin Kramer2012-03-111-8/+1
| | | | llvm-svn: 152545
* Make StringRef::getAsInteger work with all integer types. Before this changeMichael J. Spencer2012-03-101-29/+7
| | | | | | | | it would fail with {,u}int64_t on x86-64 Linux. This also removes code duplication. llvm-svn: 152517
* Add support for r600 (AMD GPUs HD2XXX - HD6XXX) target triplet.Anton Korobeynikov2012-03-091-0/+10
| | | | | | Patch by Tom Stellard! llvm-svn: 152400
* Silence unused function warning when graphviz is not available.Benjamin Kramer2012-03-081-5/+3
| | | | llvm-svn: 152346
* Revert commit 152300 (ddunbar) since it still seems to be breakingDuncan Sands2012-03-081-1/+43
| | | | | | | | | buildbots. Original commit message: [ADT] Change the trivial FoldingSetNodeID::Add* methods to be inline, reapplied with a fix for the longstanding over-read of 32-bit pointer values. llvm-svn: 152304
* [ADT] Change the trivial FoldingSetNodeID::Add* methods to be inline, reappliedDaniel Dunbar2012-03-081-43/+1
| | | | | | with a fix for the longstanding over-read of 32-bit pointer values. llvm-svn: 152300
* Revert r152288, "[ADT] Change the trivial FoldingSetNodeID::Add* methods to beDaniel Dunbar2012-03-081-1/+43
| | | | | | inline.", which is breaking the bots in a way I don't understand. llvm-svn: 152295
* [ADT] Change the trivial FoldingSetNodeID::Add* methods to be inline.Daniel Dunbar2012-03-081-43/+1
| | | | llvm-svn: 152288
* Copy the right amount of elements.Benjamin Kramer2012-03-071-3/+5
| | | | llvm-svn: 152254
* SmallPtrSet: Copy all the elements when swapping, not just numelements.Benjamin Kramer2012-03-071-5/+4
| | | | | | | This fixes a build failure in webkit. Copying all elements shouldn't be necessary, I'll look out for a better fix soon. llvm-svn: 152252
* Added -view-background to avoid waiting for each GraphViz invocation.Andrew Trick2012-03-071-39/+40
| | | | | | GV and XDOT paths are untested but should work the same. llvm-svn: 152179
* SmallPtrSet: Provide a more efficient implementation of swap than the ↵Benjamin Kramer2012-03-061-0/+50
| | | | | | | | | default triple-copy std::swap. This currently assumes that both sets have the same SmallSize to keep the implementation simple, a limitation that can be lifted if someone cares. llvm-svn: 152143
* Replace the hashing functions on APInt and APFloat with overloads of theChandler Carruth2012-03-042-103/+21
| | | | | | | | | | | | | | new hash_value infrastructure, and replace their implementations using hash_combine. This removes a complete copy of Jenkin's lookup3 hash function (which is both significantly slower and lower quality than the one implemented in hash_combine) along with a somewhat scary xor-only hash function. Now that APInt and APFloat can be passed directly to hash_combine, simplify the rest of the LLVMContextImpl hashing to use the new infrastructure. llvm-svn: 152004
* Add generic support for hashing StringRef objects using the new hashing library.Chandler Carruth2012-03-041-0/+7
| | | | llvm-svn: 152003
* Switch FoldingSet over to the new hashing infrastructure. We might wantChandler Carruth2012-03-011-18/+2
| | | | | | | | to do more invasive refactoring here to get FoldingSet to use size_t or even hash_code directly, but for now this is a good first step to remove Yet Another Hashing Algorithm from LLVM. llvm-svn: 151859
* BumpPtrAllocator: Make sure threshold cannot be initialized with a value ↵Benjamin Kramer2012-03-011-11/+6
| | | | | | | | smaller than the slab size. This replaces r151834 with a simpler fix. llvm-svn: 151842
* If BumpPtrAllocator is requested to allocate a size that exceeds the slab size,Argyrios Kyrtzidis2012-03-011-4/+9
| | | | | | increase the slab size. llvm-svn: 151834
* Add the source file with trivial definitions in it that was missing fromChandler Carruth2012-03-011-0/+29
| | | | | | | | r151822, sorry sorry. =[ We need 'git svn nothave' or some such... llvm-svn: 151824
* Rewrite LLVM's generalized support library for hashing to follow the APIChandler Carruth2012-03-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of the proposed standard hashing interfaces (N3333), and to use a modified and tuned version of the CityHash algorithm. Some of the highlights of this change: -- Significantly higher quality hashing algorithm with very well distributed results, and extremely few collisions. Should be close to a checksum for up to 64-bit keys. Very little clustering or clumping of hash codes, to better distribute load on probed hash tables. -- Built-in support for reserved values. -- Simplified API that composes cleanly with other C++ idioms and APIs. -- Better scaling performance as keys grow. This is the fastest algorithm I've found and measured for moderately sized keys (such as show up in some of the uniquing and folding use cases) -- Support for enabling per-execution seeds to prevent table ordering or other artifacts of hashing algorithms to impact the output of LLVM. The seeding would make each run different and highlight these problems during bootstrap. This implementation was tested extensively using the SMHasher test suite, and pased with flying colors, doing better than the original CityHash algorithm even. I've included a unittest, although it is somewhat minimal at the moment. I've also added (or refactored into the proper location) type traits necessary to implement this, and converted users of GeneralHash over. My only immediate concerns with this implementation is the performance of hashing small keys. I've already started working to improve this, and will continue to do so. Currently, the only algorithms faster produce lower quality results, but it is likely there is a better compromise than the current one. Many thanks to Jeffrey Yasskin who did most of the work on the N3333 paper, pair-programmed some of this code, and reviewed much of it. Many thanks also go to Geoff Pike Pike and Jyrki Alakuijala, the original authors of CityHash on which this is heavily based, and Austin Appleby who created MurmurHash and the SMHasher test suite. Also thanks to Nadav, Tobias, Howard, Jay, Nick, Ahmed, and Duncan for all of the review comments! If there are further comments or concerns, please let me know and I'll jump on 'em. llvm-svn: 151822
* Make MemoryObject accessor members const againDerek Schuff2012-02-292-17/+20
| | | | llvm-svn: 151687
* Support/PathV2: Fix namespace qualifier in make_absolute(), for Win32.Daniel Dunbar2012-02-291-1/+1
| | | | llvm-svn: 151685
* Support/PathV2: Fix make_absolute() to match is_absolute() and not expect toDaniel Dunbar2012-02-291-2/+6
| | | | | | | | | | find root names on Unix. - This fixes make_absolute to not basically always call current_path() on Unix systems. - I think the API probably needs cleanup in this area, but I'll let Michael handle that. llvm-svn: 151681
* [PathV2] Fix bug in relative_path.Michael J. Spencer2012-02-291-1/+1
| | | | llvm-svn: 151675
OpenPOWER on IntegriCloud