summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Transforms] Prefer static and avoid namespaces, NFCReid Kleckner2018-11-191-10/+6
| | | | | | | | | | | | | Put 'static' on three functions in an anonymous namespace as per our coding style. Remove the 'namespace llvm {}' around the .cpp file and explicitly declare the free function 'llvm::optimizeGlobalCtorsList' in 'llvm::'. I prefer this style for free functions because the compiler will error out if the .h and .cpp files don't agree on the function name or prototype. llvm-svn: 347269
* [X86] Rename combineVSZext->combineExtendVectorInreg. NFCCraig Topper2018-11-191-4/+4
| | | | | | Now that we no longer have target specific vector extend nodes let's make the function name match the nodes we do use. llvm-svn: 347268
* [NFC][libcxx] Fix incorrect commentsLouis Dionne2018-11-191-3/+3
| | | | llvm-svn: 347267
* [X86] Add test case to show missed opportunity to use a single pmuludq to ↵Craig Topper2018-11-191-0/+138
| | | | | | | | | | implement a multiply when a zext lives in another basic block. This can occur when one of the inputs to the multiply is loop invariant. Though my test cases just use two basic blocks with an unconditional jump which we won't merge until after isel in the codegen pipeline. For scalars, I believe SelectionDAGBuilder can add an AssertZExt to pass knowledge across basic blocks but its explicitly disabled for vectors. llvm-svn: 347266
* AMDGPU: Fix V_FMA_F16 selection on GFX9Konstantin Zhuravlyov2018-11-193-11/+17
| | | | | | | | GFX9 should select opsel version. Differential Revision: https://reviews.llvm.org/D54545 llvm-svn: 347265
* [libcxx] Fix XFAIL for GCC 4.9Louis Dionne2018-11-191-1/+1
| | | | | | | | | The XFAIL started passing since we're only testing for trivial-copyability of reference_wrapper in C++14 and above. This commit constrains the XFAIL to gcc-4.9 with C++14 (it would also fail on C++17 and above, but those standards are not available with GCC 4.9). llvm-svn: 347264
* [libcxx] Update test of trivial copyability of reference_wrapperLouis Dionne2018-11-191-3/+4
| | | | | | N4151 is not an extension anymore, it was standardized in C++14. llvm-svn: 347263
* [Coverage] Fix PR39258: support coverage regions that start deeper than they endVedant Kumar2018-11-192-11/+52
| | | | | | | | | | | popRegions used to assume that the start location of a region can't be nested deeper than the end location, which is not always true. Patch by Orivej Desh! Differential Revision: https://reviews.llvm.org/D53244 llvm-svn: 347262
* [Sema] Fix PR38987: keep end location of a direct initializer listVedant Kumar2018-11-192-1/+11
| | | | | | | | | | | | | | If PerformConstructorInitialization of a direct initializer list constructor is called while instantiating a template, it has brace locations in its BraceLoc arguments but not in the Kind argument. This reverts the hunk https://reviews.llvm.org/D41921#inline-468844. Patch by Orivej Desh! Differential Revision: https://reviews.llvm.org/D53231 llvm-svn: 347261
* Revert "[LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches ↵Benjamin Kramer2018-11-192-362/+9
| | | | | | | | and switches" This reverts commits r347183 & r347184. Crashes while building libxml. llvm-svn: 347260
* [AMDGPU] Restored selection of scalar_to_vector (v2x16)Stanislav Mekhanoshin2018-11-192-9/+35
| | | | | | | | | This works if DAG combiner is enabled, but without combining we cannot select scalar_to_vector of <2 x half> and <2 x i16>. Differential Revision: https://reviews.llvm.org/D54718 llvm-svn: 347259
* [clang][CodeGen] Implicit Conversion Sanitizer: discover the world of ↵Roman Lebedev2018-11-195-10/+7875
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CompoundAssign operators Summary: As reported by @regehr (thanks!) on twitter (https://twitter.com/johnregehr/status/1057681496255815686), we (me) has completely forgot about the binary assignment operator. In AST, it isn't represented as separate `ImplicitCastExpr`'s, but as a single `CompoundAssignOperator`, that does all the casts internally. Which means, out of these two, only the first one is diagnosed: ``` auto foo() { unsigned char c = 255; c = c + 1; return c; } auto bar() { unsigned char c = 255; c += 1; return c; } ``` https://godbolt.org/z/JNyVc4 This patch does handle the `CompoundAssignOperator`: ``` int main() { unsigned char c = 255; c += 1; return c; } ``` ``` $ ./bin/clang -g -fsanitize=integer /tmp/test.c && ./a.out /tmp/test.c:3:5: runtime error: implicit conversion from type 'int' of value 256 (32-bit, signed) to type 'unsigned char' changed the value to 0 (8-bit, unsigned) #0 0x2392b8 in main /tmp/test.c:3:5 #1 0x7fec4a612b16 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x22b16) #2 0x214029 in _start (/build/llvm-build-GCC-release/a.out+0x214029) ``` However, the pre/post increment/decrement is still not handled. Reviewers: rsmith, regehr, vsk, rjmccall, #sanitizers Reviewed By: rjmccall Subscribers: mclow.lists, cfe-commits, regehr Tags: #clang, #sanitizers Differential Revision: https://reviews.llvm.org/D53949 llvm-svn: 347258
* [InstCombine] Set debug loc on `mergeStoreIntoSuccessor` phiVedant Kumar2018-11-192-2/+32
| | | | | | | | | Assigning a merged debug location to the `mergeStoreIntoSuccessor` phi improves backtrace quality. Fixes llvm.org/PR38083. llvm-svn: 347257
* [IR] Add hasNPredecessors, hasNPredecessorsOrMore to BasicBlockVedant Kumar2018-11-1911-22/+61
| | | | | | | | | | | | | | | | | | | | | | | Add methods to BasicBlock which make it easier to efficiently check whether a block has N (or more) predecessors. This can be more efficient than using pred_size(), which is a linear time operation. We might consider adding similar methods for successors. I haven't done so in this patch because succ_size() is already O(1). With this patch applied, I measured a 0.065% compile-time reduction in user time for running `opt -O3` on the sqlite3 amalgamation (30 trials). The change in mergeStoreIntoSuccessor alone saves 45 million linked list iterations in a stage2 Release build of llc. See llvm.org/PR39702 for a harder but more general way of achieving similar results. Differential Revision: https://reviews.llvm.org/D54686 llvm-svn: 347256
* [DAGCombine] SimplifyNodeWithTwoResults - ensure same legalization for LO/HI ↵Simon Pilgrim2018-11-191-8/+6
| | | | | | | | | | operands (PR21207) Consistently use (!LegalOperations || isOperationLegalOrCustom) for all node pairs. Differential Revision: https://reviews.llvm.org/D53478 llvm-svn: 347255
* Fix clang test suite on Windows by reverting part of r347216Reid Kleckner2018-11-192-3/+1
| | | | | | | | | | | Otherwise, the clang analyzer tests fail on Windows when attempting to unpickle AnalyzerTest objects in the worker processes. The pattern of, add to path, import, remove from path, serialize, deserialize, doesn't work. Once something gets added to the path, if we want to move it across the wire for multiprocessing, we need to keep the module on sys.path. llvm-svn: 347254
* Fix Wdocumentation warning. NFCI.Simon Pilgrim2018-11-191-1/+1
| | | | llvm-svn: 347253
* Fix unused function warning.Simon Pilgrim2018-11-191-6/+0
| | | | llvm-svn: 347252
* [TargetLowering] expandFP_TO_UINT - improve fp16 supportSimon Pilgrim2018-11-192-258/+66
| | | | | | | | | | As discussed on D53794, for float types with ranges smaller than the destination integer type, then we should be able to just use a regular FP_TO_SINT opcode. I thought we'd need to provide MSA test cases for very small integer types as well (fp16 -> i8 etc.), but it turns out that promotion will kick in so they're unnecessary. Differential Revision: https://reviews.llvm.org/D54703 llvm-svn: 347251
* [IR] DISubprogram::toSPFlags(): fix "enumeral and non-enumeral type in ↵Roman Lebedev2018-11-191-4/+5
| | | | | | | | | | | | | | | | | conditional expression" /build/llvm/include/llvm/IR/DebugInfoMetadata.h: In static member function ‘static llvm::DISubprogram::DISPFlags llvm::DISubprogram::toSPFlags(bool, bool, bool, unsigned int)’: /build/llvm/include/llvm/IR/DebugInfoMetadata.h:1636:50: warning: enumeral and non-enumeral type in conditional expression [-Wextra] (IsLocalToUnit ? SPFlagLocalToUnit : 0) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ /build/llvm/include/llvm/IR/DebugInfoMetadata.h:1637:49: warning: enumeral and non-enumeral type in conditional expression [-Wextra] (IsDefinition ? SPFlagDefinition : 0) | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /build/llvm/include/llvm/IR/DebugInfoMetadata.h:1638:48: warning: enumeral and non-enumeral type in conditional expression [-Wextra] (IsOptimized ? SPFlagOptimized : 0)); ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ llvm-svn: 347250
* Add missing stream operator for Polynomial class to fix debug builds.Simon Pilgrim2018-11-191-0/+7
| | | | llvm-svn: 347249
* [X86][CostModel] Don't lookup intrinsic cost tables if the intrinsic isn't ↵Craig Topper2018-11-191-60/+64
| | | | | | | | | | | | one we care about We're seeing some issues internally where we sent some intrinsics into the cost model that the getTypeLegalizationCost call fails on, but X86 specific tables don't care about. Our base class implementation takes care of them. We'd just like X86 backend to ignore them. This patch makes sure the switch returned something X86 cares about and skips the table lookups and type legalization call if not. Probably more efficient too since we don't go scanning the tables for every intrinsic we could possibly see. Differential Revision: https://reviews.llvm.org/D54711 llvm-svn: 347248
* Add missing closing bracket.Simon Pilgrim2018-11-191-1/+1
| | | | llvm-svn: 347247
* Fix build break from r347239Paul Robinson2018-11-192-6/+6
| | | | llvm-svn: 347246
* Fix Wdocumentation warning. NFCI.Simon Pilgrim2018-11-191-1/+1
| | | | llvm-svn: 347245
* Add docker configurations used by the buildbots.Eric Fiselier2018-11-197-0/+676
| | | | | | | These are the scripts I use to create the docker images for the build bots and run them. llvm-svn: 347244
* [lldbsuite] Invoke sed on Windows to determine the cache dir for clangStella Stamenova2018-11-191-30/+31
| | | | | | | | | | | | Summary: In order to invoke sed on Windows, we need to quote the command correctly. Since we already have commands which do that, move the definitions at the beginning of the file and then re-use them for each command. Reviewers: aprantl, zturner Subscribers: teemperor, lldb-commits Differential Revision: https://reviews.llvm.org/D54709 llvm-svn: 347243
* [X86][SSE] Remove unnecessary bit-and in pshufb vector ctlz (PR39703)Simon Pilgrim2018-11-196-1076/+873
| | | | | | | | SSE PSHUFB vector ctlz lowering works at the i4 nibble level. As detailed in PR39703, we were masking the lower nibble off but we only actually use it in the case where the upper nibble is known to be zero, making it safe to remove the mask and save an instruction. Differential Revision: https://reviews.llvm.org/D54707 llvm-svn: 347242
* [InterleavedLoadCombine] Fix warningsMartin Elshuber2018-11-191-6/+1
| | | | | | | * remove unused function * fix compare llvm-svn: 347241
* [X86] Attempt to improve v32i8/v64i8 multiply lowering by applying the v16i8 ↵Craig Topper2018-11-197-650/+705
| | | | | | | | | | | | | | non-avx2 algorithm to each 128-bit lane. Previously we split the vectors in half to allow the two halves to be any extended then concatenated the results back together. This patch instead instead extends the v16i8 sse algorithm to extend half of each 128-bit lane using punpcklbw/punpckhbw. Multiplies all the low half lanes and high half lanes together in separate operations. Then merges the half lane results back together using packuswb. Unfortunately, some of the cases in vector-reduce-mul.ll regress because we aren't narrowing the vector width of the multiplies as we reduce. The splitting was somewhat making up for that before by causing halves to be discarded after the split. Differential Revision: https://reviews.llvm.org/D54668 llvm-svn: 347240
* [DebugInfo] DISubprogram flags get their own flags word. NFC.Paul Robinson2018-11-1917-331/+373
| | | | | | | | | | | | | This will hold flags specific to subprograms. In the future we could potentially free up scarce bits in DIFlags by moving subprogram-specific flags from there to the new flags word. This patch does not change IR/bitcode formats, that will be done in a follow-up. Differential Revision: https://reviews.llvm.org/D54597 llvm-svn: 347239
* [ARM] Attempt to fix arm selfhost bots after rL347191Sam Parker2018-11-191-2/+2
| | | | llvm-svn: 347238
* Address comments.Kadir Cetinkaya2018-11-192-5/+7
| | | | llvm-svn: 347237
* Use digest size instead of hardcoding it.Kadir Cetinkaya2018-11-191-1/+1
| | | | llvm-svn: 347236
* [clangd] Store source file hash in IndexFile{In,Out}Kadir Cetinkaya2018-11-195-2/+51
| | | | | | | | | | | | | | Summary: Puts the digest of the source file that generated the index into serialized index and stores them back on load, if exists. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D54693 llvm-svn: 347235
* [AMDGPU] Fix -Wunused-variableFangrui Song2018-11-191-1/+0
| | | | llvm-svn: 347234
* [libcxx] Fix incorrect #include for std::hashLouis Dionne2018-11-191-1/+1
| | | | | | | Reviewed as https://reviews.llvm.org/D54705. Thanks to Andrey Maksimov for the patch. llvm-svn: 347233
* [libcxx] Add missing <cstddef> includes in testsLouis Dionne2018-11-193-0/+4
| | | | | | | | | | | Some tests use type std::max_align_t, but don't include <cstddef> header directly. As a result, these tests won't compile against some conformant libraries. Reviewed as https://reviews.llvm.org/D54645. Thanks to Andrey Maksimov for the patch. llvm-svn: 347232
* [AMDGPU] Convert insert_vector_elt into set of selectsStanislav Mekhanoshin2018-11-1911-140/+556
| | | | | | | | | This allows to avoid scratch use or indirect VGPR addressing for small vectors. Differential Revision: https://reviews.llvm.org/D54606 llvm-svn: 347231
* [llvm-nm] Fix use-after-free for MachOUniversalBinariesFrancis Visoiu Mistrih2018-11-191-1/+2
| | | | | | | | | MachOObjectFile::getHostArch() returns a temporary, and getArchName returns a StringRef pointing to a temporary std::string. No tests since it doesn't trigger any errors except with the sanitizers. llvm-svn: 347230
* [InterleavedLoadCombine] Fix warning unused variableMartin Elshuber2018-11-191-2/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D52653 llvm-svn: 347229
* [WebAssembly] replaced .param/.result by .functypeWouter van Oortmerssen2018-11-1974-1868/+1194
| | | | | | | | | | | | | | | | | | | | | Summary: This makes it easier/cleaner to generate a single signature from this directive. Also: - Adds the symbol name, such that we don't depend on the location of this directive anymore. - Actually constructs the signature in the assembler, and make the assembler own it. - Refactor the use of MVT vs ValType in the streamer and assembler to require less conversions overall. - Changed 700 or so tests to use it. Reviewers: sbc100, dschuff Subscribers: jgravelle-google, eraman, aheejin, sunfish, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D54652 llvm-svn: 347228
* [SelectionDAG] simplify vector select with undef operand(s)Sanjay Patel2018-11-194-21/+13
| | | | llvm-svn: 347227
* [InterleavedLoadCombine] Remove unused include. NFC.Benjamin Kramer2018-11-191-1/+0
| | | | llvm-svn: 347226
* Revert "[LICM] Make LICM able to hoist phis"Benjamin Kramer2018-11-193-1477/+24
| | | | | | This reverts commit r347190. llvm-svn: 347225
* [lit] On Windows, don't error if MSVC is not in PATH.Zachary Turner2018-11-191-2/+4
| | | | | | | We had some logic backwards, and as a result if MSVC was not found in PATH we would throw a string concatenation exception. llvm-svn: 347224
* Remove non-ASCII characters at the beginning of file.Zachary Turner2018-11-191-1/+1
| | | | | | It's not clear how these ended up in the file, but this fixes it. llvm-svn: 347223
* [AMDGPU] Derive GCNSubtarget from MF to get overridden target featuresDavid Stuttard2018-11-191-2/+2
| | | | | | | | | | | | | | | | | | Summary: AMDGPUAsmPrinter has a getSTI function that derives a GCNSubtarget from the TM. However, this means that overridden target features are not detected and can result in incorrect behaviour. Switch to using STM which is a GCNSubtarget derived from the MF (used elsewhere in the same function). Change-Id: Ib6328ad667b7fcdc87e9c06344e59859207db9b0 Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D54301 llvm-svn: 347221
* [LV] Avoid vectorizing unsafe dependencies in uniform addressAnna Thomas2018-11-198-22/+71
| | | | | | | | | | | | | | | | | | | Summary: Currently, when vectorizing stores to uniform addresses, the only instance we prevent vectorization is if there are multiple stores to the same uniform address causing an unsafe dependency. This patch teaches LAA to avoid vectorizing loops that have an unsafe cross-iteration dependency between a load and a store to the same uniform address. Fixes PR39653. Reviewers: Ayal, efriedma Subscribers: rkruppe, llvm-commits Differential Revision: https://reviews.llvm.org/D54538 llvm-svn: 347220
* [libcxx] Add availability markup for bad_optional_access, bad_variant_access ↵Louis Dionne2018-11-1950-245/+364
| | | | | | | | | | | | and bad_any_cast Reviewers: dexonsmith, EricWF Subscribers: christof, arphaman, libcxx-commits Differential Revision: https://reviews.llvm.org/D53256 llvm-svn: 347219
OpenPOWER on IntegriCloud