summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* Ensuring that both bits are set, and not just a combination of one or the other.Aaron Ballman2013-04-031-1/+2
| | | | llvm-svn: 178674
* Testing for Visual Studio 2010 SP1 or greater before calling the _xgetbv ↵Aaron Ballman2013-04-031-2/+2
| | | | | | intrinsic. This also fixes a minor code formatting issue. llvm-svn: 178666
* Second pass at addressing PR15351 by explicitly checking for AVX supportAaron Ballman2013-04-031-2/+25
| | | | | | when getting the host processor information. It emits a .byte sequence on GNUC compilers to work around lack of xgetbv support with older assemblers, and resolves a comment typo found in the previous patch. llvm-svn: 178636
* Rolling back the AVX support patch due to breaking a gcc 4.6 build bot that ↵Aaron Ballman2013-04-031-23/+2
| | | | | | doesn't understand the xgetbv instruction for some reason. Will revisit when time permits. llvm-svn: 178614
* Attempting to fix the build on older GCC versions.Aaron Ballman2013-04-031-1/+2
| | | | llvm-svn: 178604
* This patch addresses PR15351 by explicitly checking for AVX supportAaron Ballman2013-04-031-2/+22
| | | | | | when getting the host processor information. llvm-svn: 178598
* Put private class into an anonmyous namespace.Benjamin Kramer2013-03-301-0/+2
| | | | llvm-svn: 178420
* SmallVector and SmallPtrSet allocations now power-of-two aligned.Jean-Luc Duprat2013-03-291-16/+8
| | | | | | This time tested on both OSX and Linux. llvm-svn: 178377
* Revert "Fix allocations of SmallVector and SmallPtrSet so they are more ↵Rafael Espindola2013-03-291-8/+16
| | | | | | | | | | | | | | | | | prone to" This reverts commit 617330909f0c26a3f2ab8601a029b9bdca48aa61. It broke the bots: /home/clangbuild2/clang-ppc64-2/llvm.src/unittests/ADT/SmallVectorTest.cpp:150: PushPopTest /home/clangbuild2/clang-ppc64-2/llvm.src/unittests/ADT/SmallVectorTest.cpp:118: Failure Value of: v[i].getValue() Actual: 0 Expected: value Which is: 2 llvm-svn: 178334
* Fix allocations of SmallVector and SmallPtrSet so they are more prone toJean-Luc Duprat2013-03-291-16/+8
| | | | | | being power-of-two sized. llvm-svn: 178332
* Don't try to generate crash diagnostics if we had an I/O failure. It's veryChad Rosier2013-03-271-1/+1
| | | | | | | likely the crash diagnostics generation will fail as well. Part of rdar://13296693 llvm-svn: 178163
* Add a boolean parameter to the llvm::report_fatal_error() function to indicatedChad Rosier2013-03-271-8/+8
| | | | | | | if crash diagnostics should be generated. By default this is enabled. Part of rdar://13296693 llvm-svn: 178161
* Add a boolean parameter to the ExecuteAndWait static function to indicatedChad Rosier2013-03-261-4/+7
| | | | | | | | | | if execution failed. ExecuteAndWait returns -1 upon an execution failure, but checking the return value isn't sufficient because the wait command may return -1 as well. This new parameter is to be used by the clang driver in a subsequent commit. Part of rdar://13362359 llvm-svn: 178087
* Add missing file to cmake build.Nick Lewycky2013-03-261-0/+1
| | | | llvm-svn: 177963
* Add a new watchdog timer interface. The interface does not permit handling ↵Nick Lewycky2013-03-265-1/+86
| | | | | | | | | timeouts, so it's only really useful if you're going to crash anyways. Use it in the pretty stack trace printer to kill the compiler if we hang while printing the stack trace. llvm-svn: 177962
* Revert r177543: Add timing of the IR parsing code with a newChandler Carruth2013-03-222-22/+0
| | | | | | | | | | | | | | | -time-ir-parsing flag This breaks the layering of the Support library. We can't add an implementation side to IRReader because it refers directly to entities only accessible as part of the IR, AsmParser, and BitcodeReader libraries. It can only be used in a context where all of those libraries will be available. We'll need to find some other way to get this functionality, and hopefully solve the long-standing layering problem of IRReader.h... llvm-svn: 177695
* <rdar://problem/13477190> On Darwin, use DARWIN_USER_TEMP_DIR or ↵Douglas Gregor2013-03-211-0/+24
| | | | | | | | | | DARWIN_USER_CACHE_DIR for the system temporary directory. The DARWIN_USER_TEMP_DIR and DARWIN_USER_CACHE_DIR configuration settings are more idiomatic for Darwin than the TMPDIR environment variable. llvm-svn: 177669
* Use pre-inc, pre-dec when possible.Jakub Staszak2013-03-201-4/+4
| | | | | | They are generally faster (at least not slower) than post-inc, post-dec. llvm-svn: 177608
* Add timing of the IR parsing code with a new -time-ir-parsing flagEli Bendersky2013-03-202-0/+22
| | | | llvm-svn: 177543
* Fix AsmPrinter crashes with assertion. Bug 15318 in BugzillaHao Liu2013-03-201-4/+2
| | | | llvm-svn: 177472
* [Support][Path][Windows] Fix dangling else. Don't call CloseHandle when ↵Michael J. Spencer2013-03-151-10/+10
| | | | | | CloseFD is false. llvm-svn: 177175
* Android uses cacheflush(long start, long end, long flags) for MIPS.Akira Hatanaka2013-03-141-0/+9
| | | | | | Patch by Stephen Hines. llvm-svn: 177101
* [Support] Fix lifetime of file descriptors when using MemoryBuffer.Michael J. Spencer2013-03-144-24/+37
| | | | | | | Clients of MemoryBuffer::getOpenFile expect it not to take ownership of the file descriptor passed in. So don't. llvm-svn: 176995
* Don't crash if write_impl() leaves less buffer space available than expected.Matt Beaumont-Gay2013-03-121-1/+6
| | | | | | This was tickled by a Clang diagnostic; Clang test case to follow. llvm-svn: 176911
* [Support][Path] Don't inf loop if creating the parent directory fails.Michael J. Spencer2013-03-121-1/+7
| | | | | | Patch by Paul Robinson. llvm-svn: 176908
* [Support][MemoryBuffer] Use sys::fs::mapped_file_region instead of ↵Michael J. Spencer2013-03-121-35/+44
| | | | | | | | sys::Path::MapInFilePages. This gives us memory mapped file I/O on Windows. llvm-svn: 176886
* Remove an unused member variable from HelpPrinter. Move another member ↵Craig Topper2013-03-091-6/+2
| | | | | | variable to be a local variable in the only method that uses it. llvm-svn: 176778
* Disable statistics on Release builds and move tests that depend on -stats.Jan Wen Voung2013-03-081-1/+17
| | | | | | | | | | | | | | | | | Summary: Statistics are still available in Release+Asserts (any +Asserts builds), and stats can also be turned on with LLVM_ENABLE_STATS. Move some of the FastISel stats that were moved under DEBUG() back out of DEBUG(), since stats are disabled across the board now. Many tests depend on grepping "-stats" output. Move those into a orig_dir/Stats/. so that they can be marked as unsupported when building without statistics. Differential Revision: http://llvm-reviews.chandlerc.com/D486 llvm-svn: 176733
* In llvm::MemoryBuffer::getFile() remove an unnecessary stat call check.Argyrios Kyrtzidis2013-03-011-0/+3
| | | | | | | | | | The sys::fs::is_directory() check is unnecessary because, if the filename is a directory, the function will fail anyway with the same error code returned. Remove the check to avoid an unnecessary stat call. Someone needs to review on windows and see if the check is necessary there or not. llvm-svn: 176386
* [PathV2] In llvm::sys::fs::unique_file, make sure it doesn't fall into an ↵Argyrios Kyrtzidis2013-02-281-1/+7
| | | | | | | | | | | infinite loop by constantly trying to create the parent path. This can happen if the path is a relative filename and the current directory was removed. Thanks to Daniel D. for the hint in fixing it. llvm-svn: 176226
* Add support for autodetection of ADM bdver2.Roman Divacky2013-02-261-1/+4
| | | | llvm-svn: 176130
* Previously, parsing capability of the .debug_frame section was addedEli Bendersky2013-02-211-0/+1
| | | | | | | | | | | | | | | | to lib/DebugInfo, with dumping in llvm-dwarfdump. This patch adds initial ability to parse and dump CFA instructions contained in entries. To keep it manageable, the patch omits some more advanced capabilities (accounted in TODOs): * Parsing of instructions with BLOCK arguments (expression lists) * Dumping of actual instruction arguments (currently only names are dumped). This is quite tricky since the dumper has to effectively "interpret" the instructions. llvm-svn: 175820
* Provide a "None" value for convenience when using Optional<T>()David Blaikie2013-02-211-2/+2
| | | | | | | This implementation of NoneType/None does have some holes but I haven't found one that doesn't - open to improvement. llvm-svn: 175696
* as the allocator is reset zero out the number of bytes allocated, this was justPedro Artigas2013-02-201-0/+1
| | | | | | missed before but probably what was intended. llvm-svn: 175687
* Fix accidental concatenation for "outputuntil" in the -debug-buffer-size ↵Erik Verbruggen2013-02-201-1/+1
| | | | | | option description. llvm-svn: 175682
* Rewrite comments.Dan Gohman2013-02-201-3/+5
| | | | llvm-svn: 175651
* Add comment in Memory.inc explaining r175646.Krzysztof Parzyszek2013-02-201-0/+7
| | | | llvm-svn: 175650
* SIGQUIT is a "kill" signal, rather than an "int" signal, in this context.Dan Gohman2013-02-201-2/+2
| | | | llvm-svn: 175648
* On PowerPC, the cache-flush instructions dcbf and icbi are treated asKrzysztof Parzyszek2013-02-201-0/+4
| | | | | | | loads. On FreeBSD, add PROT_READ page protection flag before flushing cache. llvm-svn: 175646
* Move part of APInt implementation from header to cpp file. These methodsJakub Staszak2013-02-201-0/+40
| | | | | | | require call cpp file anyway, so we wouldn't gain anything by keeping them inline. llvm-svn: 175579
* Update a portability kludge to keep it in sync with changes in the codeDan Gohman2013-02-191-2/+7
| | | | | | | which uses it. This is not ideal, but it ought to at least restore the behavior to what it was before. llvm-svn: 175571
* Whitelist files and block devices instead of blacklisting fifos andDan Gohman2013-02-191-3/+4
| | | | | | character devices. llvm-svn: 175549
* Don't trust st_size of a character device. This fixes usingDan Gohman2013-02-191-3/+3
| | | | | | | | | | /dev/stdin as an input when stdin is connected to a tty, for example. No test, because it's difficult to write a reasonably portable test for this. /dev/stdin isn't a character device when stdin is redirected from a file or connected to a pipe. llvm-svn: 175542
* Fix initialization-order bug in llvm::Support::TimeValue. TimeValue::now() ↵Alexey Samsonov2013-02-192-3/+9
| | | | | | is explicitly called during module initialization of lib/Support/Process.cpp. It reads the field of global object PosixZeroTime, which is not guaranteed to be initialized at this point. Found by AddressSanitizer with -fsanitize=init-order option. llvm-svn: 175509
* Make helpers static. Add missing include so LLVMInitializeObjCARCOpts gets C ↵Benjamin Kramer2013-02-151-2/+2
| | | | | | linkage. llvm-svn: 175264
* Workaround an MSan false positive.Evgeniy Stepanov2013-02-141-0/+2
| | | | llvm-svn: 175156
* Add static cast to unsigned char whenever a character classification ↵Guy Benyei2013-02-124-5/+7
| | | | | | function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration. llvm-svn: 175006
* More MSan/ASan annotations.Evgeniy Stepanov2013-02-042-2/+7
| | | | | | | | | | | | | | This change lets us bootstrap LLVM/Clang under ASan and MSan. It contains fixes for 2 issues: - X86JIT reads return address from stack, which MSan does not know is initialized. - bugpoint tests run binaries with RLIMIT_AS. This does not work with certain Sanitizers. We are no longer including config.h in Compiler.h with this change. llvm-svn: 174306
* Add AArch64 as an experimental target.Tim Northover2013-01-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for AArch64 (ARM's 64-bit architecture) to LLVM in the "experimental" category. Currently, it won't be built unless requested explicitly. This initial commit should have support for: + Assembly of all scalar (i.e. non-NEON, non-Crypto) instructions (except the late addition CRC instructions). + CodeGen features required for C++03 and C99. + Compilation for the "small" memory model: code+static data < 4GB. + Absolute and position-independent code. + GNU-style (i.e. "__thread") TLS. + Debugging information. The principal omission, currently, is performance tuning. This patch excludes the NEON support also reviewed due to an outbreak of batshit insanity in our legal department. That will be committed soon bringing the changes to precisely what has been approved. Further reviews would be gratefully received. llvm-svn: 174054
* Annotate BumpPtrAllocator for MemorySanitizer.Evgeniy Stepanov2013-01-311-0/+7
| | | | | | | This change adds MemorySanitizer annotations to BumpPtrAllocator to improve report quality. llvm-svn: 174051
OpenPOWER on IntegriCloud