summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ORC] Add more utilities to aid debugging output.Lang Hames2018-09-285-10/+23
| | | | | | | | | | | | | (1) A const accessor for the LLVMContext held by a ThreadSafeContext. (2) A const accessor for the ThreadSafeModules held by an IRMaterializationUnit. (3) A const MaterializationResponsibility reference to IRTransformLayer2's transform function. This makes IRTransformLayer2 useful for JIT debugging (since it can inspect JIT state through the responsibility argument) as well as program transformations. llvm-svn: 343365
* [ValueTracking] Allow select patterns to work on FP vectorsThomas Lively2018-09-282-0/+80
| | | | | | | | | | | | | | | | | | | | Summary: This CL allows constant vectors of floats to be recognized as non-NaN and non-zero in select patterns. This change makes `matchSelectPattern` more powerful generally, but was motivated specifically because I wanted fminnan and fmaxnan to be created for vector versions of the scalar patterns they are created for. Tested with check-all on all targets. A testcase in the WebAssembly backend that tests the non-nan codepath is in an upcoming CL. Reviewers: aheejin, dschuff Subscribers: sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D52324 llvm-svn: 343364
* [LLVM-C] Add an accessor for the "value type" of a globalRobert Widmann2018-09-282-0/+12
| | | | | | | | | | | | | | Summary: Before this, there was no reasonable way to retrieve the type of a global value (most notably, a function) that was created with the C API. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52659 llvm-svn: 343363
* [WebAssembly] Fix memory leak on WasmEHFuncInfoHeejin Ahn2018-09-281-0/+5
| | | | | | | | | | | | Summary: WasmEHFuncInfo objects were not being properly deleted. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D52582 llvm-svn: 343362
* [ARM] Fix correctness checks in promoteToConstantPool.Eli Friedman2018-09-283-62/+38
| | | | | | | | | | | | | | | | | Correctly check for relocations in the constant to promote. And don't allow promoting a constant multiple times. This partially fixes https://bugs.llvm.org//show_bug.cgi?id=32780 ; it's not a complete fix because we also need to prevent ARMConstantIslands from cloning the constant. (-arm-promote-constant is currently off by default, and it stays off with this patch. I'll look into turning it on again when all the known issues are fixed.) Differential Revision: https://reviews.llvm.org/D51472 llvm-svn: 343361
* Support enums with a fixed underlying type in all language modes.Erik Pilkington2018-09-285-15/+40
| | | | | | | | | | Previously we supported these in C++, ObjC, and C with -fms-extensions. rdar://43831380 Differential revision: https://reviews.llvm.org/D52339 llvm-svn: 343360
* [ARM] Use preferred alignment for constants in promoteToConstantPool.Eli Friedman2018-09-282-1/+12
| | | | | | | | | | | | | | | This mostly affects IR generated by non-clang frontends because clang generally sets the alignment of globals explicitly. Fixes https://bugs.llvm.org//show_bug.cgi?id=32394 . (-arm-promote-constant is currently off by default, and it stays off with this patch. I'll look into turning it on again when all the known issues are fixed.) Differential Revision: https://reviews.llvm.org/D51469 llvm-svn: 343359
* [ORC] Narrow a cast: the block guarded by the condition only handlesLang Hames2018-09-281-1/+1
| | | | | | GlobalVariables, not all GlobalValues. llvm-svn: 343358
* [Driver] Remove unused declarations and "include" directivesTatyana Krasnukha2018-09-282-9/+1
| | | | llvm-svn: 343357
* [OPENMP]Fix PR39084: Check datasharing attributes of reduction variables only.Alexey Bataev2018-09-283-68/+66
| | | | | | | | According to OpenMP, the reduction item must be shared in parent region. But the item can be an array section or array subscript. In this case, we should not check for the datasharing of the base declaration. llvm-svn: 343356
* [X86] Add test cases for failures to use narrow test with immediate ↵Craig Topper2018-09-281-0/+236
| | | | | | | | instructions when a truncate is beteen the CMP and the AND and the sign flag is used. The code in X86ISelDAGToDAG only looks through truncates if the sign flag isn't used, but that is overly restrictive. A future patch will improve this. llvm-svn: 343355
* [AArch64] Split zero cycle feature more granularlyEvandro Menezes2018-09-286-54/+200
| | | | | | | | | | Split the `zcz` feature into specific ones got GP and FP registers, `zcz-gp` and `zcz-fp`, respectively, while retaining the original feature option to mean both. Differential revision: https://reviews.llvm.org/D52621 llvm-svn: 343354
* [analyzer] [NFC] Remove unused parameters, as found by -Wunused-parameterGeorge Karpenkov2018-09-2835-207/+120
| | | | | | Differential Revision: https://reviews.llvm.org/D52640 llvm-svn: 343353
* [analyzer] Provide an option to dump generated exploded graphs to a given file.George Karpenkov2018-09-287-5/+67
| | | | | | | | | | | Dumping graphs instead of opening them is often very useful, e.g. for transfer or converting to SVG. Basic sanity check for generated exploded graphs. Differential Revision: https://reviews.llvm.org/D52637 llvm-svn: 343352
* GraphWriter: Provide an API for writing a graph into a specified fileGeorge Karpenkov2018-09-281-2/+21
| | | | | | | | Always generating a temporary file is not always suitable, especially for tests Differential Revision: https://reviews.llvm.org/D52636 llvm-svn: 343351
* [cxx2a] P0614R1: Support init-statements in range-based for loops.Richard Smith2018-09-2833-141/+651
| | | | | | | We don't yet support this for the case where a range-based for loop is implicitly rewritten to an ObjC for..in statement. llvm-svn: 343350
* [DAGCombiner] [NFC] Improve X div/rem 1 foldDavid Bolvansky2018-09-281-8/+5
| | | | | | | | | | | | Reviewers: spatel Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52661 llvm-svn: 343349
* Clean-up usage of OptionDefinition arraysTatyana Krasnukha2018-09-285-103/+61
| | | | | | Differential Revision: https://reviews.llvm.org/D52604 llvm-svn: 343348
* make lit builtins a packageChris Matthews2018-09-281-0/+0
| | | | | | | cat.py is not being installed when lit is installed from source. So tests that use the internal shell fail when using cat. llvm-svn: 343347
* [llvm-mca] Add a test for zero-idiom VPERM2F128rr. NFCAndrea Di Biagio2018-09-281-0/+75
| | | | | | | | | | | We don't correctly model the latency and resource usage information for zero-idiom VPERM2F128rr on Jaguar. This is demonstrated by the incorrect numbers in the resource pressure view, and the timeline view. A follow up patch will fix this problem. llvm-svn: 343346
* [bindings/go] Add Go bindings to the Token typewhitequark2018-09-281-0/+2
| | | | | | | | | | | | | | Summary: This type is necessary for implementing coroutines. Reviewers: whitequark Reviewed By: whitequark Subscribers: modocache, llvm-commits Differential Revision: https://reviews.llvm.org/D47684 llvm-svn: 343345
* [OPENMP] Add the test to check that the libomptarget does not causeAlexey Bataev2018-09-281-1/+7
| | | | | | | | | | infinite loop on removing non-mapped pointer-with-object. Added test to check that libomptarget does not cause infinite loop when trying to unmap the pointer-with-object data that was not previously mapped. llvm-svn: 343344
* [X86] Add the movbe instruction intrinsics from icc.Craig Topper2018-09-284-0/+143
| | | | | | | | | | These intrinsics exist in icc. They can be found on the Intel Intrinsics Guide website. All the backend support is in place to pattern match a load+bswap or a bswap+store pattern to the MOVBE instructions. So we just need to get the frontend to emit the correct IR. The pointer arguments in icc are declared as void so I had to jump through a packed struct to forcing a specific alignment on the load/store. Same trick we use in the unaligned vector load/store intrinsics Differential Revision: https://reviews.llvm.org/D52586 llvm-svn: 343343
* Revert r343318 together with llvm commit r343317Luke Cheeseman2018-09-282-3/+3
| | | | llvm-svn: 343342
* Revert r343317Luke Cheeseman2018-09-2826-198/+78
| | | | | | - asan buildbots are breaking and I need to investigate the issue llvm-svn: 343341
* [WebAssembly] Preserve function signatures during LTOSam Clegg2018-09-283-7/+38
| | | | | | | | | | | | | | | | | | | With LTO when and undefined function (with a known signature) in replaced by a defined bitcode function we were loosing the signature information (since bitcode functions don't have signatures). With this change we preserve the original signature from the undefined function and verify that the post LTO compiled function has the correct signature. This change improves the error handling in the case where there is a signature mismatch with a function defined in a bitcode file. Differential Revision: https://reviews.llvm.org/D50721 llvm-svn: 343340
* [bindings/go] Add Go bindings for inline assemblywhitequark2018-09-281-0/+20
| | | | | | | | | | | | Reviewers: harlanhaskins, whitequark, pcc Reviewed By: pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D46437 llvm-svn: 343339
* AST: add missing ObjC extensions to MS style name decorationSaleem Abdulrasool2018-09-282-3/+62
| | | | | | | | | | | | | | | | | | | | | | | Add support for encoding type arguments for lightweight generics in Objective-C++ mode. Additionally, add support for the `__kindof` modifier. This should complete the coverage of the ObjC extensions that clang currently supports under the MS style name decoration scheme. This is implemented similar to the Objective-C lifetime qualifiers decoration: a template specialization in the `__ObjC` namespace so that we can interoperate with Microsoft's tools as well as ensure that we do not accidentally collide with new features in the Microsoft implementation. Since the `__kindof` appertains to the type and not the pointer, we apply the template specialization to the underlying type instead of the pointer type. Unfortunately, until D52581 is resolved, the generated name is not really compatible with the MS tools as well as breaks interoperability with Objective-C++ and C++. This resolves PR37754! llvm-svn: 343338
* Revert "[LLVM-C] Add bindings for addCoroutinePassesToExtensionPoints"whitequark2018-09-283-14/+0
| | | | | | | | | This reverts commit c4baf7c2f06ff5459c4f5998ce980346e72bff97. Broke the bots, and should really be in Transforms/Coroutines instead. llvm-svn: 343337
* [LLVM-C] Add bindings for addCoroutinePassesToExtensionPointswhitequark2018-09-283-0/+14
| | | | | | | | | | | | | | Summary: This patch adds bindings to C and Go for addCoroutinePassesToExtensionPoints, which is used to add coroutine passes to the correct locations in PassManagerBuilder. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: mehdi_amini, modocache, llvm-commits Differential Revision: https://reviews.llvm.org/D51642 llvm-svn: 343336
* [DRIVER][OFFLOAD] Do not invoke unbundler on unsupported file types.Alexey Bataev2018-09-284-3/+26
| | | | | | | | | clang-offload-bundler should not be invoked with the unbundling action when the input file type does not match the action type. For example, .so files should be unbundled during linking phase and should be linked only with the host code. llvm-svn: 343335
* [LLVM-C] Fix broken build botsRobert Widmann2018-09-281-25/+25
| | | | | | | | | | | | Summary: Fix broken bots caused by the merge of D51522. Reviewers: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52657 llvm-svn: 343334
* [utils] Cope with the binary having a .exe extension in ↵Greg Bedwell2018-09-281-2/+2
| | | | | | update_mca_test_checks.py llvm-svn: 343333
* [utils] Stricter checking from update_mca_test_checks.pyGreg Bedwell2018-09-283-38/+50
| | | | | | | | | | | | | | | | If any prefixes have been specified on the RUN lines that do not end up ever actually getting printed, raise an Error. This is either an indication that the run lines just need cleaning up, or that something is more fundamentally wrong with the test. Also raise an Error if there are any blocks which cannot be checked because they are not uniquely covered by a prefix. Fixed up a couple of tests where the extra checking flagged up issues. Differential Revision: https://reviews.llvm.org/D48276 llvm-svn: 343332
* [utils] Allow better identification of matching blocks in ↵Greg Bedwell2018-09-285-151/+194
| | | | | | | | | | | | | | update_mca_test_checks.py Insert empty blocks to cause the positions of matching blocks to match across lists where possible so that later stages of the algorithm can actually identify them as being identical. Regenerated all tests with this change. Differential Revision: https://reviews.llvm.org/D52560 llvm-svn: 343331
* [LLVM-C] Add more debug information accessors to GlobalObject and InstructionRobert Widmann2018-09-285-8/+195
| | | | | | | | | | | | | | Summary: Adds missing debug information accessors to GlobalObject. This puts the finishing touches on cloning debug info in the echo tests. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: aprantl, JDevlieghere, llvm-commits, harlanhaskins Differential Revision: https://reviews.llvm.org/D51522 llvm-svn: 343330
* [InstCombine] don't propagate wider shufflevector arguments to predecessorsSanjay Patel2018-09-283-12/+28
| | | | | | | | | | | | | | | InstCombine would propagate shufflevector insts that had wider output vectors onto predecessors, which would sometimes push undef's onto the divisor of a div/rem and result in bad codegen. I've fixed this by just banning propagating shufflevector back if the result of the shufflevector is wider than the input vectors. Patch by: @sheredom (Neil Henning) Differential Revision: https://reviews.llvm.org/D52548 llvm-svn: 343329
* [InstCombine] adjust shuffle undef propagation tests; NFCSanjay Patel2018-09-282-200/+29
| | | | | | | | | | | These are the updated baseline tests for D52548 - I'm putting the tests next to the tests where the transform functions as expected, so we can see the intended/unintended consequences. Patch by: @sheredom (Neil Henning) llvm-svn: 343328
* [ORC] Remove some dead code.Lang Hames2018-09-281-20/+0
| | | | llvm-svn: 343327
* [ORC] Fix the unit tests that were broken by r343323.Lang Hames2018-09-281-0/+2
| | | | llvm-svn: 343326
* [GISel]: Remove an incorrect assert in CallLoweringAditya Nandakumar2018-09-282-1/+13
| | | | | | | | | | | https://reviews.llvm.org/D51147 Asserting if any extend of vectors should be up to the target's legalizer/target specific code not in CallLowering. reviewed by : dsanders. llvm-svn: 343325
* [libomptarget-nvptx] Add testing infrastructureJonas Hahnfeld2018-09-289-16/+208
| | | | | | | | | | | | | | | This patch also introduces testing for libomptarget-nvptx which has been missing until now. I propose to add tests for all bugs that are fixed in the future. The target check-libomptarget-nvptx is not run by default because - we can't determine if there is a GPU plugged into the system. - it will require the latest Clang compiler. Keeping compatibility with older releases would prevent testing newer code generation developed in trunk. Differential Revision: https://reviews.llvm.org/D51687 llvm-svn: 343324
* [ORC] Improve debugging output for ORC.Lang Hames2018-09-287-57/+238
| | | | | | | | | | | | (1) Print debugging output under a session lock to avoid garbled messages when compiling on multiple threads. (2) Name MaterializationUnits, add an ostream operator for them, and so they can be easily referenced in debugging output, and have that ostream operator optionally print code/data/hidden symbols provided by that materialization unit based on command line options. llvm-svn: 343323
* Revert r342652 "[winasan] Unpoison the stack in NtTerminateThread"Hans Wennborg2018-09-282-12/+1
| | | | | | | | | | | | | This seems to cause the thread's exit code to be clobbered, breaking Chromium tests. Also revert follow-up r342654. > In long-running builds we've seen some ASan complaints during thread creation that we suspect are due to leftover poisoning from previous threads whose stacks occupied that memory. This patch adds a hook that unpoisons the stack just before the NtTerminateThread syscall. > > Differential Revision: https://reviews.llvm.org/D52091 llvm-svn: 343322
* [X86][Btver2] PSUBS/PSUBUS instructions are zero-idiomsSimon Pilgrim2018-09-282-148/+157
| | | | | | Noticed during llvm-exegesis tests, the PSUBS/PSUBUS instructions have the same zero-idiom behaviour to PSUB llvm-svn: 343321
* [ELF][HEXAGON] Add support for dynamic librariesSid Manning2018-09-284-5/+75
| | | | | | | | | Write out the PLT header and stub. Hexagon uses RELA relocations. Differential Revision: https://reviews.llvm.org/D52317 llvm-svn: 343320
* [X86][Btver2] Add zero-idiom tests for PSUBS/PSUBUS instructionsSimon Pilgrim2018-09-281-88/+172
| | | | | | Noticed during llvm-exegesis tests, the PSUBS/PSUBUS instructions have the same zero-idiom behaviour to PSUB llvm-svn: 343319
* Reapply the changes reverted by r343236Luke Cheeseman2018-09-282-3/+3
| | | | llvm-svn: 343318
* Reapply changes reverted by r343235Luke Cheeseman2018-09-2826-78/+198
| | | | | | | | - Add fix so that all code paths that create DWARFContext with an ObjectFile initialise the target architecture in the context - Add an assert that the Arch is known in the Dwarf CallFrameString method llvm-svn: 343317
* Fix and modernize StringMatcher comment; NFCSven van Haastregt2018-09-281-4/+3
| | | | llvm-svn: 343316
OpenPOWER on IntegriCloud