summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* tweak definition to avoid GCC warningSaleem Abdulrasool2017-01-041-1/+3
| | | | | | | | Use an `extern "C" { }` block around the definition rather than doing the inline definition. This avoids a GCC warning about a declaration being extern and having a definition. NFC. llvm-svn: 290937
* [clang] Update lit config in utils/perf-trainingAlexander Shaposhnikov2017-01-042-4/+3
| | | | | | | | | | | | This diff replaces --driver-mode=cpp in utils/perf-training/order-files.lit.cfg and utils/perf-training/lit.cfg with --driver-mode=g++. clang --driver-mode=cpp will call the preprocessor and will not trigger compilation. Differential revision: https://reviews.llvm.org/D28269 llvm-svn: 290936
* Support: Add YAML I/O support for custom mappings.Peter Collingbourne2017-01-043-3/+175
| | | | | | | | This will be used to YAMLify parts of the module summary. Differential Revision: https://reviews.llvm.org/D28014 llvm-svn: 290935
* [CMake] Fix install rules for tools included in the frameworkChris Bieneman2017-01-041-1/+1
| | | | | | The logic for install rules was wrong for tools included in the framework if the framework build is disabled. llvm-svn: 290934
* Fix deduction of pack elements after a braced-init-list.Richard Smith2017-01-042-6/+16
| | | | | | | | | | Previously, if the arguments for a parameter pack contained a braced-init-list, we would abort deduction (keeping the pack deductions from prior arguments) at the point when we reached the braced-init-list, resulting in wrong deductions and rejects-valids. We now just leave a "hole" in the pack for such an argument, which needs to be filled by another deduction of the same pack. llvm-svn: 290933
* ELF: Simplify; addOptionalSynthetic() does not need to return a value. NFC.Peter Collingbourne2017-01-041-9/+6
| | | | llvm-svn: 290932
* On a 64-bit system, the DWARFDebugLine::Row struct is 32 bytes. Each field ↵Eric Christopher2017-01-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | has the following byte offsets: 0-7: Address 8-11: Line 12-13: Column 14-15: File 16-19: Isa 20-23: Discriminator 24+: bit fields The packing is fine until the "Isa" field, which is an 8-bit int that occupies 4 bytes. We can instead move Discriminator into the 16-19 slot, and pack Isa into the 20-23 range along with the bit fields: 0-7: Address 8-11: Line 12-13: Column 14-15: File 16-19: Discriminator 20-23: Isa + bit fields This layout is only 24 bytes. This 25% reduction in size may seem small but a large binary can have line tables with thousands of rows stored in a vector. Patch by Simon Que! Differential Revision: https://reviews.llvm.org/D27961 llvm-svn: 290931
* Change clang-format's Chromium JavaScript defaultsNico Weber2017-01-041-0/+3
| | | | | | | | | | | | | | Chromium is starting to use clang-format on more JavaScript. In doing this, we discovered that our defaults were not doing a good job differentiating between JS and C++. This change moves some defaults to only apply to C++. https://reviews.llvm.org/D28165 Patch from Dan Beam <dbeam@chromium.org>! llvm-svn: 290930
* [InstCombine] Add a test for r290733David Majnemer2017-01-041-0/+71
| | | | llvm-svn: 290929
* [InstCombine] Move casts around shift operationsDavid Majnemer2017-01-043-5/+36
| | | | | | | It is possible to perform a left shift before zero extending if the shift would only shift out zeros. llvm-svn: 290928
* [InstCombine] Combine adds across a zextDavid Majnemer2017-01-042-0/+24
| | | | | | | | | We can perform the following: (add (zext (add nuw X, C1)), C2) -> (zext (add nuw X, C1+C2)) This is only possible if C2 is negative and C2 is greater than or equal to negative C1. llvm-svn: 290927
* Remove accidentally-added lines in r290923 test, and add another testcase.Richard Smith2017-01-041-2/+9
| | | | llvm-svn: 290926
* [Hexagon, TableGen] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2017-01-0413-392/+313
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 290925
* Refactor bitscan64 checkSaleem Abdulrasool2017-01-042-3/+5
| | | | | | | | Introduce a `_LIBCPP_HAS_BITSCAN64` macro to specify if the 64-bit variant of the bitscan family of APIs is available. This avoids duplicating the check in the support header. llvm-svn: 290924
* Fix template argument deduction when only some of a parameter pack is a ↵Richard Smith2017-01-043-36/+81
| | | | | | | | | | | | | | | | | non-deduced context. When a parameter pack has multiple corresponding arguments, and some subset of them are overloaded functions, it's possible that some subset of the parameters are non-deduced contexts. In such a case, keep deducing from the remainder of the arguments, and resolve the incomplete pack against whatever other deductions we've performed for the pack. GCC, MSVC, and ICC give three different bad behaviors for this case; what we do now (and what we did before) don't exactly match any of them, sadly :( I'm getting a core issue opened to specify more precisely how this should be handled. llvm-svn: 290923
* [libcxx] [test] Strip trailing whitespace.Stephan T. Lavavej2017-01-045-5/+5
| | | | | | Fixes D27786. llvm-svn: 290922
* [libcxx] [test] Fix recently introduced warnings emitted by MSVC.Stephan T. Lavavej2017-01-044-0/+16
| | | | | | | | | | These tests were using malloc()'s return value without checking for null, which MSVC's /analyze rightly warns about. Asserting that the pointer is non-null both expresses the test's intention and silences the warning. Fixes D27785. llvm-svn: 290921
* Extend -Wtautological-overlap-compare to more cases.Richard Trieu2017-01-042-3/+52
| | | | | | | | | | | Previously, -Wtautological-overlap-compare did not warn on cases where the boolean expression was in an assignment or return statement. This patch should cause all boolean statements to be passed to the tautological compare checks in the CFG analysis. This is one of the issues from PR13101 llvm-svn: 290920
* Add -plugin-opt=sample-profile for thinLTO build.Dehao Chen2017-01-042-0/+16
| | | | | | | | | | | | Summary: ThinLTO needs to pass down the sample profile file path to linker. Reviewers: tejohnson, davidxl, mehdi_amini Subscribers: bruno, cfe-commits Differential Revision: https://reviews.llvm.org/D27832 llvm-svn: 290919
* Correct the parent testing to avoid the special case where a DIE has a depth ↵Greg Clayton2017-01-041-29/+46
| | | | | | | | | | of 1 This test was testing that we could correctly find the parent of a DIE, but it was actually just testing the special case where a DIE's depth was 1. This corrects that error by adding an extra level into the the DWARF to ensure that we correctly get the parent by looking for the parent with a depth that is 1 less than the current depth. Differential Revision: https://reviews.llvm.org/D28261 llvm-svn: 290918
* Remove SymbolFilePDBTests.cpp from the list of tests to include in the Jason Molenda2017-01-041-2/+0
| | | | | | | | | | lldb-gtest binary that xcode builds for -scheme lldb-gtest; these tests won't run on macosx systems. Fixes testsuite failures we started seeing after 290819. <rdar://problem/29853778> llvm-svn: 290917
* Re-add objectsize function/incomplete type checks.George Burgess IV2017-01-032-2/+21
| | | | | | | I accidentally omitted these when refactoring this code. This caused problems when building parts of the test-suite on MacOS. llvm-svn: 290916
* [ThinLTO] Import type as decl only when non-null IdentifierTeresa Johnson2017-01-031-1/+1
| | | | | | | | As per post-commit review for r289993 (D27775), we can only safely import a type as a decl if it has an Identifier, as the Name alone is not enough to be unique across modules. llvm-svn: 290915
* Fix the MSVC version check.Zachary Turner2017-01-031-2/+2
| | | | | | | | | | I'm not sure what determines the minor version, but it appears that it's possible for a fully updated, release version of VS2015 with Update 3 can go (at least) as low as 19.00.24213.1. Updating the compiler version check to account for this so we don't generate superfluous warnings. llvm-svn: 290914
* InstCombine: Fold fabs on select of constantsMatt Arsenault2017-01-032-0/+60
| | | | llvm-svn: 290913
* [InstCombine] use 'match' to reduce code bloat; NFCISanjay Patel2017-01-031-15/+11
| | | | | | | | | | | I wrote this patch before seeing the comment in: https://reviews.llvm.org/D27114 ...that suggests we should actually be canonicalizing the other way. So just in case we decide this is the right way, we might as well have a cleaner implementation. llvm-svn: 290912
* clean up use of _WIN32Saleem Abdulrasool2017-01-0310-39/+48
| | | | | | | | | Replace the use of _WIN32 in libc++. Replace most use with a C runtime check _LIBCPP_MSVCRT or the new _LIBCPP_WIN32 to indicate that we are using the Win32 API. Use a new _LIBCPP_WCHAR_IS_UCS2 to indicate that we are on an environment that has a short wchar_t. llvm-svn: 290910
* [CodeGen] Further simplify returned call operand logic. NFC.Ahmed Bougacha2017-01-031-8/+2
| | | | | | As Pete points out in r290905, CallSite lets us avoid duplicating this! llvm-svn: 290909
* [ExecutionEngine] Fix compile errors in OProfileJITEventListener.Lang Hames2017-01-031-8/+8
| | | | | | | | Allows LLVM to build with LLVM_USE_OPROFILE=True. Patch by Mark Dewing. Thanks Mark! llvm-svn: 290908
* Relax CHECK line from r290906Reid Kleckner2017-01-031-1/+1
| | | | llvm-svn: 290907
* [Win64] Don't widen integer literal zero arguments to unprototyped function ↵Reid Kleckner2017-01-032-2/+8
| | | | | | | | | | | | | | | | | | | | | calls The special case to widen the integer literal zero when passed to variadic function calls should only apply to variadic functions, not unprototyped functions. This is consistent with what MSVC does. In this test case, MSVC uses a 4-byte store to pass the 5th argument to 'kr' and an 8-byte store to pass the zero to 'v': void v(int, ...); void kr(); void f(void) { v(1, 2, 3, 4, 0); kr(1, 2, 3, 4, 0); } Aaron Ballman discovered this issue in https://reviews.llvm.org/D28166 llvm-svn: 290906
* [CodeGen] Simplify logic that looks for returned call operands. NFC-ish.Ahmed Bougacha2017-01-031-22/+10
| | | | | | | | | | | | | | | Use getReturnedArgOperand() instead of rolling our own. Note that it's equivalent because there can only be one 'returned' operand. The existing code was also incorrect: there already was awkward logic to ignore callee/EH blocks, but operands can now also be operand bundles, in which case we'll look for non-existent parameter attributes. Unfortunately, this isn't observable in-tree, as it only crashes when exercising the regular call lowering logic with operand bundles. Still, this is a nice small cleanup anyway. llvm-svn: 290905
* [OpenMP] Code cleanup for NVPTX OpenMP codegenArpith Chacko Jacob2017-01-032-65/+31
| | | | | | | | | | | This patch cleans up private methods for NVPTX OpenMP codegen. It converts private members to static functions to follow the coding style of CGOpenMPRuntime.cpp and declutter the header file. Reviewers: ABataev Differential Revision: https://reviews.llvm.org/D28124 llvm-svn: 290904
* [InstCombine] tighten checks for tests of assume -> metadata transform; NFCSanjay Patel2017-01-031-25/+38
| | | | llvm-svn: 290903
* [X86][SSE] Add extra truncated arithmetic tests for D28219Simon Pilgrim2017-01-031-7/+221
| | | | llvm-svn: 290902
* Add llvm-bcanalyzer support for new metadata node types.Adrian Prantl2017-01-032-5/+12
| | | | | | Also sort the existing list by value. llvm-svn: 290901
* Enable disabled loopidiom test. Apparently we handle it nowXin Tong2017-01-031-5/+3
| | | | | | | | | | | | | | Summary: Enable disabled loopidiom test. Apparently we handle it now. Maybe due to improvements to AA. Reviewers: atrick, danielcdh, hfinkel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28171 llvm-svn: 290900
* [libFuzzer] disable -print_pcs by default (was enabled by mistake)Kostya Serebryany2017-01-031-0/+2
| | | | llvm-svn: 290899
* [OPENMP] Private, firstprivate, and lastprivate clauses for distribute, host ↵Carlo Bertolli2017-01-033-0/+603
| | | | | | | | | | | | code generation https://reviews.llvm.org/D17840 This patch enables private, firstprivate, and lastprivate clauses for the OpenMP distribute directive. Regression tests differ from the similar case of the same clauses on the for directive, by removing a reference to two global variables g and g1. This is necessary because: 1. a distribute pragma is only allowed inside a target region; 2. referring a global variable (e.g. g and g1) in a target region requires the program to enclose the variable in a "declare target" region; 3. declare target pragmas, which are used to define a declare target region, are currently unavailable in clang (patch being prepared). For this reason, I moved the global declarations into local variables. llvm-svn: 290898
* [ADT] APFloatBase: Prevent collapsing semPPCDoubleDouble and semBogusMichal Gorny2017-01-031-2/+6
| | | | | | | | | | | | | | | | | | | Provide a distinct contents for semBogus and semPPCDoubleDouble in order to prevent compilers from collapsing them to a single memory address, while we heavily rely on every semantic having distinct address. This happens if insecure optimization collapsing identical values is enabled. As a result, APFloats of semBogus are indistinguishable from semPPCDoubleDouble -- and whenever the move constructor is used, the old value beings being incorrectly recognized as a semPPCDoubleDouble. Since the values in semPPCDoubleDouble are not used anywhere, we can easily solve this issue via altering the value of one of the fields and therefore ensuring that the collapse can not occur. Differential Revision: https://reviews.llvm.org/D28112 llvm-svn: 290896
* Improve the performance of jModulesInfo in lldb-serverTamas Berghammer2017-01-032-105/+92
| | | | | | | | | | | | Previously it parsed /proc/<pid>/maps for every module separately resulting in a very slow response time. This CL add some caching and optimizes the implementation to improve the code from O(n*m) to O(n+m) where n is the number of modules requested and m is the number of files mapped into memory. Differential revision: https://reviews.llvm.org/D28233 llvm-svn: 290895
* [clang-tidy] Add check name to YAML export (clang-tools-extra part)Alexander Kornienko2017-01-0316-178/+243
| | | | | | | | | | | | Add a field indicating the associated check for every replacement to the YAML report generated with the '-export-fixes' option. Update clang-apply-replacements to handle the new format. Patch by Alpha Abdoulaye! Differential revision: https://reviews.llvm.org/D26137 llvm-svn: 290893
* [clang-tidy] Add check name to YAML exportAlexander Kornienko2017-01-037-16/+250
| | | | | | | | | | | | Add a field indicating the associated check for every replacement to the YAML report generated with the '-export-fixes' option. Update clang-apply-replacements to handle the new format. Patch by Alpha Abdoulaye! Differential revision: https://reviews.llvm.org/D26137 llvm-svn: 290892
* [clang-move] Support moving enum declarations.Haojian Wu2017-01-034-15/+93
| | | | | | | | | | Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28228 llvm-svn: 290891
* Fix-up TestLinuxCore for r290874Pavel Labath2017-01-031-0/+8
| | | | | | | | | | | | r290874 enabled the s390x test, which caused the rest of the tests to start misbehaving. This is because this test switches the selected platform and the change persists. This fixes it by explicitly resetting the platform in a similar way to the gcore tests do. Potentially we should consider re-setting the platform globally between each test run to better protect tests from each other. llvm-svn: 290890
* [libcxx] Add build/test support for the externally threaded libc++abi variantAsiri Rathnayake2017-01-035-19/+53
| | | | | | | Differential revision: https://reviews.llvm.org/D27576 Reviewers: EricWF llvm-svn: 290889
* [libcxxabi] Introduce an externally threaded libc++abi variant.Asiri Rathnayake2017-01-0313-153/+87
| | | | | | | | | | r281179 Introduced an externally threaded variant of the libc++ library. This patch adds support for a similar library variant for libc++abi. Differential revision: https://reviews.llvm.org/D27575 Reviewers: EricWF llvm-svn: 290888
* Handle StaticAssertDecl in DeclContextPrinterAlex Lorenz2017-01-032-0/+6
| | | | | | | | | | | This commit fixes a crash that occurs when -print-decl-contexts AST consumer tries to print an unhandled declaration. rdar://19467234 Differential Revision: https://reviews.llvm.org/D26964 llvm-svn: 290887
* Handle VarTemplateDecl in DeclContextPrinterAlex Lorenz2017-01-033-6/+13
| | | | | | | | | | | This commit fixes a crash that occurs when -print-decl-contexts AST consumer tries to print an unhandled declaration. rdar://19467234 Differential Revision: https://reviews.llvm.org/D26964 llvm-svn: 290886
* Handle AccessSpecDecl in DeclContextPrinterAlex Lorenz2017-01-032-0/+9
| | | | | | | | | | | This commit fixes a crash that occurs when -print-decl-contexts AST consumer tries to print an unhandled declaration. rdar://19467234 Differential Revision: https://reviews.llvm.org/D26964 llvm-svn: 290885
OpenPOWER on IntegriCloud