summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Disable load unfolding for 128-bit MOVDDUP instructions since the load ↵Craig Topper2017-01-071-2/+2
| | | | | | size is smaller than the register size so unfolding would increase the load size. llvm-svn: 291338
* Explicitly specify MSVC mangling of iostream globals. Patch from Dave LeeEric Fiselier2017-01-071-10/+42
| | | | llvm-svn: 291337
* system_error: correct ELAST emulation on WindowsSaleem Abdulrasool2017-01-071-1/+1
| | | | | | | | | | ELAST should point to the last valid error string value. However, `_sys_nerr` provides the number of elements in the errlist array. Since the index is 0-based, this is off-by-one. Adjust it accordingly. Thanks to David Majnemer for catching this! llvm-svn: 291336
* Fix a typo. NFCXin Tong2017-01-071-1/+1
| | | | llvm-svn: 291335
* NewGVN: Reformat and fix a few newlinesDaniel Berlin2017-01-071-2/+3
| | | | llvm-svn: 291334
* provide Win32 native threadingSaleem Abdulrasool2017-01-073-9/+263
| | | | | | | | | | | Add an implementation for the Win32 threading model as a backing API for the internal c++ threading interfaces. This uses the Fls* family for the TLS (which has the support for adding termination callbacks), CRITICAL_SECTIONs for the recursive mutex, and Slim Reader/Writer locks (SRW locks) for non-recursive mutexes. These APIs should all be available on Vista or newer. llvm-svn: 291333
* [libc++] Tolerate presence of __deallocate macroEric Fiselier2017-01-079-52/+21
| | | | | | | | | | | | | | | Summary: On Windows the identifier `__deallocate` is defined as a macro by one of the Windows system headers. Previously libc++ worked around this by `#undef __deallocate` and generating a warning. However this causes the WIN32 version of `__threading_support` to always generate a warning on Windows. This is not OK. This patch renames all usages of `__deallocate` internally as to not conflict with the macro. Reviewers: mclow.lists, majnemer, rnk, rsmith, smeenai, compnerd Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28426 llvm-svn: 291332
* thread: implement sleep_for on WindowsSaleem Abdulrasool2017-01-071-0/+7
| | | | | | | | | | Windows does not provide an implementation of `nanosleep`. Round up the time duration to the nearest ms and use `Sleep`. Although this may over-sleep, there is no hard real-time guarantee on the wake, so sleeping a bit more is better than under-sleeping as it within the specification. llvm-svn: 291331
* [libc++] Correct macro name in documenationShoaib Meenai2017-01-071-1/+1
| | | | | | | The macro is named `_LIBCPP_TEMPLATE_VIS`, not `_LIBCPP_TEMPLATE_ONLY`. No functional change. llvm-svn: 291330
* Add _LIBCPP_ABI_[ITANIUM|MICROSOFT] macros.Eric Fiselier2017-01-071-0/+9
| | | | | | | | | | This patch adds a libc++ configuration macro for the ABI we are targeting, either Itanium or Microsoft. For now we configure for the Microsoft ABI when on Windows with a compiler that defines _MSC_VER. However this is only temporary until Clang implements builtin macros we can use. llvm-svn: 291329
* [NewGVN] Prefer auto over explicit type. NFCI.Davide Italiano2017-01-071-1/+1
| | | | llvm-svn: 291328
* [WebAssembly] Don't abort on code with UB.Dan Gohman2017-01-073-7/+44
| | | | | | | | Gracefully leave code that performs function-pointer bitcasts implying non-trivial pointer conversions alone, rather than aborting, since it's just undefined behavior. llvm-svn: 291326
* [WebAssembly] Move a SmallVector to a more specific scope. NFC.Dan Gohman2017-01-071-2/+2
| | | | llvm-svn: 291324
* LowerTypeTests: Thread summary and action from the API and command line into ↵Peter Collingbourne2017-01-073-38/+87
| | | | | | | | | | | the pass. Also move command line handling out of the pass constructor and into a separate function. Differential Revision: https://reviews.llvm.org/D28422 llvm-svn: 291323
* [libcxx] [test] Strip trailing whitespace. NFC, no code review.Stephan T. Lavavej2017-01-075-8/+8
| | | | llvm-svn: 291322
* Remove useless Forward Declaration from header (NFC)Mehdi Amini2017-01-071-1/+0
| | | | llvm-svn: 291321
* [AVR] Parenthesize a boolean expressionDylan McKay2017-01-071-2/+2
| | | | | | | Without the parentheses, clang would emit warnings while compiling the code. llvm-svn: 291320
* PR20090: Add (passing) test from this bug; it's been fixed for a while.Richard Smith2017-01-071-0/+7
| | | | llvm-svn: 291319
* PR23135: Don't instantiate constexpr functions referenced in unevaluated ↵Richard Smith2017-01-0715-117/+218
| | | | | | | | | | | | | | | | | | | | | operands where possible. This implements something like the current direction of DR1581: we use a narrow syntactic check to determine the set of places where a constant expression could be evaluated, and only instantiate a constexpr function or variable if it's referenced in one of those contexts, or is odr-used. It's not yet clear whether this is the right set of syntactic locations; we currently consider all contexts within templates that would result in odr-uses after instantiation, and contexts within list-initialization (narrowing conversions take another victim...), as requiring instantiation. We could in principle restrict the former cases more (only const integral / reference variable initializers, and contexts in which a constant expression is required, perhaps). However, this is sufficient to allow us to accept libstdc++ code, which relies on GCC's behavior (which appears to be somewhat similar to this approach). llvm-svn: 291318
* [MachineBasicBlock] Add a non-assert live-in accessor for debug mode.Quentin Colombet2017-01-071-0/+10
| | | | | | | | | With r291169, it is now not possible to access the live-in information when the liveness is not properly tracked. Although this is want we want in general, for debugging purpose we may want to still be able to traverse this information even if it may not be accurate. llvm-svn: 291317
* Revert "Enable weak hooks on darwin"Francis Ricci2017-01-079-42/+1
| | | | | | | | Reverts accidental upload. This reverts commit 421408c0f2cc811bcf9a945be6e95e46f76cb358. llvm-svn: 291316
* [WebAssembly] Add a pass to create wrappers for function bitcasts.Dan Gohman2017-01-075-0/+210
| | | | | | | | | | | | WebAssembly requires caller and callee signatures to match exactly. In LLVM, there are a variety of circumstances where signatures may be mismatched in practice, and one can bitcast a function address to another type to call it as that type. This patch adds a pass which replaces bitcasted function addresses with wrappers to replace the bitcasts. This doesn't catch everything, but it does match many common cases. llvm-svn: 291315
* Enable weak hooks on darwinFrancis Ricci2017-01-079-1/+42
| | | | | | | | | | | | | | | | Summary: By default, darwin requires a definition for weak interface functions at link time. Adding the '-U' link flag with each weak function allows these weak interface functions to be used without definitions, which mirrors behavior on linux and windows. Reviewers: compnerd, eugenis Subscribers: kubabrecka, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D28203 llvm-svn: 291314
* Provide default implementations for sanitizer interface functionsFrancis Ricci2017-01-072-0/+18
| | | | | | | | | | | | | | Summary: Adds a few default implementations for weak interface functions on platforms where weak hooks are not supported. Reviewers: eugenis, samsonov, timurrrr Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28201 llvm-svn: 291313
* Test commit. Comment formatting, it's -> its.Jacob Gravelle2017-01-071-2/+1
| | | | llvm-svn: 291312
* Get all tuple tests passing on WindowsEric Fiselier2017-01-072-2/+3
| | | | llvm-svn: 291311
* [ThinLTO] Specify target triple in new testTeresa Johnson2017-01-071-1/+1
| | | | | | This should fix bot failures in this test. llvm-svn: 291310
* Fix linking of DLL's on WindowsEric Fiselier2017-01-073-23/+63
| | | | | | | | On Windows the runtime search path for DLL's is the same as PATH. This patch changes the test suite to add the libc++ build directory to the runtime PATH. llvm-svn: 291309
* NewGVN: Fix PR 31501.Daniel Berlin2017-01-073-38/+223
| | | | | | | | | | | | Summary: LLVM's non-standard notion of phi nodes means we can't both try to substitute for undef in phi nodes *and* use phi nodes as leaders all the time. This changes NewGVN to use the same semantics as SimplifyPHINode to decide which phi nodes are equivalent. Reviewers: davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28312 llvm-svn: 291308
* ModuleSummaryIndexYAML: Make a few fields optional to make it easier to ↵Peter Collingbourne2017-01-071-6/+6
| | | | | | write tests. llvm-svn: 291307
* Configure default ABI library as NONE on WindowsEric Fiselier2017-01-061-1/+6
| | | | llvm-svn: 291306
* Follow-up for r291277: Increase buffer size in uuid.cc testcase.Kuba Mracek2017-01-061-1/+1
| | | | | | 2048 should be enough for everyone. llvm-svn: 291305
* [ThinLTO] Handle conflicting local names gracefullyTeresa Johnson2017-01-064-6/+72
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: r285871 introduced an assert that was overly aggressive in the case of a same-named local in different same-named files (in different directories), where the source name and therefore the GUID ended up the same because the files were compiled in their own directory without any leading path. Change the handling in the promotion logic to get the summary for the version in that module. This also exposed an issue where we are not always importing the right copy, which is a performance not correctness issue (because the renaming is based on the module hash which must be different, see the bug report for details). I will fix that as a follow-on. Fixes PR31561. Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28411 llvm-svn: 291304
* [ThinLTO] Optionally ignore empty index fileTeresa Johnson2017-01-062-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In order to simplify distributed build system integration, where actions may be scheduled before the Thin Link which determines the list of objects selected by the linker. The gold plugin currently will emit 0-sized index files for objects not selected by the link, to enable checking for expected output files by the build system. If the build system then schedules a backend action for these bitcode files, we want to be able to fall back to normal compilation instead of failing. Fallback is enabled under an option in LLVM (D28410), in which case a nullptr is returned from llvm::getModuleSummaryIndexForFile. Clang can just proceed with non-ThinLTO compilation in that case. I am investigating whether this can be addressed in our build system, but that is a longer term fix and so this enables a workaround in the meantime. Reviewers: mehdi_amini Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28362 llvm-svn: 291303
* [ThinLTO] Optionally ignore empty index fileTeresa Johnson2017-01-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In order to simplify distributed build system integration, where actions may be scheduled before the Thin Link which determines the list of objects selected by the linker. The gold plugin currently will emit 0-sized index files for objects not selected by the link, to enable checking for expected output files by the build system. If the build system then schedules a backend action for these bitcode files, we want to be able to fall back to normal compilation instead of failing. This is the LLVM side support for optionally enabling fallback instead of issuing an error. Return a null CombinedIndex from llvm::getModuleSummaryIndexForFile under the option when the file is empty. Clang can then ignore the index when it is null. Clang patch is D28362. Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28410 llvm-svn: 291302
* [PM] Edit comments on PM Proxy and utility classes.Justin Lebar2017-01-061-67/+60
| | | | | | | | | | Reviewers: chandlerc Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D27502 llvm-svn: 291301
* Add a cc1 option to force disabling lifetime-markers emission from clangMehdi Amini2017-01-066-1/+12
| | | | | | | | Summary: This intended as a debugging/development flag only. Differential Revision: https://reviews.llvm.org/D28385 llvm-svn: 291300
* [gtest] Detect warning flags using the positive spelling.Chandler Carruth2017-01-063-7/+7
| | | | | | | | | | | | | | | | | | | | | Some GCC versions will accept any warning flag name after a '-Wno-', which would cause us to try to disable warnings with names GCC didn't understand. This will silently succeed unless there is some other output from GCC in which case we get weird cc1plus warnings about the warning name being bogus. There is still the issue that gtest sets warning flags for building gtest-all.cc using weird 'add_definitions' and the fact that there is a GCC version which warns on the variadic macro usage in gtest under -pedantic, but has no flag analogous to Clang's -Wgnu-zero-variadic-macro-argumnets to suppress this warning. I haven't been able to come up with any good solution here. The closest is to turn off -pedantic for those versions of GCC, but that seems really nasty. For now, those versinos of GCC aren't warning clean. If anyone is broken by this, I'll work on CMake logic to detect and disable -pedantic in these cases. llvm-svn: 291299
* Fix breakage caused when _LIBCPP_HAS_THREAD_API_PTHREAD is manually definedEric Fiselier2017-01-061-4/+3
| | | | llvm-svn: 291298
* [BPF] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2017-01-066-45/+42
| | | | | | minor fixes (NFC). llvm-svn: 291297
* [InstSimplify] Optimize away udivs in the presence of range metadataDavid Majnemer2017-01-062-0/+25
| | | | | | We know that udiv %V, C can be optimized away to 0 if %V is ult C. llvm-svn: 291296
* Revisit PR10177: don't instantiate a variable if it's only referenced in aRichard Smith2017-01-065-67/+75
| | | | | | | | | | | | | | dependent context and can't be used in a constant expression. Per C++ [temp.inst]p2, "the instantiation of a static data member does not occur unless the static data member is used in a way that requires the definition to exist". This doesn't /quite/ match that, as we still instantiate static data members that are usable in constant expressions even if the use doesn't require a definition. A followup patch will fix that for both variables and functions. llvm-svn: 291295
* Ensure that only one compiler-rt component is created for lsanFrancis Ricci2017-01-061-2/+1
| | | | | | | | | | | | | | | | Summary: The lsan cmake configuration failed when targeting more than one architecture, because it would attempt to create multiple components with the same name. Ensure that only one lsan component is ever created. Reviewers: beanz, bogner Subscribers: dberris, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D28151 llvm-svn: 291294
* Handle versioned undefined symbols.Rafael Espindola2017-01-063-6/+94
| | | | | | | In order to keep symbol lookup a simple name lookup this patch adds versioned symbols with an explicit @ to the symbol table. llvm-svn: 291293
* Follow-up for r291289: Fix failing global_metadata_darwin.ll testKuba Mracek2017-01-061-1/+1
| | | | llvm-svn: 291292
* Install lldb Python module on Windows.Zachary Turner2017-01-061-6/+9
| | | | | | | Patch by Vadim Chugunov Differential Revision: https://reviews.llvm.org/D27476 llvm-svn: 291291
* Convert MSF Stream iterators to use llvm iterator facade.Zachary Turner2017-01-061-40/+71
| | | | llvm-svn: 291290
* [asan] Change the visibility of ___asan_globals_registered to hiddenKuba Mracek2017-01-061-0/+1
| | | | | | | | This flag is used to track global registration in Mach-O and it doesn't need to be exported and visible. Differential Revision: https://reviews.llvm.org/D28250 llvm-svn: 291289
* Fix use after freeXin Tong2017-01-061-1/+1
| | | | | | | | | | | | Summary: Fix use after free in LoopUnswitch Reviewers: chenli, atrick, hfinkel, mzolotukhin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28412 llvm-svn: 291288
* [sanitizer] Use architecture/slice information when symbolizing fat Mach-O ↵Kuba Mracek2017-01-0612-36/+184
| | | | | | | | | | files on Darwin This patch starts passing architecture information about a module to llvm-symbolizer and into text reports. This fixes the longstanding x86_64/x86_64h mismatch issue on Darwin. Differential Revision: https://reviews.llvm.org/D27390 llvm-svn: 291287
OpenPOWER on IntegriCloud