summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[Hexagon] Make the vararg handling a bit more robust"Krzysztof Parzyszek2018-02-151-8/+19
| | | | | | This is breaking lit tests. llvm-svn: 325266
* [SLP] Added test for reversed stores, NFC.Alexey Bataev2018-02-151-1/+64
| | | | llvm-svn: 325265
* [OpenCL] Fix __enqueue_block for block with capturesYaxun Liu2018-02-156-39/+89
| | | | | | | | | | | | | | | | | | | | | | | | | The following test case causes issue with codegen of __enqueue_block void (^block)(void) = ^{ callee(id, out); }; enqueue_kernel(queue, 0, ndrange, block); Clang first does codegen for block expression in the first line and deletes its block info. Clang then tries to do codegen for the same block expression again for the second line, and fails because the block info is gone. The fix is to do normal codegen for both lines. Introduce an API to OpenCL runtime to record llvm block invoke function and llvm block literal emitted for each AST block expression, and use the recorded information for generating the wrapper kernel. The EmitBlockLiteral APIs are cleaned up to minimize changes to the normal codegen of blocks. Another minor issue is that some clean up AST expression is generated for block with captures, which can be stripped by IgnoreImplicit. Differential Revision: https://reviews.llvm.org/D43240 llvm-svn: 325264
* [InstCombine] use m_OneUse to reduce code; NFCSanjay Patel2018-02-151-2/+2
| | | | llvm-svn: 325263
* [InstCombine] test fdiv folds better; NFCSanjay Patel2018-02-152-33/+43
| | | | | | | We had redundant tests, but no tests for extra uses or vectors. 'fast' is an overly conservative requirement for these folds. llvm-svn: 325262
* Amend r325256. This change was not properly merged locally before the commit ↵Aaron Ballman2018-02-151-1/+1
| | | | | | happened. llvm-svn: 325261
* [clangd] Create trace::Span when running ASTCallbackIlya Biryukov2018-02-151-1/+3
| | | | llvm-svn: 325260
* [Hexagon] Make the vararg handling a bit more robustKrzysztof Parzyszek2018-02-151-19/+8
| | | | | | | The FunctionType of the callee is always available, even if the Function of the callee is not. Use that to get the number of fixed parameters. llvm-svn: 325259
* [CodeGen] Separate MBB metadata from instructions in -debug printingFrancis Visoiu Mistrih2018-02-151-1/+9
| | | | | | | Add an empty line after 'liveins:', 'successors:', or '; predecessors:', the one that ends up to be the last one. llvm-svn: 325258
* [clangd] Use explicit env in test to make lit+windows happy. NFCSam McCall2018-02-151-1/+1
| | | | llvm-svn: 325257
* NFC; clean up this file based on our coding standards. The impetus was ↵Aaron Ballman2018-02-151-1500/+1467
| | | | | | | | | | considerable use of a type name as an identifier for an object. Changed identifier names (especially function parameters) to not clash with type names and to follow the proper naming conventions. Use of explicit type names changed to use auto where appropriate. Removed unused parameters that should have never been added in the first place. Minor formatting cleanups. The changes were mostly mechanical and should have no functional impact. llvm-svn: 325256
* [Hexagon] Fix lowering of formal arguments after r324737Krzysztof Parzyszek2018-02-152-18/+28
| | | | | | Lowering of formal arguments needs to be aware of vararg functions. llvm-svn: 325255
* [clangd] Fixed compilation with MVSC.Ilya Biryukov2018-02-151-6/+11
| | | | llvm-svn: 325254
* [SelectionDAG] Pull out repeated Op.getOpcode(). NFCI.Simon Pilgrim2018-02-151-6/+7
| | | | llvm-svn: 325253
* [clang-format] Support repeated field lists in protosKrasimir Georgiev2018-02-153-11/+100
| | | | | | | | | | | | | | | | | | Summary: This patch adds support for list initialization of proto repeated fields: ``` keys: [1, 2, 3] ``` Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D43298 llvm-svn: 325252
* [CodeGen] Print irreducible loop header weight as a MIR commentFrancis Visoiu Mistrih2018-02-151-3/+2
| | | | | | Prefix it with '; ' to make it more MIR-compatible. llvm-svn: 325251
* @skipIfRemote TestTargetXMLArchPavel Labath2018-02-151-0/+1
| | | | | | The test does not actually connect to any remote targets. llvm-svn: 325250
* Try to unbreak Darwin after XRay/FreeBSD commitKamil Rytarowski2018-02-151-1/+4
| | | | | | Add a fallback definition of getTSCFrequency(). llvm-svn: 325249
* Implement a large part of NetBSD syscalls of netbsd_syscall_hooks.hKamil Rytarowski2018-02-153-4/+10958
| | | | | | | | | | This is a follow up of: r325206 - Add NetBSD syscall hooks skeleton in sanitizers Sponsored by <The NetBSD Foundation> llvm-svn: 325248
* [InstCombine] allow sin/cos transforms with 'reassoc'Sanjay Patel2018-02-153-85/+84
| | | | | | | | | | | | | | | | The variable name 'AllowReassociate' is a lie at this point because it's set to 'isFast()' which is more than the 'reassoc' FMF after rL317488. In D41286, we showed that this transform may be valid even with strict math by brute force checking every 32-bit float result. There's a potential problem here because we're replacing with a tan() libcall rather than a hypothetical LLVM tan intrinsic. So we might set errno when we should be guaranteed not to do that. But that's independent of this change. llvm-svn: 325247
* Enable test/asan for NetBSDKamil Rytarowski2018-02-151-1/+1
| | | | | | Sponsored by <The NetBSD Foundation> llvm-svn: 325246
* Enable syscall-specific functions in TSan/NetBSDKamil Rytarowski2018-02-151-1/+1
| | | | | | | | | | | | | NetBSD ships now with netbsd_syscall_hooks.h and requires support for TSan specific features to be enabled. This is follow up of: D42048: Add NetBSD syscall hooks skeleton in sanitizers Sponsored by <The NetBSD Foundation> llvm-svn: 325245
* [ARM] Allow 64- and 128-bit types with 't' inline asm constraintPablo Barrio2018-02-154-4/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In LLVM, 't' selects a floating-point/SIMD register and only supports 32-bit values. This is appropriately documented in the LLVM Language Reference Manual. However, this behaviour diverges from that of GCC, where 't' selects the s0-s31 registers and its qX and dX variants depending on additional operand modifiers (q/P). For example, the following C code: #include <arm_neon.h> float32x4_t a, b, x; asm("vadd.f32 %0, %1, %2" : "=t" (x) : "t" (a), "t" (b)) results in the following assembly if compiled with GCC: vadd.f32 s0, s0, s1 whereas LLVM will show "error: couldn't allocate output register for constraint 't'", since a, b, x are 128-bit variables, not 32-bit. This patch extends the use of 't' to mean that of GCC, thus allowing selection of the lower Q vector regs and their D/S variants. For example, the earlier code will now compile as: vadd.f32 q0, q0, q1 This behaviour still differs from that of GCC but I think it is actually more correct, since LLVM picks up the right register type based on the datatype of x, while GCC would need an extra operand modifier to achieve the same result, as follows: asm("vadd.f32 %q0, %q1, %q2" : "=t" (x) : "t" (a), "t" (b)) Since this is only an extension of functionality, existing code should not be affected by this change. Note that operand modifiers q/P are already supported by LLVM, so this patch should suffice to support inline assembly with constraint 't' originally built for GCC. Reviewers: grosbach, rengolin Reviewed By: rengolin Subscribers: rogfer01, efriedma, olista01, aemerson, javed.absar, eraman, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D42962 llvm-svn: 325244
* [X86][SSE] combineTruncateWithSat - use truncateVectorWithPACK to chain ↵Simon Pilgrim2018-02-152-152/+30
| | | | | | | | PACKUS vXi32-vXi8 saturated truncation We can use PACKSS/PACKUS to saturate each stage of the chain: PACKSSDW down to [-32768,32767] and then PACKUSWB to [0,255]. llvm-svn: 325243
* [clangd] Enable snippet completion based on client capabilities.Ilya Biryukov2018-02-155-14/+133
| | | | | | | | | | | | | | Summary: And remove -enable-snippets flag. Reviewers: hokein, ioeric, sammccall Reviewed By: ioeric Subscribers: klimek, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D43229 llvm-svn: 325242
* Adding msan support for FreeBSDKamil Rytarowski2018-02-151-0/+2
| | | | | | | | | | | | | | | | Summary: Enabling memory sanitiser for X86_64 arch only. To match the sanitiser counterpart. Patch by: David CARLIER Reviewers: krytarowski Reviewed By: krytarowski Subscribers: dim, emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D43148 llvm-svn: 325241
* Add Xray instrumentation support to FreeBSDKamil Rytarowski2018-02-1510-22/+59
| | | | | | | | | | | | | | | | | | | Summary: - Enabling the build. - Using assembly for the cpuid parts. - Using thr_self FreeBSD call to get the thread id Patch by: David CARLIER Reviewers: dberris, rnk, krytarowski Reviewed By: dberris, krytarowski Subscribers: emaste, stevecheckoway, nglevin, srhines, kubamracek, dberris, mgorny, krytarowski, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43278 llvm-svn: 325240
* [clangd] Fix make_unique ambiguity, NFCSam McCall2018-02-151-2/+2
| | | | llvm-svn: 325239
* Add Xray instrumentation compile-time/link-time support to FreeBSDKamil Rytarowski2018-02-151-0/+27
| | | | | | | | | | | | | | | | Summary: Similarly to the GNU driver version, adding proper compile and linker flags. Patch by: David CARLIER Reviewers: vitalybuka, krytarowski, dberris Reviewed By: krytarowski, dberris Subscribers: emaste, dberris, cfe-commits Differential Revision: https://reviews.llvm.org/D43279 llvm-svn: 325238
* [InstCombine] allow X / C -> X * (1.0/C) for vector splat FP constantsSanjay Patel2018-02-154-14/+39
| | | | llvm-svn: 325237
* Add -no-canonical-prefixes to allow different build modes.Martin Bohme2018-02-151-5/+5
| | | | llvm-svn: 325236
* [X86][SSE] combineTruncateWithSat - use truncateVectorWithPACK to chain ↵Simon Pilgrim2018-02-152-170/+26
| | | | | | | | | | PACKSS vXi32-vXi8 saturated truncation We can use PACKSS to saturate each stage of the chain: PACKSSDW down to [-32768,32767] and then PACKSSWB to [-128,127]. PACKUS is a little trickier and will be handled in a separate patch. llvm-svn: 325235
* [DebugInfo] Accept enumeration types without underlying integer type present inMomchil Velikov2018-02-152-6/+21
| | | | | | | | | | debug info metadata ... when generating DWARF. Differential Revision: https://reviews.llvm.org/D43304 llvm-svn: 325234
* [clangd] Make functions of ClangdServer callback-basedIlya Biryukov2018-02-158-143/+197
| | | | | | | | | | | | | | | | | | Summary: As a consequence, all LSP operations are now handled asynchronously, i.e. they never block the main processing thread. However, if -run-synchronously flag is specified, clangd still runs everything on the main thread. Reviewers: sammccall, ioeric, hokein Reviewed By: sammccall, ioeric Subscribers: klimek, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D43227 llvm-svn: 325233
* [SelectionDAG] Add initial implementation of ↵Simon Pilgrim2018-02-1513-403/+482
| | | | | | | | | | | | TargetLowering::SimplifyDemandedVectorElts This is mainly a move of simplifyShuffleOperands from DAGCombiner::visitVECTOR_SHUFFLE to create a more general purpose TargetLowering::SimplifyDemandedVectorElts implementation. Further features can be moved/added in future patches. Differential Revision: https://reviews.llvm.org/D42896 llvm-svn: 325232
* [ARM] f16 vcmp fixesSjoerd Meijer2018-02-152-28/+54
| | | | | | | | This adds f16 VCMP match rules and fixes the test cases. Differential Revision: https://reviews.llvm.org/D43291 llvm-svn: 325228
* Revert r325224 "Report fatal error in the case of out of memory"Serge Pavlov2018-02-1521-101/+30
| | | | | | It caused fails on some buildbots. llvm-svn: 325227
* Specify namespace for reallocSerge Pavlov2018-02-151-1/+1
| | | | llvm-svn: 325226
* [clang-tidy] Make a test pass on platforms where exceptions disabled by default.Gabor Horvath2018-02-151-1/+1
| | | | llvm-svn: 325225
* Report fatal error in the case of out of memorySerge Pavlov2018-02-1521-30/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Analysis of fails in the case of out of memory errors can be tricky on Windows. Such error emerges at the point where memory allocation function fails, but manifests itself when null pointer is used. These two points may be distant from each other. Besides, next runs may not exhibit allocation error. Usual programming practice does not require checking result of 'operator new' because it throws 'std::bad_alloc' in the case of allocation error. However, LLVM is usually built with exceptions turned off, so 'new' can return null pointer. This change installs custom new handler, which causes fatal error in the case of out of memory. The handler is installed automatically prior to call to 'main' during construction of a static object defined in 'lib/Support/ErrorHandling.cpp'. If the application does not use this file, the handler may be installed manually by a call to 'llvm::install_out_of_memory_new_handler', declared in 'include/llvm/Support/ErrorHandling.h". There are calls to C allocation functions, malloc, calloc and realloc. They are used for interoperability with C code, when allocated object has variable size and when it is necessary to avoid call of constructors. In many calls the result is not checked against null pointer. To simplify checks, new functions are defined in the namespace 'llvm' with the same names as these C function. These functions produce fatal error if allocation fails. User should use 'llvm::malloc' instead of 'std::malloc' in order to use the safe variant. This change replaces 'std::malloc' in the cases when the result of allocation function is not checked against null pointer. Finally, there are plain C code, that uses malloc and similar functions. If the result is not checked, assert statements are added. Differential Revision: https://reviews.llvm.org/D43010 llvm-svn: 325224
* [clang-tidy] Minor documentation fixGabor Horvath2018-02-151-0/+1
| | | | llvm-svn: 325223
* [clang-tidy] New checker for exceptions that are created but not thrownGabor Horvath2018-02-158-0/+285
| | | | | | | | Patch by: Kristof Umann Differential Revision: https://reviews.llvm.org/D43120 llvm-svn: 325222
* [clang-format] Improve ObjC headers detectionJacek Olesiak2018-02-152-10/+24
| | | | | | | | | | | | | | Summary: Detect ObjC characteristic types when they start a line and add additional keywords. Reviewers: benhamilton Reviewed By: benhamilton Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D43124 llvm-svn: 325221
* [clangd] Fix tracing now that spans lifetimes can overlap on a thread.Sam McCall2018-02-154-36/+133
| | | | | | | | | | | | | | | | | | | | | | | Summary: The chrome trace viewer requires events within a thread to strictly nest. So we need to record the lifetime of the Span objects, not the contexts. But we still want to show the relationship between spans where a context crosses threads, so do this with flow events (i.e. arrows). Before: https://photos.app.goo.gl/q4Dd9u9xtelaXk1v1 After: https://photos.app.goo.gl/5RNLmAMLZR3unvY83 (This could stand some further improvement, in particular I think we want a container span whenever we schedule work on a thread. But that's another patch) Reviewers: ioeric Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D43272 llvm-svn: 325220
* [CMake] Add -fno-experimental-isel for testingJonas Hahnfeld2018-02-152-2/+23
| | | | | | | | | | | | | GlobalISel doesn't yet implement blockaddress and falls back to SelectionDAG. This results in additional branch instruction to the next basic block which breaks the OMPT tests. Disable GlobalISel for now when compiling the tests because fixing them is not easily possible. See http://llvm.org/PR36313 for full discussion history. Differential Revision: https://reviews.llvm.org/D43195 llvm-svn: 325218
* (NFC)[MachineCombiner] Improve debug output.Andrew V. Tischenko2018-02-151-28/+53
| | | | llvm-svn: 325217
* [NFC] Rename isKnownViaSimpleReasoning to isKnownViaNonRecursiveReasoningMax Kazantsev2018-02-152-17/+17
| | | | llvm-svn: 325216
* [NFC] Fix metadata placement in testMax Kazantsev2018-02-151-3/+1
| | | | llvm-svn: 325215
* [SCEV] Favor isKnownViaSimpleReasoning over constant ranges checkMax Kazantsev2018-02-152-6/+38
| | | | | | | | | | | | | | | | | | | | | There is a more powerful but still simple function `isKnownViaSimpleReasoning ` that does constant range check and few more additional checks. We use it some places (e.g. when proving implications) and in some other places we only check constant ranges. Currently, indvar simplifier fails to remove the check in following loop: int inc = ...; for (int i = inc, j = inc - 1; i < 200; ++i, ++j) if (i > j) { ... } This patch replaces all usages of `isKnownPredicateViaConstantRanges` with `isKnownViaSimpleReasoning` to have smarter proofs. In particular, it fixes the case above. Reviewed-By: sanjoy Differential Revision: https://reviews.llvm.org/D43175 llvm-svn: 325214
* [ELF] Simplify handling of AT section attribute.Igor Kudrin2018-02-153-9/+40
| | | | | | | | This also makes the behavior close to GNU ld's. Differential Revision: https://reviews.llvm.org/D43284 llvm-svn: 325213
OpenPOWER on IntegriCloud