aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* Patch apple-related breakage.Stephen Hines2012-03-071-2/+2
| | | | Change-Id: I77cc6b6c465dfc803c65144236c09e9592b90c87
* Merge with upstream LLVM @152063Stephen Hines2012-03-052-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed call to getsid() from LockFileManager.cpp, since bionic doesn't have support for it. Build updates +TableGenAction.cpp +X86ModRMFilters.cpp -InstrEnumEmitter.cpp -JITDebugRegisterer.cpp -MCLoggingStreamer.cpp +Hashing.cpp -ElfCodeEmitter.cpp -ElfWriter.cpp -ObjectCodeEmitter.cpp +DataStream.cpp +StreamableMemoryObject.cpp +CmpInstAnalysis.cpp +LockFileManager.cpp +IntrusiveRefCntPtr.cpp +ThreadSanitizer.cpp +ARMMachineFunctionInfo.cpp +ARMELFObjectWriter.cpp +MipsAnalyzeImmediate.cpp +MipsMachineFunction.cpp +X86MachineFunctionInfo.cpp +X86ELFObjectWriter.cpp +X86WinCOFFObjectWriter.cpp +ResourcePriorityQueue.cpp +ScheduleDAGVLIW.cpp +MachineCopyPropagation.cpp +MachineScheduler.cpp +RegAllocBase.cpp +libLLVMVectorize Change-Id: I69e700fe357e275ec509af1daaa7408cd3cde3a1
* Merge branch 'upstream' into merge-20120305Stephen Hines2012-03-0534-790/+1487
|\ | | | | | | | | | | | | Conflicts: lib/Support/Atomic.cpp Change-Id: I563b3bc2a82942ccbae5bed42e53b9149a8bf3a0
| * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152004 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add generic support for hashing StringRef objects using the new hashing library.Chandler Carruth2012-03-041-0/+7
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152003 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151859 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151842 91177308-0d34-0410-b5e6-96231b3b80d8
| * If BumpPtrAllocator is requested to allocate a size that exceeds the slab size,Argyrios Kyrtzidis2012-03-011-4/+9
| | | | | | | | | | | | increase the slab size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151834 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151824 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151822 91177308-0d34-0410-b5e6-96231b3b80d8
| * Make MemoryObject accessor members const againDerek Schuff2012-02-292-17/+20
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151687 91177308-0d34-0410-b5e6-96231b3b80d8
| * Support/PathV2: Fix namespace qualifier in make_absolute(), for Win32.Daniel Dunbar2012-02-291-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151685 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151681 91177308-0d34-0410-b5e6-96231b3b80d8
| * [PathV2] Fix bug in relative_path.Michael J. Spencer2012-02-291-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151675 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix undefined behavior.Ahmed Charles2012-02-241-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151385 91177308-0d34-0410-b5e6-96231b3b80d8
| * Workaround a miscompilation by gcc-4.3 that showed up as a failureDuncan Sands2012-02-241-1/+1
| | | | | | | | | | | | | | of the StringRef.Split2 unittest on 32 bit machines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151358 91177308-0d34-0410-b5e6-96231b3b80d8
| * Update for the removal of Hashing.cpp.Jay Foad2012-02-231-1/+0
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151249 91177308-0d34-0410-b5e6-96231b3b80d8
| * The implementation of GeneralHash::addBits broke C++ aliasing rules; fixJay Foad2012-02-231-46/+0
| | | | | | | | | | | | | | | | it with memcpy. This also fixes a problem on big-endian hosts, where addUnaligned would return different results depending on the alignment of the data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151247 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove extra semi-colons.Chad Rosier2012-02-221-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151169 91177308-0d34-0410-b5e6-96231b3b80d8
| * Support was removed from LLVM's MIPS backend for the PSP variant of thatChandler Carruth2012-02-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | chip in r139383, and the PSP components of the triple are really annoying to parse. Let's leave this chapter behind. There is no reason to expect LLVM to see a PSP-related triple these days, and so no reasonable motivation to support them. It might be reasonable to prune a few of the older MIPS triple forms in general, but as those at least cause no burden on parsing (they aren't both a chip and an OS!), I'm happy to leave them in for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151156 91177308-0d34-0410-b5e6-96231b3b80d8
| * Move the implementation of StringRef::split out of StringExtras.cppDuncan Sands2012-02-212-21/+21
| | | | | | | | | | | | | | and into StringRef.cpp, which is where the other StringRef stuff is. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151054 91177308-0d34-0410-b5e6-96231b3b80d8
| * Tiny cosmetic change to use the same style for all of the while loops inChandler Carruth2012-02-211-2/+4
| | | | | | | | | | | | the normalize routine, especially the empty while loops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151050 91177308-0d34-0410-b5e6-96231b3b80d8
| * Replace a hand rolled loop with a lovely StringRef helper we have theseChandler Carruth2012-02-211-4/+1
| | | | | | | | | | | | days. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151048 91177308-0d34-0410-b5e6-96231b3b80d8
| * Pull the parsing helper functions out of the Triple interface entirely.Chandler Carruth2012-02-211-89/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | They're private static methods but we can just make them static functions in the implementation. It makes the implementations a touch more wordy, but takes another chunk out of the header file. Also, take the opportunity to switch the names to the new coding conventions. No functionality changed here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151047 91177308-0d34-0410-b5e6-96231b3b80d8
| * Clean up comments that I missed when changing the triple representation.Chandler Carruth2012-02-211-10/+7
| | | | | | | | | | | | | | | | Somehow, I even missed the ones I wrote just the other day... Thanks to Matt for the code review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151045 91177308-0d34-0410-b5e6-96231b3b80d8
| * Switch the llvm::Triple class to immediately parse the triple string onChandler Carruth2012-02-211-20/+16
| | | | | | | | | | | | | | | | | | construction. Simplify its interface, implementation, and users accordingly as there is no longer an 'uninitialized' state to check for. Also, fixes a bug lurking in the interface as there was one method that didn't correctly check for initialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151024 91177308-0d34-0410-b5e6-96231b3b80d8
| * Move constructors out-of-line and flesh out their documentation. NoChandler Carruth2012-02-201-2/+32
| | | | | | | | | | | | | | functionality changed. This is in preparation for some refactoring of how this class behaves. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150941 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove dead code. Improve llvm_unreachable text. Simplify some control flow.Ahmed Charles2012-02-191-1/+0
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150918 91177308-0d34-0410-b5e6-96231b3b80d8
| * APFloat::toString(): Fix overrun at scanning.NAKAMURA Takumi2012-02-191-1/+1
| | | | | | | | | | | | FYI, clang/test/SemaTemplate/template-id-printing.cpp had been failing due to it on cygwin-clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150911 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix issue with bitwise and precedence.Ahmed Charles2012-02-181-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150897 91177308-0d34-0410-b5e6-96231b3b80d8
| * Hashing.h - utilities for hashing various data types.Talin2012-02-182-0/+47
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150890 91177308-0d34-0410-b5e6-96231b3b80d8
| * Trivial cleanup to group the generic 'armvN' cases with the 'arm' case,Chandler Carruth2012-02-181-4/+4
| | | | | | | | | | | | etc. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150867 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add function for computing the edit distance of two arrays.Kaelyn Uhrain2012-02-151-51/+5
| | | | | | | | | | | | | | | | Accomplished by moving the body of StringRef::edit_distance into a separate function that accepts two ArrayRefs, and making StringRef::edit_distance a wrapper around the new function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150621 91177308-0d34-0410-b5e6-96231b3b80d8
| * StringSwitchify the rest of Triple.cpp.Benjamin Kramer2012-02-121-62/+34
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150332 91177308-0d34-0410-b5e6-96231b3b80d8
| * Switch a bunch of manual if-chains to use StringSwitch. Clean them up inChandler Carruth2012-02-121-170/+93
| | | | | | | | | | | | | | | | the process. Some of these are still a bit gross. Still, this cuts 80 some lines out of this ridiculous file. ;] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150331 91177308-0d34-0410-b5e6-96231b3b80d8
| * Change default error_code ctor to a 'named ctor' so it's more self-documenting.David Blaikie2012-02-096-59/+54
| | | | | | | | | | | | | | | | | | | | | | Unify default construction of error_code uses on this idiom so that users don't feel compelled to make static globals for naming convenience. (unfortunately I couldn't make the original ctor private as some APIs don't return their result, instead using an out parameter (that makes sense to default construct) - which is a bit of a pity. I did, however, find/fix some cases of unnecessary default construction of error_code before I hit the unfixable cases) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150197 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove static initializer from DataStream.cppDavid Blaikie2012-02-091-12/+11
| | | | | | | | | | | | | | | | | | | | | | If someone would prefer a clear name for the 'success' error_value we could come up with one - potentially just a 'named constructor' style 'error_value::success()' to make this expression more self-documenting. If I see this come up in other cases I'll certainly consider it. One step along the way to resolving PR11944. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150120 91177308-0d34-0410-b5e6-96231b3b80d8
| * PathV2: Remove static StringRef ctors.Benjamin Kramer2012-02-081-4/+4
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150071 91177308-0d34-0410-b5e6-96231b3b80d8
| * Correct use of const in ParseCommandLineOptionsDavid Blaikie2012-02-071-5/+5
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149999 91177308-0d34-0410-b5e6-96231b3b80d8
| * Convert assert(0) to llvm_unreachableCraig Topper2012-02-072-4/+3
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149967 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix win32 build breakage from bitcode streaming patchDerek Schuff2012-02-071-1/+4
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149941 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix comment-rulers.Nick Lewycky2012-02-062-2/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149922 91177308-0d34-0410-b5e6-96231b3b80d8
| * Enable streaming of bitcodeDerek Schuff2012-02-064-1/+236
| | | | | | | | | | | | | | | | | | This CL delays reading of function bodies from initial parse until materialization, allowing overlap of compilation with bitcode download. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149918 91177308-0d34-0410-b5e6-96231b3b80d8
| * Introduce helpers to compute the 32-bit varaints and 64-bit variants ofChandler Carruth2012-02-061-0/+74
| | | | | | | | | | | | | | some architectures. These are useful for interacting with multiarch or bi-arch GCC (or GCC-based) toolchains. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149895 91177308-0d34-0410-b5e6-96231b3b80d8
| * fix typoSebastian Pop2012-02-061-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149856 91177308-0d34-0410-b5e6-96231b3b80d8
| * Persuade GCC that there is nothing worth warning about here (there isn't).Duncan Sands2012-02-051-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149834 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add new tag and an attribute to support debug info for objective-c property.Devang Patel2012-02-031-0/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149724 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add Triple::getMacOSXVersion to replace crufty code in the clang driver.Bob Wilson2012-01-311-0/+39
| | | | | | | | | | | | | | This new function provides a way to get the Mac OS X version number from either generic "darwin" triples of macosx triples. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149438 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add various coarse bit-width architecture predicates to llvm::Triple.Chandler Carruth2012-01-311-0/+49
| | | | | | | | | | | | | | These are very useful for frontends and other utilities reasoning about or selecting between triples. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149353 91177308-0d34-0410-b5e6-96231b3b80d8
| * Move Clang's file-level locking facility over to LLVM's supportDouglas Gregor2012-01-292-0/+217
| | | | | | | | | | | | | | library, since it doesn't really have anything to do with Clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149203 91177308-0d34-0410-b5e6-96231b3b80d8