summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gn build: Merge r369039Nico Weber2019-08-151-2/+1
| | | | llvm-svn: 369047
* gn build: Merge r369018Nico Weber2019-08-151-1/+0
| | | | llvm-svn: 369046
* Fix nm on GCC 5.1 after the C++14 moveJF Bastien2019-08-151-6/+10
| | | | | | | | | | | | | | | | | Summary: As in D66306, fix the invocation of std::sort with std::function by not using std::function, since it's easier to read and is broken in libstdc++ from GCC 5.1 (see https://gcc.gnu.org/PR65942). Reviewers: thakis Subscribers: jkorous, mgrang, dexonsmith, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66310 llvm-svn: 369045
* Mark the test as unsupported on darwin, NFC.Alexey Bataev2019-08-151-1/+1
| | | | | | The bundler may fail on darwin, mark the test as not compatible. llvm-svn: 369044
* [Sema] Implement DR2386 for C++17 structured bindingReid Kleckner2019-08-153-8/+26
| | | | | | | | | | | | | | | | | | Allow implementations to provide complete definitions of std::tuple_size<T>, but to omit the 'value' member to signal that T is not tuple-like. The Microsoft standard library implements std::tuple_size<const T> this way. If the value member exists, clang still validates that it is an ICE, but if it does not, then the type is considered to not be tuple-like. Fixes PR33236 Reviewers: rsmith Differential Revision: https://reviews.llvm.org/D66040 llvm-svn: 369043
* [WebAssembly] Correctly handle va_arg of zero-sized structuresGuanzhong Chen2019-08-152-20/+61
| | | | | | | | | | | | | | | | | | | | | Summary: D66168 passes size 0 structs indirectly, while the wasm backend expects it to be passed directly. This causes subsequent variadic arguments to be read incorrectly. This diff changes it so that size 0 structs are passed directly. Reviewers: dschuff, tlively, sbc100 Reviewed By: dschuff Subscribers: jgravelle-google, aheejin, sunfish, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66255 llvm-svn: 369042
* Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVMDaniel Sanders2019-08-15239-1893/+1889
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This clang-tidy check is looking for unsigned integer variables whose initializer starts with an implicit cast from llvm::Register and changes the type of the variable to llvm::Register (dropping the llvm:: where possible). Partial reverts in: X86FrameLowering.cpp - Some functions return unsigned and arguably should be MCRegister X86FixupLEAs.cpp - Some functions return unsigned and arguably should be MCRegister X86FrameLowering.cpp - Some functions return unsigned and arguably should be MCRegister HexagonBitSimplify.cpp - Function takes BitTracker::RegisterRef which appears to be unsigned& MachineVerifier.cpp - Ambiguous operator==() given MCRegister and const Register PPCFastISel.cpp - No Register::operator-=() PeepholeOptimizer.cpp - TargetInstrInfo::optimizeLoadInstr() takes an unsigned& MachineTraceMetrics.cpp - MachineTraceMetrics lacks a suitable constructor Manual fixups in: ARMFastISel.cpp - ARMEmitLoad() now takes a Register& instead of unsigned& HexagonSplitDouble.cpp - Ternary operator was ambiguous between unsigned/Register HexagonConstExtenders.cpp - Has a local class named Register, used llvm::Register instead of Register. PPCFastISel.cpp - PPCEmitLoad() now takes a Register& instead of unsigned& Depends on D65919 Reviewers: arsenm, bogner, craig.topper, RKSimon Reviewed By: arsenm Subscribers: RKSimon, craig.topper, lenary, aemerson, wuzish, jholewinski, MatzeB, qcolombet, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, wdng, nhaehnle, sbc100, jgravelle-google, kristof.beyls, hiraditya, aheejin, kbarton, fedor.sergeev, javed.absar, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, tpr, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, Jim, s.egerton, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65962 llvm-svn: 369041
* [Hexagon] Fix instruction selection for vselect v4i8Krzysztof Parzyszek2019-08-153-16/+23
| | | | llvm-svn: 369040
* Revert [Bugpoint redesign] Added Pass to Remove Global VariablesDiego Trevino Ferrer2019-08-157-138/+1
| | | | | | | | | | | | | | This reverts r368918 because it was unstable! It broke these builds: * http://lab.llvm.org:8011/builders/lld-x86_64-ubuntu-fast/builds/4649 * http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/29966 * http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/29964 But surprisingly this passed: * http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/29965 llvm-svn: 369039
* MVT: Add v3i16/v3f16 vectorsMatt Arsenault2019-08-1512-340/+296
| | | | | | | | | | | | AMDGPU has some buffer intrinsics which theoretically could use this. Some of the generated tables include the 3 and 4 element vector versions of these rounded to 64-bits, which is ambiguous. Add these to help the table disambiguate these. Assertion change is for the path odd sized vectors now take for R600. v3i16 is widened to v4i16, which then needs to be promoted to v4i32. llvm-svn: 369038
* [NFC] Add a couple of dump routines for RegisterPressure helper classesPhilip Reames2019-08-152-0/+19
| | | | llvm-svn: 369037
* [ValueTracking] Look through ptrmask intrinsics during getUnderlyingObject.Florian Hahn2019-08-153-3/+34
| | | | | | | | | | | | | | Reviewers: nlopes, efriedma, hfinkel, sanjoy, aqjune, jdoerfert Reviewed By: jdoerfert Subscribers: jdoerfert, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61669 llvm-svn: 369036
* Rename this file from cx2.c to c2x.c; NFC.Aaron Ballman2019-08-151-0/+0
| | | | llvm-svn: 369035
* Change test to use uint64_t to support compiling for 32-bit architectures.Adrian Prantl2019-08-151-2/+2
| | | | llvm-svn: 369034
* Allow standards-based attributes to have leading and trailing underscores.Aaron Ballman2019-08-155-2/+13
| | | | | | This gives library implementers a way to use standards-based attributes that do not conflict with user-defined macros of the same name. Attributes in C2x require this behavior normatively (C2x 6.7.11p4), but there's no reason to not have the same behavior in C++, especially given that such attributes may be used by a C library consumed by a C++ compilation. llvm-svn: 369033
* [NFC] Added tests for 'select with ctlz to cttz' foldDavid Bolvansky2019-08-151-0/+249
| | | | llvm-svn: 369032
* [X86] Add custom type legalization for bitcasting mmx to v2i32/v4i16/v8i8 to ↵Craig Topper2019-08-159-122/+95
| | | | | | use movq2dq instead of going through memory. llvm-svn: 369031
* Add LLVMLibC proposal to docs/index.rst.Siva Chandra2019-08-151-0/+4
| | | | | | | | | | | | Reviewers: rupprecht Subscribers: arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66307 llvm-svn: 369030
* Link libpthread into LLVMCore.soBenjamin Kramer2019-08-151-0/+2
| | | | | | | After r369018 the compiler can inline pthread calls into users of RWMutex. llvm-svn: 369029
* Fix the test, NFC.Alexey Bataev2019-08-151-1/+1
| | | | llvm-svn: 369028
* Revert "MemoryBuffer: Add a missing error-check to getOpenFileImpl"Pavel Labath2019-08-152-54/+1
| | | | | | This reverts commit r368977 because it broke a couple of tests in lldb. llvm-svn: 369027
* [DebugInfo] Avoid crash from dropped fragments in LiveDebugValuesJeremy Morse2019-08-152-4/+128
| | | | | | | | | | | | | | | | | | | This patch avoids a crash caused by DW_OP_LLVM_fragments being dropped from DIExpressions by LiveDebugValues spill-restore code. The appearance of a previously unseen fragment configuration confuses LDV, as documented in PR42773, and reproduced by the test function this patch adds (Crashes on a x86_64 debug build). To avoid this, on spill restore, we now use fragment information from the spilt-location-expression. In addition, when spilling, we now don't spill any DBG_VALUE with a complex expression, as it can't be safely restored and will definitely lead to an incorrect variable location. The discussion of this is in D65368. Differential Revision: https://reviews.llvm.org/D66284 llvm-svn: 369026
* [CallGraph] Refine call graph for indirect calls with !callees metadataMark Lacey2019-08-158-7/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For indirect call sites having a small set of possible callees, !callees metadata can be used to indicate what those callees are. This patch updates the call graph and lazy call graph analyses so that they consider this metadata when encountering call sites. For the call graph, it adds a new external call graph node to the graph for each unique !callees metadata node. A call graph edge connects an indirect call site with the external node associated with the !callees metadata that is attached to it. And there is an edge from this external node to each of the callees indicated by the metadata. Similarly, for the lazy call graph, the patch adds Ref edges from a caller to the possible callees indicated by the metadata. The primary purpose of the patch is to facilitate iterating over the functions in a module such that all of the callees indicated by a given !callees metadata node will be visited prior to the functions containing call sites annotated by that node. This property is required by optimizations performing a bottom-up traversal of the SCC DAG. For example, the inliner can be made to inline through an indirect call. If the call site is annotated with !callees metadata, this patch ensures that the inliner will have visited all of the callees prior to the caller, allowing it to reliably compute the cost of inlining one or more of the potential callees. Original patch by @mssimpso. I've made some small changes to get it to apply, build, and pass tests on the top of tree, as well as some minor tweaks to formatting and functionality. Subscribers: mehdi_amini, hiraditya, llvm-commits, mssimpso Tags: #llvm Differential Revision: https://reviews.llvm.org/D39339 llvm-svn: 369025
* [NewPM][PassInstrumentation] IR printing support for (Thin)LTOTaewook Oh2019-08-152-1/+17
| | | | | | | | | | | | | | Summary: IR printing has not been correctly supported with (Thin)LTO if the new pass manager is enabled. Previously we only get outputs from backend(codegen) passes, as they are still under legacy pass manager even when the new pass manager is enabled. This patch addresses the issue and enables IR printing for optimization passes with new pass manager + (Thin)LTO setting. Reviewers: fedor.sergeev, philip.pfaffe Subscribers: mehdi_amini, inglorion, hiraditya, steven_wu, dexonsmith, dang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66253 llvm-svn: 369024
* Fix lld on GCC 5.1 after the C++14 moveJF Bastien2019-08-151-26/+24
| | | | | | | | | | | | | | | | | | | | | | | Summary: libstdc++ in GCC 5.1 has some bugs. The move to C++14 in D66195 triggered one such bug caused by the new constexpr support in C++14, and the implementation doing SFINAE wrong with the comparator to std::stable_sort. Here's a small repro: https://godbolt.org/z/2QC3-n The fix is to inline the lambdas directly into the llvm::stable_sort call instead of erasing them through a std::function. The code is more readable as well. Reviewers: thakis, ruiu, espindola Subscribers: emaste, arichardson, MaskRay, jkorous, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66306 llvm-svn: 369023
* [X86] Improve cost model for subvector extraction of less than 128-bit vectorsCraig Topper2019-08-152-615/+886
| | | | | | | | Now that we're using widening legalization. We need to improve our extract_subvector cost model for these types. This patch begins by modeling these as a subvector extract followed by a permute. I've left FIXMEs in the code for future improvements. Differential Revision: https://reviews.llvm.org/D65892 llvm-svn: 369022
* [sanitizer_common] Always use posix_spawn on DarwinJulian Lettner2019-08-151-1/+2
| | | | | | | | | | | | | On Darwin we have two external symbolizers: atos and llvm-symbolizer. atos was changed to use posix_spawn (instead of fork+execv) in a previous commit [1]. Let's use posix_spawn for llvm-symbolizer as well. Our hope is that eventually we can transition to posix_spawn on other platforms too. [1] 399408a92f1dbbefeb708f718b0d8eb62dfa9f09 llvm-svn: 369021
* Test commit #2.George Karpenkov2019-08-151-0/+1
| | | | llvm-svn: 369020
* [Driver][Bundler] Improve bundling of object files.Alexey Bataev2019-08-152-29/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, object files were bundled using partial linking. It resulted in the following structure of the bundled objects: ``` <host_code> clang-offload-bundle __CLANG_OFFLOAD_BUNDLE__<target> <target_code> ``` But when we tried to unbundle object files, it worked correctly only for the target objects. The host object remains bundled. It produced a lot of junk sections in the host object files and in some cases may caused incorrect linking. Patch improves bundling of the object files. After this patch the bundled object looks like this: ``` <host_code> clang-offload-bundle __CLANG_OFFLOAD_BUNDLE__<target> <target_code> __CLANG_OFFLOAD_BUNDLE__<host> <host_code> ``` With this structure we are able to unbundle the host object files too so that after unbundling they are the same as were before. The host section is bundled twice. The bundled section is used to unbundle the original host section. Reviewers: yaxunl, tra, jlebar, hfinkel, jdoerfert Subscribers: caomhin, kkwli0, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65819 llvm-svn: 369019
* [Support] Base RWMutex on std::shared_timed_mutex (C++14)Benjamin Kramer2019-08-155-398/+27
| | | | | | | | This should have the same semantics. We use std::shared_mutex instead on MSVC and C++17, std::shared_timed_mutex is less efficient than our custom implementation on Windows, std::shared_mutex should be faster. llvm-svn: 369018
* [LLVM][Alignment] Fix MSVC potential division by 0 warning (PR42911)Simon Pilgrim2019-08-151-0/+10
| | | | | | | | Original Patch by @gchatelet (Guillaume Chatelet) Differential Revision: https://reviews.llvm.org/D65859 llvm-svn: 369016
* [BUNDLER]Improve the test, NFC.Alexey Bataev2019-08-152-57/+60
| | | | | | | | | | | | | | | | Summary: Make the test more portable and do not rely on the pre-bundled object file. Reviewers: Hahnfeld, hfinkel, jdoerfert Subscribers: caomhin, kkwli0, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66296 llvm-svn: 369015
* [Hexagon] Generate vector min/max for HVXKrzysztof Parzyszek2019-08-158-181/+934
| | | | llvm-svn: 369014
* [llvm] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-15430-1472/+1472
| | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. llvm-svn: 369013
* Add a proposal for a libc project under the LLVM umbrella.Siva Chandra2019-08-151-0/+125
| | | | | | | | | | | | Reviewers: chandlerc, dlj, echristo, hfinkel, jfb, zturner Subscribers: dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64939 llvm-svn: 369012
* [cmake] install_symlink should obey DESTDIR unconditionallyJustin Bogner2019-08-151-1/+1
| | | | | | | Setting DESTDIR was erroneously buried under a condition here - if it's set it should always be used. llvm-svn: 369011
* [MCA] Slightly refactor class RetireControlUnit, and add the ability to ↵Andrea Di Biagio2019-08-157-58/+96
| | | | | | | | | | | | | | | | | | | override the mask of used buffered resources in class mca::Instruction. NFCI This patch teaches the RCU how to peek 'next' RCUTokens. A new method has been added to the RetireControlUnit class with the goal of minimizing the complexity of follow-up patches that will enable macro-fusion support in mca. This patch also adds method Instruction::getNumMicroOpcodes() to simplify common interactions with the instruction descriptor (a pattern quite common in some pipeline stages). Added the ability to override the default set of consumed scheduler resources (this -again- is to simplify future patches that add support for macro-op fusion). No functional change intended. llvm-svn: 369010
* Re-land "[compiler-rt] Migrate llvm::make_unique to std::make_unique"Jonas Devlieghere2019-08-151-13/+13
| | | | | | | With the compiler-rt check for C++14 updated in r368960, this should now be fine to land. llvm-svn: 369009
* Remove SmallBitVector.h include. NFCI.Simon Pilgrim2019-08-151-1/+0
| | | | | | SmallBitVector/BitVector types aren't used at all in the cpp file. llvm-svn: 369008
* Remove BitVector.h include. NFCI.Simon Pilgrim2019-08-151-1/+0
| | | | | | BitVector type isn't used at all in the cpp file. llvm-svn: 369007
* [PowerPC] Use xxleqv to set all one vector IMM(-1).Jinsong Ji2019-08-1511-70/+88
| | | | | | | | | | | | | | | | | | Summary: xxspltib/vspltisb are 3 cycle PM instructions, xxleqv is 2 cycle ALU instruction. We should use xxleqv to set all one vectors. Reviewers: hfinkel, nemanjai, steven.zhang Subscribers: hiraditya, kbarton, MaskRay, shchenz, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65529 llvm-svn: 369006
* [clangd] Don't use Bind() where C++14 move capture worksBenjamin Kramer2019-08-155-255/+212
| | | | llvm-svn: 369005
* [lib/Object] - Remove objdump-file-header.testGeorge Rimar2019-08-153-29/+25
| | | | | | | | | | objdump-file-header.test is placed in the wrong folder. I removed it and updated the existent llvm-objdump test cases with the updated content of the file removed. Differential revision: https://reviews.llvm.org/D66288 llvm-svn: 369004
* [OpenMP] Enable warning about "implicit fallthrough"Jonas Hahnfeld2019-08-155-2/+4
| | | | | | | | | Fix last warned location in ittnotify_static.cpp using the defined macro KMP_FALLTHROUGH(). Differential Revision: https://reviews.llvm.org/D65871 llvm-svn: 369003
* [OpenMP] Remove 'unnecessary parentheses'Jonas Hahnfeld2019-08-156-21/+19
| | | | | | | | | | The variables in kmp_lock.cpp are really arrays of function pointers that return void or int, not pointers to functions that return void* or int*. The other changes are only cosmetic. Differential Revision: https://reviews.llvm.org/D65870 llvm-svn: 369002
* [OMPT] Resolve warnings because of ints in if conditionsJonas Hahnfeld2019-08-153-15/+10
| | | | | | | | | | | | | The implementation status can only be one of ompt_event_UNIMPLEMENTED = ompt_set_never = 1 ompt_event_MAY_ALWAYS = ompt_set_always = 5 In both cases, the condition was already true, so just remove the check. Differential Revision: https://reviews.llvm.org/D65869 llvm-svn: 369001
* [lldb][NFC] Refactor remaining completion logic to use CompletionRequestsRaphael Isemann2019-08-1510-92/+89
| | | | | | | | | | | | | | | | | | | | This patch moves the remaining completion functions from the old completion API (that used several variables) to just passing a single CompletionRequest. This is for the most part a simple change as we just replace the old arguments with a single CompletionRequest argument. There are a few places where I had to create new CompletionRequests in the called functions as CompletionRequests itself are immutable and don't expose their internal match list anymore. This means that if a function wanted to change the CompletionRequest or directly access the result list, we need to work around this by creating a new CompletionRequest and a temporary match/description list. Preparation work for rdar://53769355 llvm-svn: 369000
* [OpenMP] Turn on -Wall compiler warnings by defaultJonas Hahnfeld2019-08-154-55/+59
| | | | | | | | | | | | | | | | | | Instead, maintain a list of disabled options to still build libomp and libomptarget without warnings. This includes -Wno-error and -Wno-pedantic to silence warnings that LLVM enables when building in-tree. I tested the following compilers: * Clang 6.0, 7.0, 8.0 * GCC 4.8.5 (CentOS 7), GCC 6, 7, 8, 9 * Intel Compiler 16, 17, 18, 19 RFC thread on openmp-dev mailing list: http://lists.llvm.org/pipermail/openmp-dev/2019-August/002668.html Differential Revision: https://reviews.llvm.org/D65867 llvm-svn: 368999
* [DAGCombine] MergeConsecutiveStores - fix cppcheck/MSVC extension warning. NFCI.Simon Pilgrim2019-08-151-1/+1
| | | | | | | | Set the StartIdx type to size_t so that it matches the StoreNodes SmallVector size() and index types. Silences the MSVC analyzer warning that unsigned increment might overflow before exceeding size_t on 64-bit targets - this isn't likely to happen but it means we use consistent types and reduces the warning "noise" a little. llvm-svn: 368998
* [CodeGen] Do the Simple Early Return in block-placement pass to optimize the ↵Kang Zhang2019-08-152-8/+41
| | | | | | | | | | | | | | | | | | blocks Summary: This patch has trigger a bug of r368339, and the r368339 has been reverted, So upstream this patch again. In `block-placement` pass, it will create some patterns for unconditional we can do the simple early retrun. But the `early-ret` pass is before `block-placement`, we don't want to run it again. This patch is to do the simple early return to optimize the blocks at the last of `block-placement`. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D63972 llvm-svn: 368997
OpenPOWER on IntegriCloud