summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
* [UpdateTestChecks][PowerPC] Avoid empty string when scrubbing loop commentsJinsong Ji2019-07-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: SCRUB_LOOP_COMMENT_RE was introduced in https://reviews.llvm.org/D31285 This works for some loops. However, we may generate lines with loop comments only. And since we don't scrub leading white spaces, this will leave an empty line there, and FileCheck will complain it. eg: llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll:27:15: error: found empty check string with prefix 'CHECK:' ; CHECK-NEXT: This prevented us from using the `update_llc_test_checks.py` for quite some cases. We should still keep the comment token there, so that we can safely scrub the loop comment without breaking FileCheck. Reviewers: timshen, hfinkel, lebedev.ri, RKSimon Subscribers: nemanjai, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63957 llvm-svn: 364775
* [benchmark] Disable CMake get_git_versionAndrew Ng2019-07-012-2/+7
| | | | | | | | | | | | | | | Disabled CMake get_git_version as it is meaningless for this in-tree build, and hardcoded a null version. Not using get_git_version avoids a refresh of the git index that is executed by get_git_version. Refreshing the index can take a considerable amount of time if the index needs to be refreshed (particularly with the mono repo). This situation can arise when building shared source on a host in VMs. Differential Revision: https://reviews.llvm.org/D63925 llvm-svn: 364742
* Clean up MSVC visualization of LLVM pointer typesMike Spertus2019-06-301-14/+5
| | | | | | | | | | | Create separate natvis ptr and int views for PointerIntPair. These are convenient in watch Windows and will be used by Clang visualizers to be checked in shortly Also, removed deref views as the MSVC na format has done the same thing natively since MSVC2013. llvm-svn: 364723
* [UpdateChecks] Add support for armv7-apple-darwinJinsong Ji2019-06-281-0/+9
| | | | | | | | | | | armv7-apple-darwin was not supported well, the script can't generate checks. https://reviews.llvm.org/D60601/new/#inline-568671 Differential Revision: https://reviews.llvm.org/D63939 llvm-svn: 364668
* [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.*Reid Kleckner2019-06-271-2/+2
| | | | | | | | | | | | | These lit configuration files are really Python source code. Using the .py file extension helps editors and tools use the correct language mode. LLVM and Clang already use this convention for lit configuration, this change simply applies it to all of compiler-rt. Reviewers: vitalybuka, dberris Differential Revision: https://reviews.llvm.org/D63658 llvm-svn: 364591
* [GN] Update build fileVitaly Buka2019-06-271-1/+0
| | | | llvm-svn: 364583
* [GN] Set exit code to 1 if changes are neededVitaly Buka2019-06-271-2/+12
| | | | llvm-svn: 364582
* gn build: Follow-up to r364491 "[GN] Update build files"Nico Weber2019-06-275-4/+19
| | | | | | | | | | | - Merge r364427 (GSYM lib) more: It was missing the new unit test (as pointed out by llvm/utils/gn/build/sync_source_lists_from_cmake.py), and it had some superfluous deps not present in the cmake build. - Merge r364474 (clang DependencyScanning lib) more: The deps didn't quite match cmake. llvm-svn: 364501
* [GN] Fix check-llvmVitaly Buka2019-06-271-0/+14
| | | | llvm-svn: 364493
* [GN] Update build filesVitaly Buka2019-06-277-0/+25
| | | | llvm-svn: 364491
* [UpdateTestChecks][NFC] Remove entries with same prefixJinsong Ji2019-06-261-2/+0
| | | | | | | | Matching is 'lossy', triples with same prefix can be dropped. Differential Revision: https://reviews.llvm.org/D63732 llvm-svn: 364471
* Revert "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into ↵Clement Courbet2019-06-262-1/+1
| | | | | | | | | | | | | | opt pipeline." Breaks sanitizers: libFuzzer :: cxxstring.test libFuzzer :: memcmp.test libFuzzer :: recommended-dictionary.test libFuzzer :: strcmp.test libFuzzer :: value-profile-mem.test libFuzzer :: value-profile-strcmp.test llvm-svn: 364416
* [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline.Clement Courbet2019-06-262-1/+1
| | | | | | | | | This allows later passes (in particular InstCombine) to optimize more cases. One that's important to us is `memcmp(p, q, constant) < 0` and memcmp(p, q, constant) > 0. llvm-svn: 364412
* gn build: Merge r364387Nico Weber2019-06-261-0/+1
| | | | llvm-svn: 364411
* gn build: Merge r364386Nico Weber2019-06-261-0/+1
| | | | llvm-svn: 364409
* gn build: Merge r364389Nico Weber2019-06-261-0/+1
| | | | llvm-svn: 364408
* gn build: Merge r364288.Peter Collingbourne2019-06-261-0/+1
| | | | llvm-svn: 364374
* Teach TableGen Intrin Emitter to handle LLVMPointerType<llvm_any_ty>Erich Keane2019-06-261-0/+3
| | | | | | | | | | r363233 rewrote a bunch of the Intrin Emitter code, however the new function to update the arg codes did not properly consider a pointer to an any. This patch adds that logic. Differential Revision: https://reviews.llvm.org/D63507 llvm-svn: 364364
* [PowerPC][UpdateTestChecks] powerpc- triple supportJinsong Ji2019-06-241-2/+1
| | | | | | | | | There are quite some old testcases with powerpc- triple, we should add this triple support so that we can update them with script. Differential Revision: https://reviews.llvm.org/D63723 llvm-svn: 364213
* [GN] Generation failure caused by trailing space in file namePetr Hosek2019-06-231-1/+1
| | | | | | | | | | | | | | | | | | When I executed gn.py gen out/gn I got the following error: ERROR at //compiler-rt/lib/builtins/BUILD.gn:162:7: Only source, header, and object files belong in the sources of a static_library. //compiler-rt/lib/builtins/emutls.c is not one of the valid types. "emutls.c ", ^---------- See //compiler-rt/lib/BUILD.gn:3:5: which caused the file to be included. "//compiler-rt/lib/builtins", ^--------------------------- It turns out to be that the latest gn doesn't accept ill-format file name. And the emutls.c above has a trailing space. Remove the trailing space should work. Patch By: myhsu Differential Revision: https://reviews.llvm.org/D63449 llvm-svn: 364162
* gn build: Merge r364046.Peter Collingbourne2019-06-221-0/+1
| | | | llvm-svn: 364116
* [GN] Fix check-clang by disabling pluginsVitaly Buka2019-06-211-1/+2
| | | | | | We can't link Analysis/plugins without -fPIC llvm-svn: 364016
* [GN] Put libcxx include into the same place as cmake to fix ↵Vitaly Buka2019-06-212-2/+2
| | | | | | Driver/print-file-name.c test llvm-svn: 364015
* [GN] Fix buildVitaly Buka2019-06-214-8/+3
| | | | llvm-svn: 364004
* gn build: Merge r363948Nico Weber2019-06-201-0/+1
| | | | llvm-svn: 363960
* [Util] Add a helper script for converting -print-before-all output into a ↵Philip Reames2019-06-191-0/+42
| | | | | | | | | | | | | | | | | | | | file based equivelent Simple little utility which takes a opt logfile generated with "opt -print-before-all -print-module-scope -o /dev/null <args> 2&>1", and splits into a series of individual "chunk-X.ll" files. The intended purpose is to help automate one step in failure reduction. The imagined workflow is: New crasher bug reported against clang or other frontend Frontend run with -emit-llvm equivalent and manually confirmed that opt -O2 <emit.ll> crashes Run this splitter script Manually map pass name to invocation command (next on the to automate list) Run bugpoint on last chunk file + manual command I chose to dump every chunk rather than only the last since miscompile debugging frequently requires either manual step by step reduction, or cross feeding IR into different compiler versions. Not an immediate target, but there may be applications. Differential Revision: https://reviews.llvm.org/D63461 llvm-svn: 363884
* gn build: Merge r363757.Peter Collingbourne2019-06-191-1/+1
| | | | llvm-svn: 363865
* gn build: Merge r363848.Peter Collingbourne2019-06-191-0/+1
| | | | llvm-svn: 363864
* gn build: Merge r363846.Peter Collingbourne2019-06-191-0/+1
| | | | llvm-svn: 363863
* gn build: Merge r363794.Peter Collingbourne2019-06-191-0/+1
| | | | llvm-svn: 363862
* gn build: Merge r363680.Peter Collingbourne2019-06-191-0/+1
| | | | llvm-svn: 363861
* gn build: Merge r363712.Peter Collingbourne2019-06-191-1/+2
| | | | llvm-svn: 363860
* Re-commit r363744: [tblgen][disasm] Allow multiple encodings to disassemble ↵Daniel Sanders2019-06-181-45/+95
| | | | | | | | | | | | | | to the same instruction It seems macOS lets you have ArrayRef<const X> even though this is apparently forbidden by the language standard (Thanks MSVC++ for the clear error message). Removed the problematic const's to fix this. (It also seems I'm not receiving buildbot emails anymore and I'm trying to find out why. In the mean time I'll be polling lab.llvm.org to hopefully see if/when failures occur) llvm-svn: 363753
* Revert [tblgen][disasm] Allow multiple encodings to disassemble to the same ↵Jordan Rupprecht2019-06-181-98/+48
| | | | | | | | | | instruction This reverts r363744 (git commit 9b2252123d1e79d2b3594097a9d9cc60072b83d9) This breaks many buildbots, e.g. http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/203/steps/build%20stage%201/logs/stdio llvm-svn: 363747
* [tblgen][disasm] Allow multiple encodings to disassemble to the same instructionDaniel Sanders2019-06-181-48/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add an AdditionalEncoding class which can be used to define additional encodings for a given instruction. This causes the disassembler to add an additional encoding to its matching tables that map to the specified instruction. Usage: def ADD1 : Instruction { bits<8> Reg; bits<32> Inst; let Size = 4; let Inst{0-7} = Reg; let Inst{8-14} = 0; let Inst{15} = 1; // Continuation bit let Inst{16-31} = 0; ... } def : AdditionalEncoding<ADD1> { bits<8> Reg; bits<16> Inst; // You can also have bits<32> and it will still be a 16-bit encoding let Size = 2; let Inst{0-3} = 0; let Inst{4-7} = Reg; let Inst{8-15} = 0; ... } with those definitions, llvm-mc will successfully disassemble both of these: 0x01 0x00 0x10 0x80 0x00 0x00 to: ADD1 r1 Depends on D52366 Reviewers: bogner, charukcs Reviewed By: bogner Subscribers: nlguillemot, nhaehnle, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D52369 llvm-svn: 363744
* Fix some lit test ResourceWarnings on WindowsAdrian McCarthy2019-06-181-0/+1
| | | | | | | | | | | | | | | | | | When running LLDB lit tests on Windows, the system selects a debug version of Python, which was issuing lots of ResourceWarnings about files that weren't closed. There are two kinds of them, and each test triggered one of each. This patch fixes one kind by ensuring TestRunner explicitly close the temporary files created for routing stderr. This is important on Windows but has no net effect on Posix systems. The remaining ResourceWarnings are more elusive; the bug may lie in the Python library subprocess.py, and it may be Windows-specific. Differential Revision: https://reviews.llvm.org/D63102 llvm-svn: 363700
* gn build: Merge r363658Nico Weber2019-06-181-0/+1
| | | | llvm-svn: 363673
* gn build: Merge r363649Nico Weber2019-06-181-1/+0
| | | | | | | This reverts commit "gn build: Merge r363626" because r363626 was reverted in r363649. llvm-svn: 363672
* [NFC] Improve triple match of scripts that update testsDiogo N. Sampaio2019-06-181-29/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The prior behavior of the triple matcher would stop in the first matched triple. It was not possible to create specific matches for sub-sets of a triple (e.g aarch64-apple-darwin would never be used after aarch64 was matched). This patch: 1) Allows that specialized triples take priority, considering that the string lenght of the triple indentifies how specialized a triple is. If two triples of same lenght match, the one matched first prevails, preserving the old behavior. 2) Remove 20 duplicated triples of arm, thumb, aarch64 options with same arguments, matching the common prefix (aarch64, arm, thumb) of them. 3) Creates three new function matching regexes and five triple options for arm64-apple-ios, (arm|thumb)-apple-ios and thumb(v5)?-macho Reviewers: lebedev.ri, RKSimon, MaskRay, gbedwell Reviewed By: MaskRay Subscribers: javed.absar, kristof.beyls, llvm-commits, carwil Tags: #llvm Differential Revision: https://reviews.llvm.org/D63145 llvm-svn: 363656
* gn build: Merge r363626.Peter Collingbourne2019-06-171-0/+1
| | | | llvm-svn: 363634
* gn build: Merge r363483.Peter Collingbourne2019-06-171-0/+2
| | | | llvm-svn: 363610
* gn build: Merge r363584.Peter Collingbourne2019-06-171-0/+1
| | | | llvm-svn: 363609
* gn build: Merge r363541Nico Weber2019-06-172-9/+7
| | | | llvm-svn: 363583
* gn build: Merge r363530Nico Weber2019-06-171-1/+1
| | | | llvm-svn: 363549
* gn build: Merge r363444Nico Weber2019-06-161-0/+1
| | | | llvm-svn: 363505
* UpdateTestChecks: Consider .section as end of function for AMDGPUMatt Arsenault2019-06-141-1/+1
| | | | | | | | Kernels seem to go directly to a section switch instead of emitting .Lfunc_end. This fixes including all of the kernel metadata in the check lines, which is undesirable most of the time. llvm-svn: 363452
* gn build: Add NVPTX targetNico Weber2019-06-149-4/+167
| | | | | | | | | | | | | | | | | | | The NVPTX target is a bit unusual in that it's the only target without a disassembler, and one of three targets without an asm parser (and the first one of those three in the gn build). NVPTX doesn't have those because it's not a binary format. The CMake build checks for the existence of {AsmParser,Disassembler}/CMakeLists.txt when setting LLVM_ENUM_ASM_PARSERS / LLVM_ENUM_DISASSEBLERS (http://llvm-cs.pcc.me.uk/CMakeLists.txt#744). The GN build doesn't want to hit the disk for things like this, so instead I'm adding explicit `targets_with_asm_parsers` and `targets_with_disassemblers` lists. Since both are needed rarely, they are defined in their own gni files. Differential Revision: https://reviews.llvm.org/D63210 llvm-svn: 363437
* gn build: Simplify Target build filesNico Weber2019-06-1421-159/+73
| | | | | | | | | | | | | | | | Now that the cycle between MCTargetDesc and TargetInfo is gone (see revisions 360709 360718 360722 360724 360726 360731 360733 360735 360736), remove the dependency from TargetInfo on MCTargetDesc:tablegen. In most targets, this makes MCTargetDesc:tablegen have just a single use, so inline it there. For AArch64, ARM, and RISCV there's still a similar cycle between MCTargetDesc and Utils, so the MCTargetDesc:tablegen indirection is still needed there. Differential Revision: https://reviews.llvm.org/D63200 llvm-svn: 363436
* [lit] Fix UnicodeEncodeError when test commands contain non-ASCII charsMichal Gorny2019-06-143-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that the bash script written by lit TestRunner is open with UTF-8 encoding when using Python 3. Otherwise, attempt to write non-ASCII characters causes UnicodeEncodeError. This happened e.g. with the following LLD test: UNRESOLVED: lld :: ELF/format-binary-non-ascii.s (657 of 2119) ******************** TEST 'lld :: ELF/format-binary-non-ascii.s' FAILED ******************** Exception during script execution: Traceback (most recent call last): File "/home/mgorny/llvm-project/llvm/utils/lit/lit/worker.py", line 63, in _execute_test result = test.config.test_format.execute(test, lit_config) File "/home/mgorny/llvm-project/llvm/utils/lit/lit/formats/shtest.py", line 25, in execute self.execute_external) File "/home/mgorny/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 1644, in executeShTest res = _runShTest(test, litConfig, useExternalSh, script, tmpBase) File "/home/mgorny/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 1590, in _runShTest res = executeScript(test, litConfig, tmpBase, script, execdir) File "/home/mgorny/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 1157, in executeScript f.write('{ ' + '; } &&\n{ '.join(commands) + '; }') UnicodeEncodeError: 'ascii' codec can't encode character '\xa3' in position 274: ordinal not in range(128) Differential Revision: https://reviews.llvm.org/D63254 llvm-svn: 363388
* Revert r363298 "[lit] Disable test on darwin when building shared libs."Nico Weber2019-06-141-2/+0
| | | | | | It broke running check-lld on mac, see https://reviews.llvm.org/D61697 llvm-svn: 363379
OpenPOWER on IntegriCloud