summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix build bots.Peter Collingbourne2017-01-051-2/+2
| | | | llvm-svn: 291073
* Get test-suite configuring on Windows with clang-clEric Fiselier2017-01-051-9/+50
| | | | | | | | | | | | | | | This patch gets the test suite "working" on Windows, although none of the tests pass. In order to reuse the existing configuration, which uses UNIX style flags not accepted by clang-cl, this patch only works with clang++. When clang-cl is specified the test harness secretly looks for clang++ and then it configures it using the INCLUDE and LIB enviroment variables. This is very much a work in progress. llvm-svn: 291072
* [sancov] workaround for absence of weak symbols on winMike Aizatsky2017-01-051-2/+1
| | | | llvm-svn: 291071
* [gtest] Teach the sanitizer's custom gtest compilations to disableChandler Carruth2017-01-052-0/+2
| | | | | | | | | | a warning that 'gtest-all.cc' directly triggers in the newer 1.8.0 version. This should fix a warning in folks' build and bring a couple of -Werror bots back to life. llvm-svn: 291070
* IR: Module summary representation for type identifiers; summary test ↵Peter Collingbourne2017-01-056-0/+239
| | | | | | | | | | | | | | | scaffolding for lowertypetests. Set up basic YAML I/O support for module summaries, plumb the summary into the pass and add a few command line flags to test YAML I/O support. Bitcode support to come separately, as will the code in LowerTypeTests that actually uses the summary. Also add a couple of tests that pass by virtue of the pass doing nothing with the summary (which happens to be the correct thing to do for those tests). Differential Revision: https://reviews.llvm.org/D28041 llvm-svn: 291069
* [sancov] introducing SANCOV_OPTIONSMike Aizatsky2017-01-056-4/+163
| | | | | | | | | | | | | | Summary: At this point SANCOV_OPTIONS are not functional but it is our intent to move here sanitizer coverage flags from various sanitizers _OPTIONS. Reviewers: kcc Subscribers: kubabrecka, mgorny Differential Revision: https://reviews.llvm.org/D28311 llvm-svn: 291068
* Revert r291025 ("AMDGPU: Remove unneccessary intermediate vector")Richard Smith2017-01-051-22/+18
| | | | | | | This caused buildbot failures due to returning ArrayRefs referencing local (temporary) objects. llvm-svn: 291067
* [PM] Fix a typo in a comment that Davide spotted in another code review.Chandler Carruth2017-01-051-1/+1
| | | | llvm-svn: 291066
* PR31540: install libc++abi headers into include/c++/v1 in build area.Richard Smith2017-01-051-1/+9
| | | | | | This allows an in-build-area clang binary to find <cxxabi.h>. llvm-svn: 291065
* Fix assertion failure on deduction failure due to too short template ↵Richard Smith2017-01-052-2/+10
| | | | | | | | | | | | argument list. We were previously incorrectly using TDK_TooFewArguments to report a template argument list that's too short, but it actually means that the number of arguments in a top-level function call was insufficient. When diagnosing the problem, SemaOverload would (rightly) assert that the failure kind didn't make any sense. llvm-svn: 291064
* [gtest] Work around broken installs of libc++ where we don't haveChandler Carruth2017-01-051-1/+7
| | | | | | | | | | | | | | | | | | | a cxxabi.h in the include search paths. This comes up when libc++ is installed with some other abi library. At some points in time in history we have had CMake hackery to try and get a cxxabi.h installed that would work, but there are lots of examples lacking this. Also, the just-built tree with libc++ seems to not quite get this right. To let folks make progress, we can easily work around this by detecting that the header is missing and disabling the relevant parts of gtest. This should fix the last remainging build bot failures. While these failures are typically indicative of a questionable install, I don't think gtest should be the thing that surfaces those issues and I don't want folks blocked on this. llvm-svn: 291063
* break overly long line in sanitizer_win.ccBob Haarman2017-01-051-1/+2
| | | | llvm-svn: 291062
* [AVX-512] Update vextract64x4 intrinsic upgrade test cases to use a legal ↵Craig Topper2017-01-051-3/+4
| | | | | | immediate so they test the instruction selection correctly. llvm-svn: 291061
* Fix XPASS buildbot failure related to structured bindingsEric Fiselier2017-01-051-1/+1
| | | | | | | | | | | The test was previously set to XFAIL if __cpp_structured_bindings wasn't defined. However there are Clang 4.0 versions which do not define this macro but do provide structured bindings, which causes the test to pass unexpectedly. This patch changes the XFAIL to an UNSUPPORTED. llvm-svn: 291060
* Fix PR26961 - Add default constructor to std::pointer_safety struct.Eric Fiselier2017-01-053-2/+37
| | | | | | | | In ABI v1 libc++ implements std::pointer_safety as a class type instead of an enumeration. However this class type does not provide a default constructor as it should. This patch adds that default constructor. llvm-svn: 291059
* [Sema] Mark undefined ctors as deleted. NFC.George Burgess IV2017-01-051-4/+4
| | | | | | | | Looks like these functions exist just to prevent bad implicit conversions. Rather than waiting for the linker to complain about undefined references to them, we can mark them as deleted. llvm-svn: 291058
* Fix std::pointer_safety type in ABI v2Eric Fiselier2017-01-056-3/+98
| | | | | | | | | | | | | | | | | | | | In the C++ standard `std::pointer_safety` is defined as a C++11 strongly typed enum. However libc++ currently defines it as a class type which simulates a C++11 enumeration. This can be detected in valid C++ code. This patch introduces an the _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE ABI option. When defined `std::pointer_safety` is implemented as an enum type. Unfortunatly this also means it can no longer be provided as an extension in C++03. Additionally this patch moves the definition for `get_pointer_safety()` out of the dylib, and into the headers. New usages of `get_pointer_safety()` will now use the inline version instead of the dylib version. However in order to keep the dylib ABI compatible the old definition is explicitly compiled into it. llvm-svn: 291046
* [MS] Instantiate default args during instantiation of exported default ctorsReid Kleckner2017-01-055-63/+89
| | | | | | | | | | | | | | | | | | | | Summary: Replace some old code that probably pre-dated the change to delay emission of dllexported code until after the closing brace of the outermost record type. Only uninstantiated default argument expressions need to be handled now. It is enough to instantiate default argument expressions when instantiating dllexported default ctors. This also fixes some double-diagnostic issues in this area. Fixes PR31500 Reviewers: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28274 llvm-svn: 291045
* Mark test that is testing statistics output as requiring AssertionsMehdi Amini2017-01-051-1/+1
| | | | | | We only enable statistic in an assert build by default. llvm-svn: 291044
* [InstSimplify] add tests to show missing select simplifications; NFCSanjay Patel2017-01-051-0/+28
| | | | llvm-svn: 291043
* fix warning about noreturn in sanitizer_win's internal__exit()Bob Haarman2017-01-051-1/+15
| | | | | | | | | | | | | | Summary: A previous fix used __assume(0), but not all compilers know that control will not pass that. This patch uses a macro which works in more compilers. Reviewers: rnk Subscribers: kubabrecka Differential Revision: https://reviews.llvm.org/D28268 llvm-svn: 291042
* Correct Vectorcall Register passing and HVA BehaviorErich Keane2017-01-053-53/+237
| | | | | | | | | | | | | Front end component (back end changes are D27392). The vectorcall calling convention was broken subtly in two cases. First, it didn't properly handle homogeneous vector aggregates (HVAs). Second, the vectorcall specification requires that only the first 6 parameters be eligible for register assignment. This patch fixes both issues. Differential Revision: https://reviews.llvm.org/D27529 llvm-svn: 291041
* [PM] Edit comments in PassManager.h.Justin Lebar2017-01-051-128/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This covers most of PassManager.h, up to the introduction of inner/outer analysis proxies. If there's a theme to these changes, it's simplifying the language. For example: * PreservedAnalyses is a "set of analyses", not an "abstract set". "Abstract" doesn't have any particular meaning here. * "Build types for the concept types" becomes "define the concept types". * Instead of "data structures optimized for pointer-like types using the alignment-provided low bits", say "data structures that use the low bits of pointers." * "Clear the map pointing into the results list" becomes "Delete the map entries that point into the results list." This patch also fixes a few places where we referred to "function" and "module" pass/analysis managers, instead of the more abstract "IRUnitT" PM/AMs we have now. Subscribers: mehdi_amini Differential Revision: https://reviews.llvm.org/D27367 llvm-svn: 291040
* Fix Sphinx build error caused by bad indentationEric Fiselier2017-01-051-1/+1
| | | | llvm-svn: 291039
* Patch gtest to move GTEST_IS_THREADSAFE out of unrelated GTEST_HAS_SEH ifdefReid Kleckner2017-01-051-2/+2
| | | | | | | Fixes the sanitizer Windows build, which happens to set -DGTEST_HAS_SEH=0. llvm-svn: 291038
* [DWARF] Null out the debug locs of load instructions that have been moved by ↵Wolfgang Pieb2017-01-042-9/+18
| | | | | | | | | | | GVN performing partial redundancy elimination (PRE). Not doing so can cause jumpy line tables and confusing (though correct) source attributions. Differential Revision: https://reviews.llvm.org/D27857 llvm-svn: 291037
* [gtest] The way EXPECT_TEST now works after upgrading gtest triggers anChandler Carruth2017-01-041-3/+6
| | | | | | | | ODR use. These traits don't have a definition as they're intended to be used strictly at compile time. Change the tests to use static_assert to move the entire thing into compile-time. llvm-svn: 291036
* [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VISEric Fiselier2017-01-0469-773/+774
| | | | | | | | | | | | | The name _LIBCPP_TYPE_VIS_ONLY is no longer accurate because both _LIBCPP_TYPE_VIS and _LIBCPP_TYPE_VIS_ONLY expand to __attribute__((__type_visibility__)) with Clang. The only remaining difference is that _LIBCPP_TYPE_VIS_ONLY can be applied to templates whereas _LIBCPP_TYPE_VIS cannot (due to dllimport/dllexport not being allowed on templates). This patch renames _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS. llvm-svn: 291035
* Only instantiate members of nested classes in local classes once, rather ↵Richard Smith2017-01-042-2/+16
| | | | | | than once per enclosing class. llvm-svn: 291034
* [gtest] Fix the way we disable a warning for unittests.Chandler Carruth2017-01-042-5/+4
| | | | | | | | I somehow wrote this fix and then lost it prior to commit. Really sorry about the noise. This should fix some issues with hacking add_definition to do things with warning flags. llvm-svn: 291033
* Fix private inheritance in C++03 tuple_sizeEric Fiselier2017-01-041-3/+3
| | | | llvm-svn: 291032
* Fix verify test on 32 bit systemsEric Fiselier2017-01-041-1/+1
| | | | llvm-svn: 291031
* Bail out if we try to build a DeclRefExpr naming an invalid declaration.Richard Smith2017-01-046-7/+15
| | | | | | | | | | | Most code paths would already bail out in this case, but certain paths, particularly overload resolution and typo correction, would not. Carrying on with an invalid declaration could in some cases result in crashes due to downstream code relying on declaration invariants that are not necessarily met for invalid declarations, and in other cases just resulted in undesirable follow-on diagnostics. llvm-svn: 291030
* [gtest] Upgrade googletest to version 1.8.0, minimizing local changes.Chandler Carruth2017-01-0436-2462/+5451
| | | | | | | | | This required re-working the streaming support and lit's support for '--gtest_list_tests' but otherwise seems to be a clean upgrade. Differential Revision: https://reviews.llvm.org/D28154 llvm-svn: 291029
* Implement P0505: 'Wording for GB 50'Marshall Clow2017-01-0412-35/+209
| | | | llvm-svn: 291028
* Use lazy-loading of Metadata in MetadataLoader when importing is enabled (NFC)Mehdi Amini2017-01-044-28/+443
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a relatively simple scheme: we use the index emitted in the bitcode to avoid loading all the global metadata. Instead we load the index with their position in the bitcode so that we can load each of them individually. Materializing the global metadata block in this condition only triggers loading the named metadata, and the ones referenced from there (transitively). When materializing a function, metadata from the global block are loaded lazily as they are referenced. Two main current limitations are: 1) Global values other than functions are not materialized on demand, so we need to eagerly load METADATA_GLOBAL_DECL_ATTACHMENT records (and their transitive dependencies). 2) When we load a single metadata, we don't recurse on the operands, instead we use a placeholder or a temporary metadata. Unfortunately tepmorary nodes are very expensive. This is why we don't have it always enabled and only for importing. These two limitations can be lifted in a subsequent improvement if needed. With this change, the total link time of opt with ThinLTO and Debug Info enabled is going down from 282s to 224s (~20%). Reviewers: pcc, tejohnson, dexonsmith Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28113 llvm-svn: 291027
* Change BitstreamCursor::skipRecord to return the record code (NFC)Mehdi Amini2017-01-042-6/+16
| | | | llvm-svn: 291026
* AMDGPU: Remove unneccessary intermediate vectorMatt Arsenault2017-01-041-18/+22
| | | | llvm-svn: 291025
* Fixup some header includes from recent IntrusiveRefCntPtr cleanup.David Blaikie2017-01-043-3/+1
| | | | llvm-svn: 291024
* [ADT] Attempt to fix GCC warning in IntrusiveRefCntPtrTest.Justin Lebar2017-01-041-1/+3
| | | | | | | Our copy constructor doesn't explicitly invoke the base class's constructor, and GCC is (rightly) concerned. llvm-svn: 291023
* InstCombine: Fold cos(-x) -> cos(x)Matt Arsenault2017-01-043-0/+103
| | | | | | Also cos(fabs(x)) -> cos(x) llvm-svn: 291022
* Use C++11 static_assert in variant tests. Patch from Michael ParkEric Fiselier2017-01-043-32/+32
| | | | llvm-svn: 291021
* [Parse] Don't ignore attributes after a late-parsed attr.George Burgess IV2017-01-042-2/+10
| | | | | | | | Without this, we drop everything after the first late-parsed attribute in a single __attribute__. (Where "drop" means "stuff everything into LA->Toks.") llvm-svn: 291020
* [libcxx] Re-implement LWG 2770 again: Fix tuple_size to work with structured ↵Eric Fiselier2017-01-047-36/+334
| | | | | | | | | | | | | | | | | | | bindings Summary: This patch attempts to re-implement a fix for LWG 2770, but not the actual specified PR. The PR for 2770 specifies tuple_size<T const> as only conditionally providing a `::value` member. However C++17 structured bindings require `tuple_size<T const>` to be complete only if `tuple_size<T>` is also complete. Therefore this patch implements only provides the specialization `tuple_size<T CV>` iff `tuple_size<T>` is a complete type. This fixes http://llvm.org/PR31513. Reviewers: mclow.lists, rsmith, mpark Subscribers: mpark, cfe-commits Differential Revision: https://reviews.llvm.org/D28222 llvm-svn: 291019
* Fix for LLVM Bitcode API change (to use std::shared_ptr)David Blaikie2017-01-045-136/+136
| | | | llvm-svn: 291018
* Remove use of intrusive ref count ownership acquisitionDavid Blaikie2017-01-042-5/+5
| | | | | | | | | | | The one use of CheckerManager (AnalysisConsumer, calling createCheckerManager) keeps a strong reference to the AnalysisOptions anyway, so this ownership wasn't necessary. (I'm not even sure AnalysisOptions needs ref counting at all - but that's more involved) llvm-svn: 291017
* Reapply "Make BitCodeAbbrev ownership explicit using shared_ptr rather than ↵David Blaikie2017-01-047-127/+119
| | | | | | | | | | | | | | | | | IntrusiveRefCntPtr"" If this is a problem for anyone (shared_ptr is two pointers in size, whereas IntrusiveRefCntPtr is 1 - and the ref count control block that make_shared adds is probably larger than the one int in RefCountedBase) I'd prefer to address this by adding a lower-overhead version of shared_ptr (possibly refactoring IntrusiveRefCntPtr into such a thing) to avoid the intrusiveness - this allows memory ownership to remain orthogonal to types and at least to me, seems to make code easier to understand (since no implicit ownership acquisition can happen). This recommits 291006, reverted in r291007. llvm-svn: 291016
* [Legalizer] Fix fp-to-uint to fp-tosint promotion assertion.Tim Shen2017-01-043-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When promoting fp-to-uint16 to fp-to-sint32, the result is actually zero extended. For example, given double 65534.0, without legalization: fp-to-uint16: 65534.0 -> 0xfffe With the legalization: fp-to-sint32: 65534.0 -> 0x0000fffe Without this patch, legalization wrongly emits a signed extend assertion, which is consumed by later icmp instruction, and cause miscompile. Note that the floating point value must be in [0, 65535), otherwise the behavior is undefined. This patch reverts r279223 behavior and adds more tests and documentations. In PR29041's context, James Molloy mentioned that: We don't need to mask because conversion from float->uint8_t is undefined if the integer part of the float value is not representable in uint8_t. Therefore we can assume this doesn't happen! which is totally true and good, because fptoui is documented clearly to have undefined behavior when overflow/underflow happens. We should take the advantage of this behavior so that we can save unnecessary mask instructions. Reviewers: jmolloy, nadav, echristo, kbarton Subscribers: mehdi_amini, nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D28284 llvm-svn: 291015
* Fix failure to treat overloaded function in braced-init-list as a ↵Richard Smith2017-01-046-59/+17
| | | | | | | | | | | | | non-deduced context. Previously, if an overloaded function in a braced-init-list was encountered in template argument deduction, and the overload set couldn't be resolved to a particular function, we'd immediately produce a deduction failure. That's not correct; this situation is supposed to result in that particular P/A pair being treated as a non-deduced context, and deduction can still succeed if the type can be deduced from elsewhere. llvm-svn: 291014
* Fix some buildbot issues with const objects with default ctorsDavid Blaikie2017-01-041-2/+2
| | | | llvm-svn: 291013
OpenPOWER on IntegriCloud