summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* APFloat: x - NaN needs to flip the signbit of NaN when x is a number.Stephen Canon2014-06-081-1/+3
| | | | | | Because we don't have a separate negate( ) function, 0 - NaN does double-duty as the IEEE-754 negate( ) operation, which (unlike most FP ops) *does* attach semantic meaning to the signbit of NaN. llvm-svn: 210428
* GraphWriter: try gv before xdg-openAlp Toker2014-06-041-2/+2
| | | | | | | | | Avoid changing behaviour for everyone who's used to the traditional ghostview UI, especially since it knows how to stay in the foreground unlike xdg-open. Amendment to r210147. llvm-svn: 210148
* GraphWriter: support the XDG open utilityAlp Toker2014-06-041-2/+8
| | | | | | | This runs a suitable viewer on Unix desktop environments specified by Freedesktop.org (GNOME, KDE, Linux distributions etc.) llvm-svn: 210147
* Process::GetRandomNumber(): fix insecure RNGAlp Toker2014-06-031-2/+3
| | | | | | | This could have generated non-random output under error conditions in release builds. llvm-svn: 210065
* Silence -Wreturn-type warningAlp Toker2014-06-021-0/+1
| | | | llvm-svn: 210005
* GraphWriter: tweak the program fallback orderAlp Toker2014-06-021-1/+1
| | | | | | | Amend r210001 to use the classic fallback order behaviour if the requested graphing program isn't found. llvm-svn: 210003
* GraphWriter: detect graph viewer programs at runtimeAlp Toker2014-06-021-119/+129
| | | | | | | | | | | | | | | | | | | | | | Replace the crufty build-time configure checks for program paths with equivalent runtime logic. This lets users install graphing tools as needed without having to reconfigure and rebuild LLVM, while eliminating a long chain of inappropriate compile dependencies that included GUI programs and the windowing system. Additional features: * Support the OS X 'open' command to view graphs generated by any of the Graphviz utilities. This is an alternative to the Graphviz OS X UI which is no longer available on Mountain Lion. * Produce informative log output upon failure to indicate which programs can be installed to view graphs. Ping me if this doesn't work for your particular environment. llvm-svn: 210001
* Support: add Windows ARM EH data structuresSaleem Abdulrasool2014-06-022-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce the support structures necessary to deal with the Windows ARM EH data. These definitions are extremely aggressive about assertions to aid future use for generation of the entries and subsequent decoding. The names for the various fields are meant to reflect the names used by the Visual Studio toolchain to aid communication. Due to the complexity in reading a few of the values, there are a couple of additional utility functions to decode the information. In general, there are two ways to encode the unwinding information: - packed, which places the data inline into the _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY structure. - unpacked, which places the data into auxiliary structures placed into the .xdata section. The set of structures allow reading of data in either encoding, with the minor caveat that epilogue scopes need to be decoded manually by constructing the structure from the data returned by the RuntimeFunction structure. These definitions are meant for read-only access at the current point as the first use of them will be to decode the exception information. llvm-svn: 209998
* Fix typosAlp Toker2014-05-311-1/+1
| | | | llvm-svn: 209982
* [yaml2obj] Add new command line option `-docnum`.Simon Atanasyan2014-05-311-2/+2
| | | | | | | | | | Input YAML file might contain multiple object file definitions. New option `-docnum` allows to specify an ordinal number (starting from 1) of definition used for an object file generation. Patch reviewed by Sean Silva. llvm-svn: 209967
* Fix windows build.Rafael Espindola2014-05-312-3/+2
| | | | llvm-svn: 209961
* There is no std::errc::success, remove the llvm one.Rafael Espindola2014-05-312-3/+3
| | | | llvm-svn: 209960
* Turn errc and windows_error into enum classes.Rafael Espindola2014-05-312-7/+7
| | | | llvm-svn: 209957
* Use error_code() instead of error_code::succes()Rafael Espindola2014-05-3110-78/+78
| | | | | | | There is no std::error_code::success, so this removes much of the noise in transitioning to std::error_code. llvm-svn: 209952
* Fix the behavior of ExecuteAndWait with a non-zero timeout.Peter Collingbourne2014-05-311-1/+2
| | | | llvm-svn: 209951
* delete dead code.Rafael Espindola2014-05-312-40/+0
| | | | llvm-svn: 209938
* Fixup sys::getHostCPUFeatures crypto names so it doesn't clash with kernel ↵Bradley Smith2014-05-231-9/+9
| | | | | | headers llvm-svn: 209506
* Extend sys::getHostCPUFeatures to work on AArch64 platformsBradley Smith2014-05-221-1/+37
| | | | llvm-svn: 209420
* Clean up language and grammar.Eric Christopher2014-05-202-2/+2
| | | | | | | Based on a patch by jfcaron3@gmail.com! PR19806 llvm-svn: 209216
* MemoryBuffer: Use GetNativeSystemInfo()Alp Toker2014-05-192-17/+6
| | | | | | | Removes old 4096 byte workaround. This functionality has been available since Windows XP. llvm-svn: 209137
* Remove last uses of OwningPtr from llvm. As far as I can tell these method ↵Craig Topper2014-05-182-63/+0
| | | | | | versions are not used by lldb, lld, or clang. llvm-svn: 209103
* Fix hardcoded slash to native path seperator which was exposed from ↵Yaron Keren2014-05-162-1/+8
| | | | | | | | llvm::sys::path. http://reviews.llvm.org/D3687 llvm-svn: 208980
* MemoryBuffer: don't force mmap when stat failsAlp Toker2014-05-091-3/+2
| | | | | | | Fix error handling introduced in r127426 that could result in MemoryBuffers not having null termination. llvm-svn: 208396
* MemoryBuffer: remove unusued definitionsAlp Toker2014-05-091-8/+0
| | | | | | These were made redundant back in r186560. llvm-svn: 208395
* [Support/MemoryBuffer] Remove the assertion that the file size did not shrink.Argyrios Kyrtzidis2014-05-061-3/+0
| | | | | | This can happen in practice with the user changing files and we can recover from it. llvm-svn: 208143
* Re-commit r208025, reverted in r208030, with a fix for a conformance issueRichard Smith2014-05-061-7/+6
| | | | | | which GCC detects and Clang does not! llvm-svn: 208033
* Revert r208025, which made buildbots unhappy for unknown reasons.Richard Smith2014-05-061-6/+7
| | | | llvm-svn: 208030
* [Support/MemoryBuffer] Rename IsVolatile -> IsVolatileSize and add a comment ↵Argyrios Kyrtzidis2014-05-061-22/+23
| | | | | | about the use case for the new parameter. llvm-svn: 208026
* Add llvm::function_ref (and a couple of uses of it), representing a ↵Richard Smith2014-05-061-7/+6
| | | | | | type-erased reference to a callable object. llvm-svn: 208025
* Include intrin.h before windows.h as a workaround for the x64 self-hostReid Kleckner2014-05-061-0/+1
| | | | | | | | | On x64, windows.h doesn't include intrin.h for intrinsics. It just declares them in the global namespace and uses them, expecting the compiler to lower it as a builtin. We basically need to do this in clang, eventually. llvm-svn: 208023
* [Support/MemoryBuffer] Move the IsVolatile check inside shouldUseMmap() and ↵Argyrios Kyrtzidis2014-05-061-7/+13
| | | | | | | | make sure to zero-initialize the rest of the buffer if we unexpectedly reach end-of-file while reading. llvm-svn: 208021
* [Support/MemoryBuffer] Introduce a boolean parameter (false by default) ↵Argyrios Kyrtzidis2014-05-051-18/+32
| | | | | | | | 'IsVolatile' for the open file functions. This provides a hint that the file may be changing often so mmap is avoided. llvm-svn: 208007
* Select bdver2 instead of bdver1 if TBM support is present on models < 0x10.Kaelyn Takata2014-05-051-1/+2
| | | | | | | | | | Tested that the right -target-cpu is set in the clang -cc1 command line when running "clang -march=native -E -v - </dev/null" on both an FX-8150 and an FX-8350. Both are family 15h; the FX-8150 (Bulldozer processor) reports a model number of 1, and the FX-8350 (Piledriver processor) reports a model number of 2. llvm-svn: 207973
* Add a description for AMD's bdver4 (aka Excavator).Benjamin Kramer2014-05-021-0/+2
| | | | | | This is just bdver3 + AVX2 + BMI2. llvm-svn: 207847
* raw_ostream: Forward declare OpenFlags and include FileSystem.h only where ↵Benjamin Kramer2014-04-291-0/+1
| | | | | | necessary. llvm-svn: 207593
* BranchProb: Simplify printing codeDuncan P. N. Exon Smith2014-04-291-10/+4
| | | | llvm-svn: 207559
* blockfreq: Defer to BranchProbability::scale() (again)Duncan P. N. Exon Smith2014-04-291-93/+2
| | | | | | | | | | | | Change `BlockFrequency` to defer to `BranchProbability::scale()` and `BranchProbability::scaleByInverse()`. This removes `BlockFrequency::scale()` from its API (and drops the ability to see the remainder), but the only user was the unit tests. If some code in the future needs an API that exposes the remainder, we can add something to `BranchProbability`, but I find that unlikely. llvm-svn: 207550
* Support: remove unnecessary namespaceDuncan P. N. Exon Smith2014-04-291-5/+1
| | | | llvm-svn: 207545
* Support: Add BranchProbability::scale() and ::scaleByInverse()Duncan P. N. Exon Smith2014-04-291-0/+47
| | | | | | | Add API to `BranchProbability` for scaling big integers. Next job is to rip the logic out of `BlockMass` and `BlockFrequency`. llvm-svn: 207544
* [C++] Use 'nullptr'.Craig Topper2014-04-286-46/+47
| | | | llvm-svn: 207394
* Use raw_ostream and Format.h on Windows so that we don't have to rollChandler Carruth2014-04-281-5/+10
| | | | | | our own portability system to cope without snprintf. llvm-svn: 207389
* Update the Windows TimeValue formatting to match the new formatting onChandler Carruth2014-04-281-9/+5
| | | | | | Unix-like OSes. llvm-svn: 207388
* Teach the pass manager's execution dump to print the current time beforeChandler Carruth2014-04-271-3/+5
| | | | | | | | | | | | | | | each line. This is particularly nice for tracking which run of a particular pass over a particular function was slow. This also required making the TimeValue string much more useful. First, there is a standard format for writing out a date and time. Let's use that rather than strings that would have to be parsed. Second, actually output the nanosecond resolution that timevalue claims to have. This is proving useful working on PR19499, so I figured it would be generally useful to commit. llvm-svn: 207385
* cl::ParseCommandLineOptions(): Use StringRef to receive ↵NAKAMURA Takumi2014-04-231-1/+1
| | | | | | sys::path::filename() instead of std::string. llvm-svn: 206990
* [Modules] Fix potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-222-2/+4
| | | | | | definition below all of the header #include lines, lib/Support edition. llvm-svn: 206847
* [Modules] Followup to r206822 to add a DEBUG_TYPE which is used on ARMChandler Carruth2014-04-211-0/+2
| | | | | | and PPC, but not x86. llvm-svn: 206830
* [Modules] Make Support/Debug.h modular. This requires it to not changeChandler Carruth2014-04-212-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | behavior based on other files defining DEBUG_TYPE, which means it cannot define DEBUG_TYPE at all. This is actually better IMO as it forces folks to define relevant DEBUG_TYPEs for their files. However, it requires all files that currently use DEBUG(...) to define a DEBUG_TYPE if they don't already. I've updated all such files in LLVM and will do the same for other upstream projects. This still leaves one important change in how LLVM uses the DEBUG_TYPE macro going forward: we need to only define the macro *after* header files have been #include-ed. Previously, this wasn't possible because Debug.h required the macro to be pre-defined. This commit removes that. By defining DEBUG_TYPE after the includes two things are fixed: - Header files that need to provide a DEBUG_TYPE for some inline code can do so by defining the macro before their inline code and undef-ing it afterward so the macro does not escape. - We no longer have rampant ODR violations due to including headers with different DEBUG_TYPE definitions. This may be mostly an academic violation today, but with modules these types of violations are easy to check for and potentially very relevant. Where necessary to suppor headers with DEBUG_TYPE, I have moved the definitions below the includes in this commit. I plan to move the rest of the DEBUG_TYPE macros in LLVM in subsequent commits; this one is big enough. The comments in Debug.h, which were hilariously out of date already, have been updated to reflect the recommended practice going forward. llvm-svn: 206822
* ManagedStatic is never built with a null constructor, remove support for it.David Blaikie2014-04-171-2/+3
| | | | llvm-svn: 206492
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-159-25/+25
| | | | | | instead of comparing to nullptr. llvm-svn: 206252
* [ARM64] Add big endian target arm64_be.James Molloy2014-04-141-1/+9
| | | | llvm-svn: 206197
OpenPOWER on IntegriCloud