summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[WebAssembly] Don't generate unused table entries."Sam Clegg2019-05-094-28/+26
| | | | | | | | This reverts commit b33fdb7768e5de5fbeb23f65d8d455e7ca88b021. This change apparently broke am emscripten test. llvm-svn: 360367
* [CodeGen] Add comment about FSUB <-> FNEG xformsCameron McInally2019-05-091-0/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D61741 llvm-svn: 360366
* [OPENMP]Fix PR41767: diagnose DSA for variables in clauses with default(none).Alexey Bataev2019-05-099-16/+112
| | | | | | | | | If the combined directive has default(none) clause and has clauses for inner directive that reference some variables, for which data-sharing attributes are not specified, the error messages should be emitted for such variables. llvm-svn: 360365
* [AMDGPU] gfx1010 v_interp_* instructionsStanislav Mekhanoshin2019-05-091-6/+11
| | | | | | Differential Revision: https://reviews.llvm.org/D61703 llvm-svn: 360364
* Specify target triple to fix the tests I committed in r360359 that areAkira Hatanaka2019-05-093-3/+3
| | | | | | still failing. llvm-svn: 360363
* [OPENMP]Fix PR41768: check DSA for globals with default(none) clauses.Alexey Bataev2019-05-0941-69/+121
| | | | | | | | If the default(none) was specified for the construct, we might miss diagnostic for the globals without explicitly specified data-sharing attributes. Patch fixes this problem. llvm-svn: 360362
* Specify ObjC runtime to fix the tests I committed in r360359 that areAkira Hatanaka2019-05-093-3/+3
| | | | | | failing. llvm-svn: 360361
* [X86][SSE] Fold add(shuffle(),shuffle()) to hadd on 'slow' targets (PR39920)Simon Pilgrim2019-05-097-1250/+401
| | | | | | | | | | As reported on PR39920, "slow horizontal ops" targets tend to internally expand to 2*shuffle+add/sub - so if we can reduce 2*shuffle+add/sub to a hadd/sub then we should do it - similar port usage but reduced instruction count. This works out in most cases, although the "PR22377" regression in vector-shuffle-combining.ll is annoying - going from 2*shuffle+add+shuffle to hadd+2*shuffle - I've opened PR41813 to cover this. Differential Revision: https://reviews.llvm.org/D61308 llvm-svn: 360360
* [CodeGen][ObjC] Remove the leading `l_` from ObjC symbols and makeAkira Hatanaka2019-05-0924-214/+232
| | | | | | | | | | | | | | | private symbols in the __DATA segment internal. This prevents the linker from removing the symbol names. Keeping the symbols visible enables tools to collect various information about the symbols, for example, tools that discover whether or not a symbol gets dirtied. rdar://problem/48887111 Differential Revision: https://reviews.llvm.org/D61454 llvm-svn: 360359
* check_clang_tidy.py now passes `-format-style=none` to clang_tidyDmitri Gribenko2019-05-091-7/+19
| | | | | | | | | | | | | | | | | Summary: If the test does not specify a formatting style, force "none"; otherwise autodetection logic can discover a ".clang-tidy" file that is not related to the test. Reviewers: alexfh Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61739 llvm-svn: 360358
* [DAGCombiner] Limit number of nodes explored as store candidates.Florian Hahn2019-05-091-2/+5
| | | | | | | | | | | | | | To find the candidates to merge stores we iterate over all nodes in a chain for each store, which leads to quadratic compile times for large basic blocks with a large number of stores. Reviewers: niravd, spatel, craig.topper Reviewed By: niravd Differential Revision: https://reviews.llvm.org/D61511 llvm-svn: 360357
* Re-enable lit test shtest-timeout.py on non-Windows.Paul Robinson2019-05-091-1/+1
| | | | | | It was disabled incorrectly, which meant it wasn't running anywhere. llvm-svn: 360356
* [lldb] build.py: fix behavior when passing --compiler=/path/to/compilerJorge Gorbe Moya2019-05-092-6/+16
| | | | | | | | | | | | | | | All the other paths in the find_toolchain function return a tuple (detected_toolchain_type, compiler_path), but when the parameter to --compiler is not one of the predefined names it only returns the detected toolchain type, which causes an error when trying to unpack the result. This patch changes it to return also the compiler path passed as a parameter. Differential Revision: https://reviews.llvm.org/D61713 llvm-svn: 360355
* [JITLoaderGDB] Set eTypeJIT for objects read from JIT descriptorsStefan Granitz2019-05-095-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: First part of a fix for JITed code debugging. This has been a regression from 5.0 to 6.0 and it's is still reproducible on current master: https://bugs.llvm.org/show_bug.cgi?id=36209 The address of the breakpoint site is corrupt: the 0x4 value we end up with, looks like an offset on a zero base address. When we parse the ELF section headers from the JIT descriptor, the load address for the text section we find in `header.sh_addr` is correct. The bug manifests in `VMAddressProvider::GetVMRange(const ELFSectionHeader &)` (follow it from `ObjectFileELF::CreateSections()`). Here we think the object type was `eTypeObjectFile` and unleash some extra logic [1] which essentially overwrites the address with a zero value. The object type is deduced from the ELF header's `e_type` in `ObjectFileELF::CalculateType()`. It never returns `eTypeJIT`, because the ELF header has no representation for it [2]. Instead the in-memory ELF object states `ET_REL`, which leads to `eTypeObjectFile`. This is what we get from `lli` at least since 3.x. (Might it be better to write `ET_EXEC` on the JIT side instead? In fact, relocations were already applied at this point, so "Relocatable" is not quite exact.) So, this patch proposes to set `eTypeJIT` explicitly whenever we read from a JIT descriptor. In `ObjectFileELF::CreateSections()` we can then call `GetType()`, which returns the explicit value or otherwise falls back to `CalculateType()`. LLDB then sets the breakpoint successfully. Next step: debug info. ``` Process 1056 stopped * thread #1, name = 'lli', stop reason = breakpoint 1.2 frame #0: 0x00007ffff7ff7000 JIT(0x3ba2030)`jitbp() JIT(0x3ba2030)`jitbp: -> 0x7ffff7ff7000 <+0>: pushq %rbp 0x7ffff7ff7001 <+1>: movq %rsp, %rbp 0x7ffff7ff7004 <+4>: movabsq $0x7ffff7ff6000, %rdi ; imm = 0x7FFFF7FF6000 0x7ffff7ff700e <+14>: movabsq $0x7ffff6697e80, %rcx ; imm = 0x7FFFF6697E80 ``` [1] It was first introduced with https://reviews.llvm.org/D38142#change-lF6csxV8HdlL, which has also been the original breaking change. The code has changed a lot since then. [2] ELF object types: https://github.com/llvm/llvm-project/blob/2d2277f5/llvm/include/llvm/BinaryFormat/ELF.h#L110 Reviewers: labath, JDevlieghere, bkoropoff, clayborg, espindola, alexshap, stella.stamenova Reviewed By: labath, clayborg Subscribers: probinson, emaste, aprantl, arichardson, MaskRay, AlexDenisov, yurydelendik, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D61611 llvm-svn: 360354
* [AMDGPU] gfx1010 changes for PAL metadataStanislav Mekhanoshin2019-05-091-2/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D61704 llvm-svn: 360353
* [llvm-cxxfilt] Fix -Wshadow warning. NFCI.Simon Pilgrim2019-05-091-9/+10
| | | | | | Local variable Decorated was shadowing the global variable Decorated llvm-svn: 360352
* [MCA] Add support for nested and overlapping region markersAndrea Di Biagio2019-05-0912-38/+398
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes PR41523 https://bugs.llvm.org/show_bug.cgi?id=41523 Regions can now nest/overlap provided that they have different names. Anonymous regions cannot overlap. Region end markers must specify the region name. The only exception is for when there is only one user-defined region; in that particular case, the region end marker doesn't need to specify a name. Incorrect region end markers are no longer ignored. Instead, the tool reports an error and we exit with an error code. Added test cases to verify the new diagnostic error messages. Updated the llvm-mca docs to reflect this feature change. Differential Revision: https://reviews.llvm.org/D61676 llvm-svn: 360351
* MinidumpYAML: add support for the ThreadList streamPavel Labath2019-05-093-84/+194
| | | | | | | | | | | | | | | | | | | Summary: The implementation is a pretty straightforward extension of the pattern used for (de)serializing the ModuleList stream. Since there are other streams which use the same format (MemoryList and MemoryList64, at least). I tried to generalize the code a bit so that adding future streams of this type can be done with less code. Reviewers: amccarth, jhenderson, clayborg Subscribers: markmentovai, lldb-commits, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61423 llvm-svn: 360350
* [clangd] Bump index version and get rid of wrong assertionKadir Cetinkaya2019-05-092-2/+4
| | | | | | | | | | | | | | | | | | | | Summary: After rL360344, BackgroundIndex expects symbols with zero refcounts. Therefore existing index files are no longer valid. Assertion regarding finding target of a reference was wrong, since background-index might still be going on or we might've loaded only some part of the shards and might be missing the declaring shards for the symbol. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61734 llvm-svn: 360349
* Revert r360345 and r360346, as they are not passing the testbots.Aaron Ballman2019-05-098-1183/+0
| | | | | | http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/48063/steps/test/logs/stdio llvm-svn: 360348
* [CodeGenPrepare] Limit recursion depth for collectBitPartsDavid Stuttard2019-05-091-7/+17
| | | | | | | | | | | | | | | | Summary: Seeing some issues for windows debug pathological cases with collectBitParts recursion (1525 levels of recursion!) Setting the limit to 64 as this should be sufficient - passes all lit cases Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61728 Change-Id: I7f44cdc6c1badf1c2ccbf1b0c4b6afe27ecb39a1 llvm-svn: 360347
* Fixing a link in the release notes to appease the Sphinx bot.Aaron Ballman2019-05-091-2/+2
| | | | llvm-svn: 360346
* Add the modernize-use-trailing-return check to rewrite function signatures ↵Aaron Ballman2019-05-098-0/+1183
| | | | | | | | to use trailing return types. Patch by Bernhard Manfred Gruber. llvm-svn: 360345
* [clangd] Count number of references while merging RefSlabs inside FileIndexKadir Cetinkaya2019-05-097-33/+104
| | | | | | | | | | | | | | | | | | | | | | | Summary: For counting number of references clangd was relying on merging every duplication of a symbol. Unfortunately this does not apply to FileIndex(and one of its users' BackgroundIndex), since we get rid of duplication by simply dropping symbols coming from non-canonical locations. So only one or two(coming from canonical declaration header and defined source file, if exists) replications of the same symbol reaches merging step. This patch changes reference counting logic to rather count number of different RefSlabs a given SymbolID exists. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, mgrang, arphaman, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59481 llvm-svn: 360344
* gn build: Merge r960255Nico Weber2019-05-091-0/+3
| | | | llvm-svn: 360343
* [OpenCL] Make global ctor init function a kernelAnastasia Stulova2019-05-095-200/+244
| | | | | | | | | | | | | | We need to be able to enqueue internal function that initializes global constructors on the host side. Therefore it has to be converted to a kernel. This change factors out common logic for adding kernel metadata and moves it from CodeGenFunction to CodeGenModule in order to make it accessible for the extra use case. Differential revision: https://reviews.llvm.org/D61488 llvm-svn: 360342
* [X86] AMD Piledriver (BdVer2): major cleanup (mainly inverse throughput)Roman Lebedev2019-05-0982-6441/+6540
| | | | | | | | | | | | | | | | I've started this cleanup more several times now, but got sidetracked elsewhere, e.g. by llvm-exegesis problems. Not this time, finally! This is mainly cleaning up the inverse throughput values, and a few latencies/uops, based on the llvm-exegesis measured values. Though this is not complete by any means, there's certainly more cleanup to be done. The performance numbers (i've only checked by RawSpeed benchmark) aren't really surprising - overall this *slightly* (< -1%) improves perf. llvm-svn: 360341
* [LoopVectorizer] fix test file to not run the entire -O3 pipelineSanjay Patel2019-05-091-2852/+1924
| | | | | | | | | | | | | | | | | | This test file has a long history of edits from changes outside of vectorization, and it would happen again with the proposal in D61726. End-to-end testing shouldn't be happening in a test file that is specifically checking for vector masked load/store ops. Larger-scale testing goes in PhaseOrdering or the test-suite. I've hopefully preserved the intent by taking what was completely unoptimized IR in some tests and passing that through the -O1 pipeline. That becomes the input IR, and now we just run the loop vectorizer and verify that the vector masked ops are produced as expected. llvm-svn: 360340
* [llvm-nm] Fix handling of symbol types 't' 'd' 'r'Fangrui Song2019-05-099-30/+204
| | | | | | | | | | | | | | | | | | | This restores part of r359311 that was reverted by r359830. Rewrite the symbol types to fix several issues. Notable difference is that the type of __init_array_start changes from 't' to 'd'. GNU nm used to mark ELF symbols relative to .init_array as 't' https://sourceware.org/bugzilla/show_bug.cgi?id=24505 (before 2.33) because ".init" is the prefix. The bug was copied by r287803. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D61551 llvm-svn: 360339
* [PowerPC][NFC] Add test for D60506 to show differences in code-genNemanja Ivanovic2019-05-091-0/+576
| | | | | | Differential revision: https://reviews.llvm.org/D61723 llvm-svn: 360338
* Fix local variable shadow warning in SmallVectorBase constructor. NFCI.Simon Pilgrim2019-05-091-2/+2
| | | | llvm-svn: 360337
* [clangd] Fix a TSAN warning in TUSchedulerTestsIlya Biryukov2019-05-091-2/+6
| | | | llvm-svn: 360336
* Fix uninitialized value warnings in StatepointBase constructors. NFCI.Simon Pilgrim2019-05-091-5/+2
| | | | llvm-svn: 360335
* Fix gcc compilation warning in test case [NFC]Mikael Holmen2019-05-091-1/+1
| | | | | | | | | | Without this, gcc (7.4) complains with ../tools/clang/tools/extra/clangd/unittests/PrintASTTests.cpp:99:28: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror] }))); ^ llvm-svn: 360334
* Fix gcc compilation warning in an assert [NFC]Mikael Holmen2019-05-091-1/+1
| | | | | | | | | | | | | | Without this, gcc (7.4) complains with ../tools/clang/lib/Parse/ParseDecl.cpp:3937:63: error: suggest parentheses around '&&' within '||' [-Werror=parentheses] assert(!isAlreadyConsumed || RangeEnd != SourceLocation() && ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ "both or neither of isAlreadyConsumed and " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "RangeEnd needs to be set"); ~ llvm-svn: 360333
* [clangd] Use AsyncTaskRunner in BackgroundIndex instead of std::threadIlya Biryukov2019-05-092-6/+7
| | | | | | | | | | | | | | | | | | Summary: To unify the way we create threads in clangd. This should simplify landing D50993. Reviewers: kadircet Reviewed By: kadircet Subscribers: MaskRay, jkorous, arphaman, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61724 llvm-svn: 360332
* [ARM][CGP] Guard against signext args and sitofpSam Parker2019-05-093-11/+80
| | | | | | | | | | Add an Argument that has the SExtAttr attached, as well as SIToFP instructions, as values that generate sign bits. SIToFP doesn't strictly do this and could be treated as a sink to be sign-extended. Differential Revision: https://reviews.llvm.org/D61381 llvm-svn: 360331
* [OpenCL] Switched CXX mode to be derived from C++17Anastasia Stulova2019-05-092-8/+3
| | | | | | Differential revision: https://reviews.llvm.org/D61506 llvm-svn: 360330
* [FIX] Change test to read file insteadDiogo N. Sampaio2019-05-091-1/+1
| | | | | | | | This should fix the test file failing in windows by reading the file it self instead of stdin, from 543913c3b41f llvm-svn: 360329
* [CodeGenPrepare] Ensure we get a non-null result from getTrueOrFalseValue. NFCI.Simon Pilgrim2019-05-091-1/+3
| | | | llvm-svn: 360328
* Revert "[OPENMP]Fix PR41768: check DSA for globals with `default(none)` ↵Roman Lebedev2019-05-0939-78/+66
| | | | | | | | | | | | clauses." This has introduced (exposed?) a crash in clang sema, that does not happen without this patch. I'll followup in the original bugreport and commit with reproducer. This reverts commit r360061. llvm-svn: 360327
* Revert "[OPENMP]Fix PR41767: diagnose DSA for variables in clauses with ↵Roman Lebedev2019-05-098-112/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | default(none)." This implementation isn't sound as per the standard. It erroneously diagnoses e.g. the following case: ``` $ cat test.cpp void f(int n) { #pragma omp parallel default(none) if(n) ; } ``` ``` $ ./bin/clang -fopenmp test.cpp test.cpp:2:40: error: variable 'n' must have explicitly specified data sharing attributes #pragma omp parallel default(none) if(n) ^ test.cpp:2:31: note: explicit data sharing attribute requested here #pragma omp parallel default(none) if(n) ^ 1 error generated. ``` As per OpenMP Application Programming Interface Version 5.0 November 2018: * 2.19.4.1default Clause The default clause explicitly determines the data-sharing attributes of variables that are referenced *in a parallel, teams, or task generating construct and would otherwise be implicitly determined (see Section 2.19.1.1 on page 270). * 2.6.1 Determining the Number of Threads for a parallel Region Using a variable in an if or num_threads clause expression of a parallel construct causes an implicit reference to the variable in all enclosing constructs. The if clause expression and the num_threads clause expression are evaluated in the context outside of the parallel construct, This reverts commit r360073. llvm-svn: 360326
* [SPIR] Simplified target checking.Anastasia Stulova2019-05-093-7/+3
| | | | | | | | | | Switched to Triple::isSPIR() helper to simplify code. Patch by kpet (Kevin Petit)! Differential revision: https://reviews.llvm.org/D61639 llvm-svn: 360325
* [ARM] Fix the extensions implied by a cpu nameDiogo N. Sampaio2019-05-092-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When using `clang -mcpu=CPUNAME+FEATURELIST`, the implied features defined by CPUNAME are not obtained, as the entire string is passed. This fixes that by spiting the cpuname string in the first `+`, if any. For example, when using ```clang -### --target=arm-arm-none-eabi -march=armv7-a -mcpu=cortex-a8+nocrc``` the intrinsic ```"target-feature" "+dsp"``` implied by `cortex-a8` is missing. Reviewers: keith.walker.arm, DavidSpickett, carwil Reviewed By: DavidSpickett Subscribers: javed.absar, kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61668 llvm-svn: 360324
* [SPIR] Simplified target checking.Anastasia Stulova2019-05-091-0/+5
| | | | | | | | | | Added Triple::isSPIR() helper to simplify code. Patch by kpet (Kevin Petit)! Differential revision: https://reviews.llvm.org/D61639 llvm-svn: 360323
* Fix LLVM_USE_PERF build after getPageSize changeSven van Haastregt2019-05-091-3/+3
| | | | | | | | Commit r360221 ("[Support] Add error handling to sys::Process::getPageSize().", 2019-05-08) seems to have missed these uses of getPageSize(). Update them to getPageSizeEstimate(). llvm-svn: 360322
* [ARM GlobalISel] Map DBG_VALUE for types != s32Diana Picus2019-05-092-17/+39
| | | | | | | | ...and make sure we fail elegantly for unsupported values. s64 goes into DPR, anything <= 32 into GPR. llvm-svn: 360321
* X86WinAllocaExpander: Drop code looking through register copies (PR41786)Hans Wennborg2019-05-091-16/+4
| | | | | | | | | | | | | This code was never covered by tests, in PR41786 it was pointed out that the deletion part doesn't work, and in a full Chrome build I was never able to hit the code path that looks through copies. It seems the situation it's supposed to handle doesn't actually come up in practice. Delete it to simplify the code. Differential revision: https://reviews.llvm.org/D61671 llvm-svn: 360320
* [MergeICmps][NFC] Re-generate tests with update_test_checks.Clement Courbet2019-05-0912-168/+243
| | | | | | And use a more compact name for the tested struct. llvm-svn: 360319
* Make sub-registers index names case sensitive in the MIRParserMarkus Lavin2019-05-091-1/+1
| | | | | | | | | | | | | | | | | | | Prior to this change sub-register index names are assumed to be lower case (but they are printed with original casing). This means that if a target has some upper case characters in its sub-register names then mir-export directly followed by mir-import is not possible. This also means that sub-register indices currently are (and will continue to be) slightly inconsistent with register names which are printed and assumed to be lower case. As the current textual representation of mir has a few inconsistencies in this area it is a bit arbitrary how to address the matter. This change is towards the direction that we feel is most correct (i.e. case sensitivity). Differential Revision: https://reviews.llvm.org/D61499 llvm-svn: 360318
OpenPOWER on IntegriCloud