summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Reverted commits 333390, 333391 and 333394Serge Pavlov2018-05-2912-77/+85
| | | | | | Build of shared library LLVMDemangle.so fails due to dependency problem. llvm-svn: 333395
* Added library LLVMSupport to dependencies of LLVMDemangleSerge Pavlov2018-05-291-0/+3
| | | | | | | After r333390 build of LLVMDemangle.so fails due to unresolved reference `llvm::report_bad_alloc_error`. llvm-svn: 333394
* [X86] Disable a DAG combine to allow packed AVX512DQ instructions to be ↵Craig Topper2018-05-292-20/+77
| | | | | | | | | | | | | | | | consistently used for i64->float/double conversions. Summary: We already get this right if the i64 didn't come from a load. Reviewers: RKSimon Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D47439 llvm-svn: 333393
* [X86][Sched] Add InstRW for CLC on Intel after SNB.Clement Courbet2018-05-2915-13/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: After SNB, Intel CPUs can rename CF independently of other EFLAGS, so the renamer can zero it for free. Note that STC still consumes resources. To reproduce: `$ llvm-exegesis -mode=uops -opcode-name=CLC` On SNB: ``` --- key: opcode_name: CLC mode: uops config: '' cpu_name: sandybridge llvm_triple: x86_64-unknown-linux-gnu num_repetitions: 10000 measurements: - { key: '3', value: 0.0014, debug_string: SBPort0 } - { key: '4', value: 0.0013, debug_string: SBPort1 } - { key: '5', value: 0.0003, debug_string: SBPort4 } - { key: '6', value: 0.0029, debug_string: SBPort5 } - { key: '10', value: 0.0003, debug_string: SBPort23 } error: '' info: 'instruction is serial, repeating a random one. Snippet: CLC ' ... ``` On HSW: ``` --- key: opcode_name: CLC mode: uops config: '' cpu_name: haswell llvm_triple: x86_64-unknown-linux-gnu num_repetitions: 10000 measurements: - { key: '3', value: 0.001, debug_string: HWPort0 } - { key: '4', value: 0.0009, debug_string: HWPort1 } - { key: '5', value: 0.0004, debug_string: HWPort2 } - { key: '6', value: 0.0006, debug_string: HWPort3 } - { key: '7', value: 0.0002, debug_string: HWPort4 } - { key: '8', value: 0.0012, debug_string: HWPort5 } - { key: '9', value: 0.0022, debug_string: HWPort6 } - { key: '10', value: 0.0001, debug_string: HWPort7 } error: '' info: 'instruction is serial, repeating a random one. Snippet: CLC ' ... ``` Reviewers: craig.topper, RKSimon Subscribers: gchatelet, llvm-commits Differential Revision: https://reviews.llvm.org/D47362 llvm-svn: 333392
* Added system header cstdlib to MemAlloc.hSerge Pavlov2018-05-291-0/+1
| | | | | | | Some buildbots fail because they cannot find `std::malloc` and other allocation functions. llvm-svn: 333391
* Use uniform mechanism for OOM errors handlingSerge Pavlov2018-05-2911-85/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | In r325551 many calls of malloc/calloc/realloc were replaces with calls of their safe counterparts defined in the namespace llvm. There functions generate crash if memory cannot be allocated, such behavior facilitates handling of out of memory errors on Windows. If the result of *alloc function were checked for success, the function was not replaced with the safe variant. In these cases the calling function made the error handling, like: T *NewElts = static_cast<T*>(malloc(NewCapacity*sizeof(T))); if (NewElts == nullptr) report_bad_alloc_error("Allocation of SmallVector element failed."); Actually knowledge about the function where OOM occurred is useless. Moreover having a single entry point for OOM handling is convenient for investigation of memory problems. This change removes custom OOM errors handling and replaces them with calls to functions `llvm::safe_*alloc`. Declarations of `safe_*alloc` are moved to a separate include file, to avoid cyclic dependency in SmallVector.h Differential Revision: https://reviews.llvm.org/D47440 llvm-svn: 333390
* [LangRef] Fix TBAA exampleFangrui Song2018-05-291-1/+1
| | | | llvm-svn: 333389
* [X86] Remove masked vpermi2var/vpermt2var intrinsics and autoupgrade.Craig Topper2018-05-2919-668/+1315
| | | | | | We have unmasked intrinsics now and wrap them with a select. This is a net reduction of 36 intrinsics from before the unmasked intrinsics were added. llvm-svn: 333388
* [X86] Merge the 3 different flavors of masked vpermi2var/vpermt2var builtins ↵Craig Topper2018-05-2913-658/+504
| | | | | | to a single version without masking. Use select builtins with appropriate operand instead. llvm-svn: 333387
* [X86] Add unmasked vermi2var intrinsics so we can use explicit select ↵Craig Topper2018-05-298-108/+1759
| | | | | | | | instructions for masking in clang. This will allow us to remove the 3 different flavors of masked intrinsics. I'm leaving the actual intrinsic removal for another patch. llvm-svn: 333386
* [RISCV] Add -mrelax/-mno-relax flags to enable/disable RISCV linker relaxationShiva Chen2018-05-293-0/+21
| | | | | | Differential Revision: https://reviews.llvm.org/D44888 llvm-svn: 333385
* LWG 2969 "polymorphic_allocator::construct() shouldn't pass resource()"Eric Fiselier2018-05-299-35/+318
| | | | | | | | | | | | | | | | | | | Patch from Arthur O'Dwyer. In the TS, `uses_allocator` construction for `pair` tried to use an allocator type of `memory_resource*`, which is incorrect because `memory_resource*` is not an allocator type. LWG 2969 fixed it to use `polymorphic_allocator` as the allocator type instead. https://wg21.link/lwg2969 (D47090 included this in `<memory_resource>`; at Eric's request, I've split this out into its own patch applied to the existing `<experimental/memory_resource>` instead.) Reviewed as https://reviews.llvm.org/D47109 llvm-svn: 333384
* [X86] Converge X86ISD::VPERMV3 and X86ISD::VPERMIV3 to a single opcode.Craig Topper2018-05-2811-118/+109
| | | | | | | | | | These do the same thing with the first and second sources swapped. They previously came from separate intrinsics that specified different masking behavior. But we can cover that with isel patterns and a single node. This is a step towards reducing the number of intrinsics needed. A bunch of tests change because we are now biased to choosing VPERMT over VPERMI when there is nothing to signal that commuting is beneficial. llvm-svn: 333383
* [X86] Fix typo in comment. NFCCraig Topper2018-05-281-2/+2
| | | | llvm-svn: 333382
* Fix up the final bits of breakage due to clang v5 generating bad implicit ↵Marshall Clow2018-05-283-12/+17
| | | | | | template deduction guides - specifically for copy-ctors llvm-svn: 333381
* [AMDGPU] Re-enabled 128bit wide-vector generation for local addr space by ↵Farhana Aleen2018-05-283-9/+5
| | | | | | | | | | default. Summary: Bug reported here https://bugs.freedesktop.org/show_bug.cgi?id=105464 found to be resolved by some other fixes. Author: FarhanaAleen llvm-svn: 333380
* [coroutines] Pass implicit object parameter to promise ctor (fix BUG37604)Gor Nishanov2018-05-283-5/+66
| | | | | | | | | | | | | | | | | | Summary: Complete the implementation of p0914r1. Implicit object parameter should be passed to a promise constructor. Fixes: https://bugs.llvm.org/show_bug.cgi?id=37604 Reviewers: modocache, rsmith, lewissbaker Reviewed By: modocache Subscribers: cfe-commits, EricWF Differential Revision: https://reviews.llvm.org/D47454 llvm-svn: 333379
* [LLVM-C] [OCaml] Remove LLVMAddBBVectorizePassFangrui Song2018-05-287-24/+4
| | | | | | | | | | | | Summary: It was fully replaced back in 2014, and the implementation was removed 11 months ago by r306797. Reviewers: hfinkel, chandlerc, whitequark, deadalnix Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D47436 llvm-svn: 333378
* [Power9]Legalize and emit code for HW/Byte vector extract and convert to QPLei Huang2018-05-282-3/+1171
| | | | | | | | | Implemente patterns to extract HWord and Byte vector elements and convert to quad-precision. Differential Revision: https://reviews.llvm.org/D46774 llvm-svn: 333377
* Mark the template deduction tests as UNSUPPORTED on clang 5, because it ↵Marshall Clow2018-05-282-1/+6
| | | | | | deduces the wrong type. llvm-svn: 333376
* Introduces --stats-only option to only show changes in statistics.Mikhail R. Gadelha2018-05-281-3/+63
| | | | llvm-svn: 333375
* [PowerPC] Set isAsmParserOnly=1 for X-form TLS loads/storesZaara Syeda2018-05-283-7/+53
| | | | | | | | | | | | The X-form TLS load/store instructions added for optimizing the initial-exec sequence in https://reviews.llvm.org/rL327635 fail to assemble. llvm-mc fails with the error: invalid operand for instruction. This patch adds these instructions into a block with isAsmParserOnly, similar to how ADD8TLS_ is currently handled. Differential Revision: https://reviews.llvm.org/D47382 llvm-svn: 333374
* [clangd] Remove the outdated comment. NFCIlya Biryukov2018-05-281-1/+0
| | | | llvm-svn: 333373
* [Sparc] Add .uahalf and .uaword directivesDaniel Cederman2018-05-282-0/+8
| | | | | | | | | | | | | | | | | | | | | | Summary: Adding these makes it easier to assemble the output from GCC which generates a lot of .uahalf and .uaword directives. GAS treats .uahalf and .half the same unless the --enforce-aligned-data flag is used. I could not find a similar flag for LLVM so it seems that .half does not have any alignment requirement and is treated the same as .uahalf should be. If that would change later on then the tests in sparc-directives.s would fail due to bad alignment. Reviewers: jyknight, asb Reviewed By: jyknight Subscribers: fedor.sergeev, jrtc27, llvm-commits Differential Revision: https://reviews.llvm.org/D47319 llvm-svn: 333372
* [clangd] Remove accessors for top-level decls from preambleIlya Biryukov2018-05-284-92/+41
| | | | | | | | | | | | | | | | | | | | | | Summary: They cause lots of deserialization and are not actually used. The ParsedAST accessor that previously returned those was renamed from getTopLevelDecls to getLocalTopLevelDecls in order to avoid confusion. This change should considerably improve the speed of findDefinition and other features that try to find AST nodes, corresponding to the locations in the source code. Reviewers: ioeric, sammccall Reviewed By: sammccall Subscribers: klimek, mehdi_amini, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47331 llvm-svn: 333371
* [clangd] Fix leak sanitizers warnings in clangdIlya Biryukov2018-05-283-18/+41
| | | | | | | | | | | | | | | | The commit includes two changes: 1. Set DisableFree to false when building the ParsedAST. This is sane default, since clangd never wants to leak the AST. 2. Make sure CompilerInstance created in code completion is passed to the FrontendAction::BeginSourceFile call. We have to do this to make sure the memory buffers of remapped files are properly freed. Our tests do not produce any warnings under asan anymore. The changes are mostly trivial, just moving the code around. So sending without review. llvm-svn: 333370
* [clangd] Workaround the comments crash, reenable the test.Ilya Biryukov2018-05-282-15/+31
| | | | | | | | | | | This fix is still quite fragile, the underlying problem is that the code should not rely on source ranges coming from the preamble to be correct when reading from the text buffers. This is probably not possible to achieve in practice, so we would probably have to keep the contents of old headers around for the lifetime of the preamble. llvm-svn: 333369
* [OMPT] Rename ompt_wait_id to omp_wait_idJoachim Protze2018-05-287-75/+75
| | | | | | | | Rename ompt_wait_id to omp_wait_id, as defined in the spec. Differential Revision: https://reviews.llvm.org/D46530 llvm-svn: 333368
* [OMPT] Rename ompt_frame_t to omp_frame_tJoachim Protze2018-05-2810-36/+36
| | | | | | | | Rename ompt_frame_t to omp_frame_t, as defined in the spec. Differential Revision: https://reviews.llvm.org/D43568 llvm-svn: 333367
* [ScopInfo] Update Scop::addUserContext() to C++ interfaceTobias Grosser2018-05-281-21/+10
| | | | | | | | | | | | | | Summary: This patch updates `Scop::addUserContext()` function to the new C++ interface and replaces the `auto` keyword with explicit type wherever used in this function. Reviewers: grosser, bollu, philip.pfaffe, chelini, Meinersbur Reviewed By: grosser Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D47438 llvm-svn: 333366
* [X86] Stop forcing X86VPermi2X node index operand to match destination type ↵Craig Topper2018-05-283-40/+93
| | | | | | | | | | to make masking pattern matching easier. Add extra patterns with bitcasts instead. This basically reverts r280696 in favor of using extra patterns as mentioned as an alternative in that commit message. For now I've only added the cases we have test cases for, but it should be easy to add more in the future. This will help to convert VPERMI2PS/VPERMT2PS intrinsics to use a single ISD node opcode. And hopefully allow some intrinsics to be removed. llvm-svn: 333365
* NFC: Fix some comment typos.Bob Wilson2018-05-284-4/+4
| | | | llvm-svn: 333364
* [Tablegen] Avoid generating empty switch statements. NFCAndrea Di Biagio2018-05-271-4/+10
| | | | | | | This fixes an MSVC warning (warning C4065: switch statement contains 'default' but no 'case' labels) introduced with revision 333293. llvm-svn: 333363
* [AMDGPU] Fixed WWM bug in block otherwise entirely in WQMTim Renouf2018-05-272-0/+36
| | | | | | | | | | | | | | | | Summary: For a block with WQM on entry and exit and containing no exact mode code, but containing some WWM code, the WQM pass forgot to process the block at all and so did not insert code to enter and leave WWM. This commit fixes that. Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D47027 Change-Id: I044792eead1293bed4203fb26ce75f47878afeb6 llvm-svn: 333362
* [OMPT] Fix test parallel/not_enough_threads.cJonas Hahnfeld2018-05-271-46/+60
| | | | | | | | | | | | | | | Upcoming changes to FileCheck will modify CHECK-DAG to not match overlapping regions of the input. This test was found to be affected because it expects to find four threads to invoke events of type ompt_event_implicit_task_begin. It turns out this is wrong because OMP_THREAD_LIMIT is set to 2, so there are only two threads. The rest of the test got it right so it went unnoticed until now. (Rewrite test and apply clang-format to it as discussed in the past.) Differential Revision: https://reviews.llvm.org/D47119 llvm-svn: 333361
* [X86] Don't hardcode scheduler classSimon Pilgrim2018-05-272-25/+28
| | | | | | Also fixes BEXTRI instruction to use WritBEXTR class, which was missed when the class was added. llvm-svn: 333360
* Revert 333358 as it's failing on some builders.David Green2018-05-2723-3878/+20
| | | | | | I'm guessing the tests reply on the ARM backend being built. llvm-svn: 333359
* [UnrollAndJam] Add a new Unroll and Jam passDavid Green2018-05-2723-20/+3878
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a simple implementation of the unroll-and-jam classical loop optimisation. The basic idea is that we take an outer loop of the form: for i.. ForeBlocks(i) for j.. SubLoopBlocks(i, j) AftBlocks(i) Instead of doing normal inner or outer unrolling, we unroll as follows: for i... i+=2 ForeBlocks(i) ForeBlocks(i+1) for j.. SubLoopBlocks(i, j) SubLoopBlocks(i+1, j) AftBlocks(i) AftBlocks(i+1) Remainder So we have unrolled the outer loop, then jammed the two inner loops into one. This can lead to a simpler inner loop if memory accesses can be shared between the now-jammed loops. To do this we have to prove that this is all safe, both for the memory accesses (using dependence analysis) and that ForeBlocks(i+1) can move before AftBlocks(i) and SubLoopBlocks(i, j). Differential Revision: https://reviews.llvm.org/D41953 llvm-svn: 333358
* Remove boolean argument from isSuitableFromBSS.Eric Christopher2018-05-271-8/+5
| | | | | | | | The argument was used as an additional negative condition and can be expressed in the if conditional without needing to pass it down. Update bss commentary around main use. llvm-svn: 333357
* Cleanups for getKindForGlobal:Eric Christopher2018-05-271-11/+10
| | | | | | | | - Clarify block comment - Make Function/GlobalVariable split more explicit. - Move locals closer to uses. llvm-svn: 333356
* Tidy some language in the xray documentation.Eric Christopher2018-05-272-17/+15
| | | | llvm-svn: 333354
* Fix memory leak in SubsPrimitiveParmItaniumRaphael Isemann2018-05-271-1/+3
| | | | | | | | | | | | | | Summary: FastDemangle gives us a C-string that we own (which is allocated in SymbolDemangler::GetDemangledCopy). As we are not deleting the string, we leak memory whenever we call SubsPrimitiveParmItanium. Reviewers: javed.absar Subscribers: kristof.beyls, chrib, lldb-commits Differential Revision: https://reviews.llvm.org/D47418 llvm-svn: 333353
* [DebugInfo] Fix typo. NFCFangrui Song2018-05-271-1/+1
| | | | llvm-svn: 333352
* Revert "Add nonnull; use it for atomics"JF Bastien2018-05-263-232/+23
| | | | | | | | | | | | | | That's r333325, as well as follow-up "Fix GCC handling of ATOMIC_VAR_INIT" r333327. Marshall asked to revert: Let's have a discussion about how to implement this so that it is more friendly to people with installed code bases. We've had *extremely* loud responses to unilaterally adding warnings - especially ones that can't be easily disabled - to the libc++ code base in the past. llvm-svn: 333351
* [dwarfdump] Make -c and -p work togetherJonas Devlieghere2018-05-262-3/+316
| | | | | | | | | | | | | When requesting to dump both the parent chain and children, we used to print the DIE more than once because we propagated the dump options to the parent without clearing the respective flags. This commit fixes this oversight and adds a test. rdar://39415292 Differential revision: https://reviews.llvm.org/D47263 llvm-svn: 333350
* Revert r333347 "[X86] Rewrite the max and min reduction intrinsics to make ↵Craig Topper2018-05-262-2716/+2506
| | | | | | | | better use of other functions and to reduce width to 256 and 128 bits were possible." This wasn't supposed to be commited yet. llvm-svn: 333349
* [X86] Remove mask from avx512ifma builtins. Use a select instruction instead.Craig Topper2018-05-265-110/+88
| | | | | | This reduces from 12 builtins to 6 since we no longer need a mask and maskz version. llvm-svn: 333348
* [X86] Rewrite the max and min reduction intrinsics to make better use of ↵Craig Topper2018-05-262-2506/+2716
| | | | | | | | | | | | | | | | | | | other functions and to reduce width to 256 and 128 bits were possible. Summary: We only need to use 512 bit vectors all the way through v8i64 reductions since those max instructions are new to avx512f and only available in 512 bits until SKX. For v16i32 and floating point we have legacy 128/256 bit instructions we can use. I've tried to use other intrinsics to reduce the verbosity of the code and avoid having to mention all the shuffles. I've also removed all the -1 shuffle indices so the output sequence is fully specified and not left to backend optimization. Reviewers: RKSimon, spatel, GBuella Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D47401 llvm-svn: 333347
* [X86] Remove masking from avx512ifma intrinsics. Use a select instead.Craig Topper2018-05-2610-212/+1133
| | | | | | This allows us to avoid having mask and maskz variant. Reducing from 12 intrinsics to 6. llvm-svn: 333346
* Add missing includes to some LLDB headers.Raphael Isemann2018-05-264-0/+7
| | | | | | | | | | Summary: When compiling with modules, these missing includes cause the build to fail (as the header can't be compiled into a module). Subscribers: ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D47412 llvm-svn: 333345
OpenPOWER on IntegriCloud