summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [JITLink] Fix some copy/paste related typos in a test case.Lang Hames2019-05-071-20/+21
| | | | | | | Several X86_64_RELOC_SUBTRACTOR tests for subtrahend handling were incorrectly labeled as tests for kinds of minuend handling. llvm-svn: 360160
* [SCEV] Add explicit representations of umin/sminKeno Fischer2019-05-0725-519/+597
| | | | | | | | | | | | | | | | | | Summary: Currently we express umin as `~umax(~x, ~y)`. However, this becomes a problem for operands in non-integral pointer spaces, because `~x` is not something we can compute for `x` non-integral. However, since comparisons are generally still allowed, we are actually able to express `umin(x, y)` directly as long as we don't try to express is as a umax. Support this by adding an explicit umin/smin representation to SCEV. We do this by factoring the existing getUMax/getSMax functions into a new function that does all four. The previous two functions were largely identical. Reviewed By: sanjoy Differential Revision: https://reviews.llvm.org/D50167 llvm-svn: 360159
* RegisterContextLLDB: Push CFA value on DWARF stack when evaluating register ↵Pavel Labath2019-05-073-1/+74
| | | | | | | | | | | | | | | | | | | | | | | | | expressions Summary: This behavior is specified in the Section 6.4.2.3 (Register Rule instructions) of the DWARF4 spec. We were not doing that, which meant that any register rule which was relying on the cfa value being there was not evaluated correctly (it was aborted due to "out of bounds" access). I'm not sure how come this wasn't noticed before, but I guess this has something to do with the fact that dwarf unwind expressions are not used very often, and when they are, the situation is so complicated that the CFA is of no use. I noticed this when I started emitting dwarf expressions for the unwind information present in breakpad symbol files. Reviewers: jasonmolenda, clayborg Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D61018 llvm-svn: 360158
* Fix local shadow variable warning. NFCI.Simon Pilgrim2019-05-071-2/+2
| | | | llvm-svn: 360157
* [ASTImporter] Corrected type of integer constant in a test.Balazs Keri2019-05-071-2/+2
| | | | llvm-svn: 360156
* Add an explicit triple to this test to hopefully appease the build bots.Aaron Ballman2019-05-071-1/+1
| | | | llvm-svn: 360155
* [lldb] [lit] Update constants in write Register testsMichal Gorny2019-05-078-256/+256
| | | | | | Update the constants used for XMM/YMM/ZMM registers to match read tests. llvm-svn: 360154
* [Tooling] Add -x flags when inferring compile commands for files with ↵Sam McCall2019-05-072-6/+12
| | | | | | | | | | | | | | | | no/invalid extension. Summary: We treat them as headers, as the motivating case is C++ standard library. Reviewers: kadircet Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61633 llvm-svn: 360153
* [OpenCL] Prevent mangling kernel functions.Anastasia Stulova2019-05-076-19/+56
| | | | | | | | | | | | Kernel function names have to be preserved as in the original source to be able to access them from the host API side. This commit also adds restriction to kernels that prevents them from being used in overloading, templates, etc. Differential Revision: https://reviews.llvm.org/D60454 llvm-svn: 360152
* [clangd] Introduce intermediate representation of formatted textIlya Biryukov2019-05-075-0/+388
| | | | | | | | | | | | | | | | Summary: That can render to markdown or plain text. Used for findHover requests. Reviewers: malaperle, sammccall, kadircet Reviewed By: sammccall Subscribers: mgorny, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58547 llvm-svn: 360151
* lld-link: Allow /? as option prefix, like -? is allowedNico Weber2019-05-071-9/+12
| | | | | | | | | | link.exe seems to allow `/?foo` and `-?foo` in addition to `/foo` and `-foo`. Since lld-link already supports the `-?foo` spelling, support `/?foo` as well. Differential Revision: https://reviews.llvm.org/D61375 llvm-svn: 360150
* Precommit tests for or/add transform. NFC.Robert Lougher2019-05-072-0/+130
| | | | llvm-svn: 360149
* [lldb] [lit] Fix Register tests to reference arrays via %0 and %1Michal Gorny2019-05-078-189/+180
| | | | | | | | Fix Register tests to reference memory access to arrays via %0 and %1, rather than via referencing %rax and %rbx directly. This fixes test build failures on 32-bit x86. llvm-svn: 360148
* Allow field offset lookups in types with incomplete arrays within libclang.Aaron Ballman2019-05-072-2/+41
| | | | | | Patch thanks to Jorn Vernee llvm-svn: 360147
* [lldb] Add MacroQualified switch cases for r360109Krasimir Georgiev2019-05-071-0/+6
| | | | | | | | | | | | | | | | | | Summary: r360109 added a new enum case, causing lldb build to fail with several errors like: lldb/source/Symbol/ClangASTContext.cpp:4342:11: error: enumeration value 'MacroQualified' not handled in switch [-Werror,-Wswitch] switch (qual_type->getTypeClass()) { ^ This adds the missing switch cases. I'm not an lldb maintainer and just used my best judgement that it's probably expected that we break in these cases. Feel free to ping / revert / fix this change if this behavior is not appropriate. Reviewers: gribozavr Reviewed By: gribozavr Differential Revision: https://reviews.llvm.org/D61640 llvm-svn: 360146
* Add typo correction for command-line flags to ELF and COFF lld driversNico Weber2019-05-078-11/+34
| | | | | | | | | | | | For lld-link, unknown '/'-style flags are treated as filenames on POSIX systems, so only '-'-style flags get typo correction for now. This matches clang-cl. PR37006. Differential Revision: https://reviews.llvm.org/D61443 llvm-svn: 360145
* [PowerPC] Use the two-constant NR algorithm for refining estimatesNemanja Ivanovic2019-05-078-49/+53
| | | | | | | | | | | | The single-constant algorithm produces infinities on a lot of denormal values. The precision of the two-constant algorithm is actually sufficient across the range of denormals. We will switch to that algorithm for now to avoid the infinities on denormals. In the future, we will re-evaluate the algorithm to find the optimal one for PowerPC. Differential revision: https://reviews.llvm.org/D60037 llvm-svn: 360144
* [llvm-objdump] - Print relocation record in a GNU format.George Rimar2019-05-0716-46/+99
| | | | | | | | | | | | | | | This fixes the https://bugs.llvm.org/show_bug.cgi?id=41355. Previously with -r we printed relocation section name instead of the target section name. It was like this: "RELOCATION RECORDS FOR [.rel.text]" Now it is: "RELOCATION RECORDS FOR [.text]" Also when relocation target section has more than one relocation section, we did not combine the output. Now we do. Differential revision: https://reviews.llvm.org/D61312 llvm-svn: 360143
* minor cmake formatting style fixNico Weber2019-05-071-1/+3
| | | | llvm-svn: 360142
* gn build: Merge r360116Nico Weber2019-05-072-0/+2
| | | | llvm-svn: 360141
* gn build: Run `git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format`Nico Weber2019-05-073-12/+13
| | | | llvm-svn: 360140
* [LLD][ELF] - Remove symbol-name-offset.elf binary from test cases.George Rimar2019-05-073-7/+15
| | | | | | | It was possible to convert the test case to YAML test. After that, we have only one binary test left in LLD/ELF. llvm-svn: 360139
* [llvm-exegesis] BenchmarkRunner::runConfiguration(): write small snippet to ↵Roman Lebedev2019-05-071-7/+6
| | | | | | | | | | | | | memory It was previously writing this temporary snippet to file, then reading it back, but leaving the tmp file in place. This is both unefficient, and results in huge garbage pileup in /tmp. One would have thought it would have been caught during D60317.. llvm-svn: 360138
* [yaml2obj] - Allow setting st_value explicitly for Symbol.George Rimar2019-05-074-50/+96
| | | | | | | | | | In some cases it is useful to explicitly set symbol's st_name value. For example, I am using it in a patch for LLD to remove the broken binary from a test case and replace it with a YAML test. Differential revision: https://reviews.llvm.org/D61180 llvm-svn: 360137
* Revert "[TableGen] Fix a typo"Krasimir Georgiev2019-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This reverts commit r360106. The revisioin causes llvm-tblgen to hang while generating info for RISCV.td. The root cause might be in the RISCV.td definition but I don't know enough about this to investigate further. Command that starts hangning after r360106: `llvm-build/bin/llvm-tblgen -I llvm/include -I llvm/tools/clang/include -I llvm/lib/Target/RISCV -gen-instr-info llvm/lib/Target/RISCV/RISCV.td` Reviewers: sammccall, yan_luo, craig.topper, gribozavr Reviewed By: gribozavr Subscribers: PkmX, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61632 llvm-svn: 360136
* [ARM GlobalISel] Widen G_SELECT operandsDiana Picus2019-05-072-2/+74
| | | | | | ...except for the condition operand. llvm-svn: 360135
* [X86][AVX] Fold concat(packus(),packus()) -> packus(concat(),concat()) (PR34773)Simon Pilgrim2019-05-078-92/+106
| | | | | | Basic "revectorization" combine, we can probably do more opcodes here but it can be a tricky cost-benefit depending on where the subvectors came from - but this case helps shuffle combining. llvm-svn: 360134
* Fixed "Value stored to 'Opc' is never read" warning. NFCI.Simon Pilgrim2019-05-071-1/+1
| | | | llvm-svn: 360133
* [ASTImporter] Import TemplateParameterLists in function templates.Balazs Keri2019-05-072-0/+39
| | | | | | | | | | | | | | | | Summary: Correct missing import of TemplateParameterList in function decl. Reviewers: martong, a.sidorin, shafik Reviewed By: martong Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60461 llvm-svn: 360132
* [X86] Reduce scope of variables where possible. NFCI.Simon Pilgrim2019-05-073-10/+4
| | | | | | Fixes cppcheck warnings. llvm-svn: 360131
* [ARM GlobalISel] Widen G_INTTOPTR/G_PTRTOINTDiana Picus2019-05-072-2/+66
| | | | | | | We actually have a couple of G_PTRTOINT to s8 when building clang, so we should do something about them. llvm-svn: 360130
* [ELF] Reorder BitcodeFiles.empty() to call thinLTOCreateEmptyIndexFiles() in ↵Fangrui Song2019-05-073-15/+8
| | | | | | | | | | | | | | | | | only one place It makes the --plugin-opt=obj-path= and --plugin-opt=thinlto-index-only= behavior more consistent - the files will be created in the BitcodeFiles.empty() case, but I assume whether it behaves this way is not required by anyone. LTOObj->run() cannot run with empty BitcodeFiles. There would be an error: ld.lld: error: No available targets are compatible with triple "" Differential Revision: https://reviews.llvm.org/D61635 llvm-svn: 360129
* Fix uninitialized variable warning. NFCI.Simon Pilgrim2019-05-071-1/+1
| | | | | | This also fixes a scan-build "array subscript is undefined" warning. llvm-svn: 360128
* [ARM GlobalISel] Widen G_GEP index operandDiana Picus2019-05-072-4/+34
| | | | llvm-svn: 360127
* [libFuzzer] Increase timeouts on fork tests and skip one on aarch64Peter Smith2019-05-073-8/+8
| | | | | | | | | | | | | The tests fork.text, fork.sigusr.test and fork-ubsan.test intermittently fail on the aarch64 buildbots. Input gathered from the fork.sigusr.test implies that when the builder is under load the timeout value is not sufficient. The fork-ubsan.test doesn't have a timeout and I think is not always finding the error after 10000 runs so I've marked it as unsupported for now. Differential Revision: https://reviews.llvm.org/D61449 llvm-svn: 360126
* Test commit accessOrlando Cazalet-Hyams2019-05-071-2/+2
| | | | llvm-svn: 360125
* [llvm-exegesis] InstructionBenchmark::writeYamlTo(): don't forget to flush()Roman Lebedev2019-05-071-0/+2
| | | | | | | | | | | | This *APPEARS* to fix a *very* infuriating issue of Yaml's being corrupted, partially written, truncated. Or at least i'm not seeing the issue on a new benchmark sweep. The issue is somewhat rare, happens maybe once in 1000 benchmarks. Which means there are up to hundreds of broken benchmarks for a full x86 sweep in a single mode. llvm-svn: 360124
* AMDGPU: Verify that SOP2/SOPC instructions have at most one immediate operandNicolai Haehnle2019-05-072-0/+39
| | | | | | | | | | | | | | | | | | Summary: No test case because I don't know of a way to trigger this, but I accidentally caused this to fail while working on a different change. Change-Id: I8015aa447fe27163cc4e4902205a203bd44bf7e3 Reviewers: arsenm, rampitec Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61490 llvm-svn: 360123
* [Tooling] Don't mmap the JSONCompilationDatabase, it's not correct for ↵Sam McCall2019-05-071-1/+4
| | | | | | | | | | | | | | long-lived processes. Reviewers: ilya-biryukov Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61631 llvm-svn: 360122
* [clangd] Oops, switchSourceHeader still needs to return a URI.Sam McCall2019-05-072-3/+3
| | | | | | | | | | | | Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61630 llvm-svn: 360121
* [Sema] Add missing VisitMacroQualifiedTypeLoc to TypeSpecLocFillerLeonard Chan2019-05-071-0/+5
| | | | | | To hopefully fix greenbot failures llvm-svn: 360120
* [clangd] switchSourceHeader uses null not empty string as sentinel.Sam McCall2019-05-072-5/+8
| | | | | | As far as I can see, only theia actually implements this, and it expects null. llvm-svn: 360119
* [clangd] Add test that r360116 accidentally fixed a duplicate-edits bug in ↵Sam McCall2019-05-072-20/+67
| | | | | | rename. NFC llvm-svn: 360118
* Improve function / variable disambiguation.Richard Smith2019-05-075-33/+46
| | | | | | | | Keep looking for decl-specifiers after an unknown identifier. Don't issue diagnostics about an error type specifier conflicting with later type specifiers. llvm-svn: 360117
* [clangd] Move Rename into its own file, and add unit test. NFCSam McCall2019-05-078-79/+164
| | | | | | | | | | | | Reviewers: kadircet Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61596 llvm-svn: 360116
* [clangd] add CLANG_ENABLE_CLANGD option to build clangd. Require threads.Sam McCall2019-05-071-1/+8
| | | | | | | | | | | | Reviewers: gribozavr Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61518 llvm-svn: 360115
* [clang-tidy] Extend bugprone-sizeof-expression to check sizeof(pointers to ↵Adam Balogh2019-05-072-2/+21
| | | | | | | | | | | | structures) Accidentally taking the size of a struct-pointer type or a value of this type is more common than explicitly using the & operator for the value. This patch extends the check to include these cases. Differential Revision: https://reviews.llvm.org/D61260 llvm-svn: 360114
* [PPC64] toc-indirect to toc-relative relaxationFangrui Song2019-05-0715-147/+403
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is based on D54720 by Sean Fertile. When accessing a global symbol which is not defined in the translation unit, compilers will generate instructions that load the address from the toc entry. If the symbol is defined, non-preemptable, and addressable with a 32-bit signed offset from the toc pointer, the address can be computed directly. e.g. addis 3, 2, .LC0@toc@ha # R_PPC64_TOC16_HA ld 3, .LC0@toc@l(3) # R_PPC64_TOC16_LO_DS, load the address from a .toc entry ld/lwa 3, 0(3) # load the value from the address .section .toc,"aw",@progbits .LC0: .tc var[TC],var can be relaxed to addis 3,2,var@toc@ha # this may be relaxed to a nop, addi 3,3,var@toc@l # then this becomes addi 3,2,var@toc ld/lwa 3, 0(3) # load the value from the address We can delete the test ppc64-got-indirect.s as its purpose is covered by newly added ppc64-toc-relax.s and ppc64-toc-relax-constants.s Reviewed By: ruiu, sfertile Differential Revision: https://reviews.llvm.org/D60958 llvm-svn: 360112
* [FastISel][X86] If selectFNeg fails, fall back to SelectionDAG not treating ↵Craig Topper2019-05-073-11/+12
| | | | | | | | | | | | | | | | | | | | | it as an fsub. Summary: If fneg lowering for fsub -0.0, x fails we currently fall back to treating it as an fsub. This has different behavior for nans than the xor with sign bit trick we normally try to do. On X86, the xor trick for double fails fast-isel in 32-bit mode with sse2 due to 64 bit integer types not being available. With -O2 we would always use an xorpd for this case. If we use subsd, this creates an observable behavior difference between -O0 and -O2. So fall back to SelectionDAG if we can't fast-isel it, that way SelectionDAG will use the xorpd. I believe this patch is restoring the behavior prior to r345295 from last October. This was missed then because our fast isel case in 32-bit mode aborted fast-isel earlier for another reason. But I've added new tests to cover that. Reviewers: andrew.w.kaylor, cameron.mcinally, spatel, efriedma Reviewed By: cameron.mcinally Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61622 llvm-svn: 360111
* [WebAssembly] Add more test coverage for reloctions against section symbolsSam Clegg2019-05-073-6/+53
| | | | | | | | | | | | | The only known user of this relocation type and symbol type is the debug info sections, but we were not testing the `--relocatable` output path. This change adds a minimal test case to cover relocations against section symbols includes `--relocatable` output. Differential Revision: https://reviews.llvm.org/D61623 llvm-svn: 360110
OpenPOWER on IntegriCloud