summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
...
* Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid ↵Craig Topper2013-07-041-1/+1
| | | | | | specifying the vector size. llvm-svn: 185606
* Reapply r185601 with a fix for the cmake build.Eric Christopher2013-07-041-0/+10
| | | | llvm-svn: 185605
* Temporarily revert 185601 as it caused cmake build regressions.Eric Christopher2013-07-041-10/+0
| | | | llvm-svn: 185603
* Add support for futimens for platforms that don't support futimes.Eric Christopher2013-07-041-0/+10
| | | | | | Patch by pashev.igor. llvm-svn: 185601
* [APFloat] Swap an early out check so we do not dereference str.end().Michael Gottesman2013-07-021-1/+1
| | | | | | | Originally if D.firstSigDigit == str.end(), we will have already dereferenced D.firstSigDigit in the first predicate. llvm-svn: 185437
* [APFloat] Ensure that we can properly parse strings that do not have null ↵Michael Gottesman2013-07-011-1/+8
| | | | | | | | terminators. rdar://14323230 llvm-svn: 185397
* Fix a bad overflow check pointed out by Ben.Jakob Stoklund Olesen2013-06-281-4/+2
| | | | llvm-svn: 185226
* Eliminate an assortment of undefined behavior.Jakob Stoklund Olesen2013-06-281-1/+5
| | | | | | Hopefully, this fixes the PPC64 buildbots. llvm-svn: 185218
* Stylistic cleanups, no functional change.Jakob Stoklund Olesen2013-06-281-10/+7
| | | | | | | | - Use static functions instead of anonymous namespace. - Appease the Doxygen lobby. - Use 0-based induction variable. llvm-svn: 185185
* Add a division operator to BlockFrequency.Jakob Stoklund Olesen2013-06-281-23/+35
| | | | | | | | | | | Allow a BlockFrequency to be divided by a non-zero BranchProbability with saturating arithmetic. This will be used to compute the frequency of a loop header given the probability of leaving the loop. Our long division algorithm already saturates on overflow, so that was a freebie. llvm-svn: 185184
* Improve comment.Rafael Espindola2013-06-281-4/+3
| | | | llvm-svn: 185141
* Suppress GCC "control reaches end of non-void function" warning.Patrik Hagglund2013-06-281-0/+1
| | | | llvm-svn: 185136
* Improvements to unique_file and createUniqueDirectory.Rafael Espindola2013-06-283-241/+235
| | | | | | | | | | | | | | | | | | | * Don't try to create parent directories in unique_file. It had two problem: * It violates the contract that it is atomic. If the directory creation success and the file creation fails, we would return an error but the file system was modified. * When creating a temporary file clang would have to first check if the parent directory existed or not to avoid creating one when it was not supposed to. * More efficient implementations of createUniqueDirectory and the unique_file that produces only the file name. Now all 3 just call into a static function passing what they want (name, file or directory). Clang also has to be updated, so tests might fail if a bot picks up this commit and not the corresponding clang one. llvm-svn: 185126
* Don't ask for a mode when we are not keeping the file.Rafael Espindola2013-06-281-2/+2
| | | | llvm-svn: 185123
* Revert "Revert "[APFloat] Removed APFloat constructor which initialized to ↵Michael Gottesman2013-06-271-15/+5
| | | | | | | | | | | | | | | | | | | | either zero/NaN but allowed you to arbitrarily set the category of the float."" This reverts commit r185099. Looks like both the ppc-64 and mips bots are still failing after I reverted this change. Since: 1. The mips bot always performs a clean build, 2. The ppc64-bot failed again after a clean build (I asked the ppc-64 maintainers to clean the bot which they did... Thanks Will!), I think it is safe to assume that this change was not the cause of the failures that said builders were seeing. Thus I am recomitting. llvm-svn: 185111
* Revert "[APFloat] Removed APFloat constructor which initialized to either ↵Michael Gottesman2013-06-271-5/+15
| | | | | | | | | | | | zero/NaN but allowed you to arbitrarily set the category of the float." This reverts commit r185095. This is causing a FileCheck failure on the 3dnow intrinsics on at least the mips/ppc bots but not on the x86 bots. Reverting while I figure out what is going on. llvm-svn: 185099
* [APFloat] Removed APFloat constructor which initialized to either zero/NaN ↵Michael Gottesman2013-06-271-15/+5
| | | | | | | | | | | | | | but allowed you to arbitrarily set the category of the float. The category which an APFloat belongs to should be dependent on the actual value that the APFloat has, not be arbitrarily passed in by the user. This will prevent inconsistency bugs where the category and the actual value in APFloat differ. I also fixed up all of the references to this constructor (which were only in LLVM). llvm-svn: 185095
* Add a convenience createUniqueDirectory function.Rafael Espindola2013-06-271-0/+11
| | | | | | | | | | | There are a few valid situation where we care about the structure inside a directory, but not about the directory itself. A simple example is for unit testing directory traversal. PathV1 had a function like this, add one to V2 and port existing users of the created temp file and delete it hack to using it. llvm-svn: 185059
* [APFloat] Convert all references to fcNormal to references to isFiniteNonZero().Michael Gottesman2013-06-261-30/+30
| | | | | | | | | | | | Currently inside APFloat fcNormal still implies the old definition of Normal (i.e. isFiniteNonZero) instead of the proper IEEE-754R definition that the external method isNormal() uses. This patch prepares for the internal switch inside APFloat by converting all references that check if a category is fcNormal directly with an indirect call via isFiniteNonZero(). llvm-svn: 185036
* Rename PathV2 to just Path now that it is the only one.Rafael Espindola2013-06-264-11/+11
| | | | llvm-svn: 185015
* Use enums instead of raw octal values.Rafael Espindola2013-06-261-1/+0
| | | | | | Patch by 罗勇刚(Yonggang Luo). llvm-svn: 184971
* PathV1 is deprecated since the 18th of Dec 2010. Remove it.Rafael Espindola2013-06-264-1164/+0
| | | | llvm-svn: 184960
* Remove calls to Path in #ifdefs that don't seem to be used in any of the ↵Rafael Espindola2013-06-261-3/+3
| | | | | | bots :-( llvm-svn: 184920
* Fix the build when __APPLE__ is defined.Rafael Espindola2013-06-261-1/+5
| | | | llvm-svn: 184917
* Remove sys::GetMainExecutable.Rafael Espindola2013-06-262-116/+0
| | | | llvm-svn: 184916
* Port GetMainExecutable over to PathV2.Rafael Espindola2013-06-262-0/+113
| | | | | | I will remove the V1 version as soon as I change clang in the next commit. llvm-svn: 184914
* Remove PathWithStatus.Rafael Espindola2013-06-262-49/+0
| | | | llvm-svn: 184910
* Print block frequencies in decimal form.Jakob Stoklund Olesen2013-06-251-1/+10
| | | | | | | | | This is easier to read than the internal fixed-point representation. If anybody knows the correct algorithm for converting fixed-point numbers to base 10, feel free to fix it. llvm-svn: 184881
* Move GetEXESuffix to the one place it is used.Rafael Espindola2013-06-252-8/+0
| | | | llvm-svn: 184853
* Remove sys::PathSeparator.Rafael Espindola2013-06-252-4/+0
| | | | llvm-svn: 184852
* keep only the StringRef version of getFileOrSTDIN.Rafael Espindola2013-06-251-8/+0
| | | | llvm-svn: 184826
* Don't assume ResultPath is null terminated.Rafael Espindola2013-06-251-1/+2
| | | | llvm-svn: 184824
* Cleanup in unique_file when we only want the name.Rafael Espindola2013-06-251-2/+10
| | | | | | | | | This is really ugly, but it is no worse than what we have in clang right now and it is better to get it working first and clean/optimize it afterwards. Will be tested from clang in the next patch. llvm-svn: 184802
* [APFloat] Added support for parsing float strings which contain ↵Michael Gottesman2013-06-241-0/+29
| | | | | | {inf,-inf,NaN,-NaN}. llvm-svn: 184713
* [APFloat] Added make{Zero,Inf} methods and implemented get{Zero,Inf} on top ↵Michael Gottesman2013-06-241-0/+16
| | | | | | of them. llvm-svn: 184712
* [APFloat] Removed a assert from significandParts() which says that one can ↵Michael Gottesman2013-06-241-2/+0
| | | | | | | | | | | | | | | | | only access the significand of FiniteNonZero/NaN floats. The method significandParts() is a helper method meant to ease access to APFloat's significand by allowing the user to not need to be aware of whether or not the APFloat is using memory allocated in the instance itself or in an external array. This assert says that one can only access the significand of FiniteNonZero/NaN floats. This makes it cumbersome and more importantly dangerous when one wishes to zero out the significand of a zero/infinity value since one will have to deal with the aforementioned quandary related to how the memory in APFloat is allocated. llvm-svn: 184711
* [APFloat] Rename macro convolve => PackCategoriesIntoKey so that it is clear ↵Michael Gottesman2013-06-241-86/+92
| | | | | | | | | | | | what APFloat is actually using said macro for. In the context of APFloat, seeing a macro called convolve suggests that APFloat is using said value in some sort of convolution somewhere in the source code. This is misleading. I also added a documentation comment to the macro. llvm-svn: 184710
* [APFloat] Rename llvm::exponent_t => llvm::APFloat::ExponentType.Michael Gottesman2013-06-241-5/+5
| | | | | | | | | exponent_t is only used internally in APFloat and no exponent_t values are exposed via the APFloat API. In light of such conditions it does not make any sense to gum up the llvm namespace with said type. Plus it makes it clearer that exponent_t is associated with APFloat. llvm-svn: 184686
* Revert "BlockFrequency: Saturate at 1 instead of 0 when multiplying a ↵Benjamin Kramer2013-06-211-10/+2
| | | | | | | | frequency with a branch probability." This reverts commit r184584. Breaks PPC selfhost. llvm-svn: 184590
* BlockFrequency: Saturate at 1 instead of 0 when multiplying a frequency with ↵Benjamin Kramer2013-06-211-2/+10
| | | | | | | | | | | | | | | a branch probability. Zero is used by BlockFrequencyInfo as a special "don't know" value. It also causes a sink for frequencies as you can't ever get off a zero frequency with more multiplies. This recovers a 10% regression on MultiSource/Benchmarks/7zip. A zero frequency was propagated into an inner loop causing excessive spilling. PR16402. llvm-svn: 184584
* [NVPTX] Add support for selecting CUDA vs OCL mode based on tripleJustin Holewinski2013-06-211-0/+6
| | | | | | IR for CUDA should use "nvptx[64]-nvidia-cuda", and IR for NV OpenCL should use "nvptx[64]-nvidia-nvcl" llvm-svn: 184579
* Add another fixme.Rafael Espindola2013-06-201-0/+1
| | | | llvm-svn: 184488
* Remove last use of PathV1.h from Archive.cpp.Rafael Espindola2013-06-201-0/+2
| | | | llvm-svn: 184484
* make getLastModificationTime const. Move it with the other getters.Rafael Espindola2013-06-202-2/+2
| | | | llvm-svn: 184478
* Add a setLastModificationAndAccessTime to PathV2.Rafael Espindola2013-06-202-0/+21
| | | | | | With this we can remove the last use of PathV1 from llvm-ar.cpp. llvm-svn: 184464
* Add support for getting the last modification time from a file_status.Rafael Espindola2013-06-202-0/+17
| | | | | | Use that in llvm-ar.cpp to replace a use of sys::PathWithStatus. llvm-svn: 184450
* Fix get_magic() handling of short reads.Evgeniy Stepanov2013-06-201-2/+2
| | | | | | PR16389 llvm-svn: 184434
* Rename fs::GetUniqueID to fs::getUniqueID to match the style guide.Rafael Espindola2013-06-202-2/+2
| | | | llvm-svn: 184431
* Remove MSan hack that is no longer needed.Evgeniy Stepanov2013-06-201-2/+0
| | | | llvm-svn: 184428
* [Support/CrashRecoveryContext] Make sure CrashRecoveryContext does not clear ↵Argyrios Kyrtzidis2013-06-191-2/+11
| | | | | | | | | | | | | | | | | the thread-local "CurrentContext" in the "parent" thread, when we are using CrashRecoveryContext::RunSafelyOnThread. When using CrashRecoveryContext::RunSafelyOnThread, we would set a CrashRecoveryContextImpl* to a thread-local variable for the "child" thread, but CrashRecoveryContext would erroneously clear it in the "parent" thread. The result was that if CrashRecoveryContext::RunSafelyOnThread was called again in the "child" thread it would mess up crash-recovery for its parent. A test for this will be added in the clang repository. rdar://14204560 llvm-svn: 184380
OpenPOWER on IntegriCloud