summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* IR: print value numbers for unnamed function argumentsTim Northover2019-08-031-0/+82
| | | | | | | | | | For consistency with normal instructions and clarity when reading IR, it's best to print the %0, %1, ... names of function arguments in definitions. Also modifies the parser to accept IR in that form for obvious reasons. llvm-svn: 367755
* [lit] Print internal env commandsJoel E. Denny2019-08-032-9/+30
| | | | | | | | | | | | Without this patch, the internal `env` command removes `env` and its args from the command line while parsing it. This patch modifies a copy instead so that the original command line is printed. Reviewed By: stella.stamenova, rnk Differential Revision: https://reviews.llvm.org/D65624 llvm-svn: 367752
* [lit] Actually run tests for internal env commandJoel E. Denny2019-08-032-1/+1
| | | | | | | | | | | Put the main test script in the right directory, and fix a python bug in a local script. Reviewed By: stella.stamenova Differential Revision: https://reviews.llvm.org/D65623 llvm-svn: 367751
* [GlobalISel] Check LLT size matches memory size for non-truncating stores.Amara Emerson2019-08-021-5/+13
| | | | | | | | This was causing a bug where non-truncating stores would be selected instead of truncating ones. Differential Revision: https://reviews.llvm.org/D64845 llvm-svn: 367737
* [lit] Fix 42812: lit test suite can no longer be run stand-aloneStella Stamenova2019-08-021-1/+12
| | | | | | | | | | | | | | | | | | | Summary: This change updates the lit.cfg file to use llvm_config when it is available, but when it is not, it directly modifies the config object. This makes it possible to run the lit tests standalone without having built llvm (as long as the correct binaries are present in the path such as FileCheck and not). Because the lit tests don't take a hard dependency on llvm_config, some features such as system-windows have to have definitions in lit's cfg file as well. This is a potential issue as the os features sometimes change names (for example, we went from windows to system-windows, etc.). This can cause drift between lit's tests and the rest of the llvm tests. Reviewers: probinson, mgorny Reviewed By: mgorny Subscribers: delcypher, llvm-commits, asmith Tags: #llvm Differential Revision: https://reviews.llvm.org/D65674 llvm-svn: 367730
* Fix git-llvm to not delete non-empty directories.James Y Knight2019-08-021-15/+42
| | | | | | | | | | | | | | | | | | | | | | | | Previously, if a directory contained only other sub-directories, one of which was being removed, git llvm would delete the parent and all its subdirs, even though only one should've been deleted. This error occurred in r366590, where the commit attempted to remove lldb/packages/Python/lldbsuite/test/tools/lldb-mi, but git-llvm erroneously removed the entire contents of lldb/packages/Python/lldbsuite/test/tools. This happened because "git apply" automatically removes empty directories locally, and the absence of a local directory was previously taken as an indication to call 'svn rm' on that directory. However, an empty local directory does not necessarily indicate that the directory is truly empty. Fix that by removing directories only when they're empty on the git side. Differential Revision: https://reviews.llvm.org/D65416 llvm-svn: 367693
* gn build: Merge r367667.Peter Collingbourne2019-08-021-0/+1
| | | | llvm-svn: 367692
* Revert r367649: Improve raw_ostream so that you can "write" colors using ↵Rui Ueyama2019-08-021-2/+3
| | | | | | | | operator<< This reverts commit r367649 in an attempt to unbreak Windows bots. llvm-svn: 367658
* Improve raw_ostream so that you can "write" colors using operator<<Rui Ueyama2019-08-021-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. raw_ostream supports ANSI colors so that you can write messages to the termina with colors. Previously, in order to change and reset color, you had to call `changeColor` and `resetColor` functions, respectively. So, if you print out "error: " in red, for example, you had to do something like this: OS.changeColor(raw_ostream::RED); OS << "error: "; OS.resetColor(); With this patch, you can write the same code as follows: OS << raw_ostream::RED << "error: " << raw_ostream::RESET; 2. Add a boolean flag to raw_ostream so that you can disable colored output. If you disable colors, changeColor, operator<<(Color), resetColor and other color-related functions have no effect. Most LLVM tools automatically prints out messages using colors, and you can disable it by passing a flag such as `--disable-colors`. This new flag makes it easy to write code that works that way. Differential Revision: https://reviews.llvm.org/D65564 llvm-svn: 367649
* Revert r366980: "[lit] Protect full test suite from FILECHECK_OPTS"Joel E. Denny2019-08-012-10/+3
| | | | | | Windows bots are broken. See recent D65335 and D65156 comments. llvm-svn: 367627
* Revert r367123: "[llvm] [lit/tests] Replace 'env -u' with more portable ↵Joel E. Denny2019-08-011-1/+1
| | | | | | | | | construct" Must be reverted in order to revert r366980, which breaks windows bots. See recent D65335 and D65156 comments. llvm-svn: 367626
* gn build: Merge r367463Nico Weber2019-07-311-64/+81
| | | | llvm-svn: 367464
* compiler-rt: Rename .cc file in lib/profile to .cppNico Weber2019-07-311-1/+1
| | | | | | | | See https://reviews.llvm.org/D58620 for discussion. Note how the comment in the file already said ".cpp" :) llvm-svn: 367460
* gn build: Merge r367456Nico Weber2019-07-311-4/+4
| | | | llvm-svn: 367457
* gn build: Merge r367452 and add standalone sourcesNico Weber2019-07-311-10/+23
| | | | llvm-svn: 367454
* gn build: Add build files for compiler-rt/lib/profileNico Weber2019-07-313-1/+68
| | | | | | Differential Revision: https://reviews.llvm.org/D65518 llvm-svn: 367450
* gn build: Make builtin library build on macOSNico Weber2019-07-315-2/+15
| | | | | | | | For now, it only builds the x86_64 slice. Differential Revision: https://reviews.llvm.org/D65513 llvm-svn: 367449
* gn build: Fix redundant object files in builtin lib.Nico Weber2019-07-311-53/+73
| | | | | | | | | | | | | | | | | | | | | | compiler-rt's builtin library has generic implementations of many functions, and then per-arch optimized implementations of some. In the CMake build, both filter_builtin_sources() and an explicit loop at the end of the build file (see D37166) filter out the generic versions if a per-arch file is present. The GN build wasn't doing this filtering. Just do the filtering manually and explicitly, instead of being clever. While here, also remove files from the mingw/arm build that are redundantly listed after D39938 / r318139 (both from the CMake and the GN build). While here, also fix a target_os -> target_cpu typo. Differential Revision: https://reviews.llvm.org/D65512 llvm-svn: 367448
* gn build: Merge r367393Nico Weber2019-07-311-0/+1
| | | | llvm-svn: 367422
* TableGen: Add MinAlignment predicateMatt Arsenault2019-07-313-2/+65
| | | | | | | | | | AMDGPU uses some custom code predicates for testing alignments. I'm still having trouble comprehending the behavior of predicate bits in the PatFrag hierarchy. Any attempt to abstract these properties unexpectdly fails to apply them. llvm-svn: 367373
* gn build: Merge r367364Nico Weber2019-07-302-0/+4
| | | | llvm-svn: 367366
* [benchmark] Fix win32 link on case-sensitive fsRoman Lebedev2019-07-302-1/+3
| | | | | | | | | | | | | | Summary: This fixes cross-builds with MinGW from case-sensitive file-systems (on Linux) This is a cherry-pick from https://github.com/google/benchmark/pull/840 https://github.com/google/benchmark/commit/8e48105d465c586068dd8e248fe75a8971c6ba3a Original patch by: @jschueller (Julien Schueller) ! Differential Revision: https://reviews.llvm.org/D61371 llvm-svn: 367356
* gn build: Update comment I failed to update in r367340 / D65462Nico Weber2019-07-301-2/+0
| | | | llvm-svn: 367341
* gn build: Fix check-clang-tools after r362702.Nico Weber2019-07-303-1/+37
| | | | | | | | | r362702 added a test that requires clang-tidy to be linked into libclang, so add that to the gn build. Differential Revision: https://reviews.llvm.org/D65462 llvm-svn: 367340
* AMDGPU: Avoid emitting "true" predicatesMatt Arsenault2019-07-304-4/+15
| | | | | | | | | | Empty condition strings are considerde always true. This removes a lot of clutter from the generated matcher tables. This shrinks the source size of AMDGPUGenDAGISel.inc from 7.3M to 6.1M. llvm-svn: 367326
* Ask confirmation when `git llvm push` will push multiple commitsMehdi Amini2019-07-301-0/+26
| | | | | | | | This can reduce unexpectedly pushing more than expected by the user. Differential Revision: https://reviews.llvm.org/D64893 llvm-svn: 367321
* Fix `git llvm` script when no arguments are supplied on Python 3Mehdi Amini2019-07-301-0/+9
| | | | | | | | | | Instead of displaying a help message, it was issuing an error message: AttributeError: 'Namespace' object has no attribute 'func' https://bugs.python.org/issue16308 has more information on the bug. llvm-svn: 367320
* gn build: Use rebase_path on filename args to libcxx/utils/gen_link_script.pyHans Wennborg2019-07-301-2/+2
| | | | | | | | | | | | | | | | | | | $ ninja -j800 [1/5] ACTION //libcxx/src:cxx_linker_script(//llvm/utils/gn/build/toolchain:stage2_unix) FAILED: lib/libc++.so python ../libcxx/utils/gen_link_script.py --input //build.gn/lib/libc++.so.0 --output //build.gn/lib/libc++.so c++abi unwind GENERATING SCRIPT: 'INPUT(libc++.so.0 -lc++abi -lunwind)' as file //build.gn/lib/libc++.so Traceback (most recent call last): File "../libcxx/utils/gen_link_script.py", line 57, in <module> sys.exit(main()) File "../libcxx/utils/gen_link_script.py", line 50, in main with open(args.output, 'w') as f: IOError: [Errno 2] No such file or directory: '//build.gn/lib/libc++.so' ninja: build stopped: subcommand failed. Differential revision: https://reviews.llvm.org/D65449 llvm-svn: 367314
* [clang-tidy]: Google: new check 'google-upgrade-googletest-case'Eric Fiselier2019-07-291-0/+1
| | | | | | | | | | | Introduce a new check to upgrade user code based on API changes in Googletest. The check finds uses of old Googletest APIs with "case" in their name and replaces them with the new APIs named with "suite". Patch by Alex Strelnikov (strel@google.com) Reviewed as D62977. llvm-svn: 367263
* git-llvm: Restore compatibility with git 1.8.3.James Y Knight2019-07-291-1/+1
| | | | llvm-svn: 367259
* gn build: Merge r367071Vitaly Buka2019-07-292-0/+18
| | | | | | > llvm-svn: 366289 llvm-svn: 367245
* [UpdateTestChecks] Emit warning when invalid value for -check-prefix(es) optionDavid Bolvansky2019-07-297-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The script is silent for the following issue: FileCheck %s -check-prefix=CHECK,POPCOUNT FileCheck will catch it later, but I think we can warn here too. Now it warns: ./update_llc_test_checks.py file.ll WARNING: Supplied prefix 'CHECK,POPCOUNT' is invalid. Prefix must contain only alphanumeric characters, hyphens and underscores. Did you mean --check-prefixes=CHECK,POPCOUNT? Reviewers: lebedev.ri, spatel, RKSimon, craig.topper, nikic, gbedwell Reviewed By: RKSimon Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64589 llvm-svn: 367244
* [llvm] [lit/tests] Replace 'env -u' with more portable constructMichal Gorny2019-07-261-1/+1
| | | | | | | | | | | Set environment variables to empty values rather than attempting to unset them via 'env -u', in order to fix NetBSD test regression caused by r366980. POSIX does not guarantee that env(1) supports '-u' option, and indeed NetBSD env(1) does not support it. Differential Revision: https://reviews.llvm.org/D65335 llvm-svn: 367123
* [llvm] [FileCheck] Use FILECHECK_DUMP_INPUT_ON_FAILURE only when non-emptyMichal Gorny2019-07-261-1/+2
| | | | | | | | | | | Enable dumping output only if FILECHECK_DUMP_INPUT_ON_FAILURE is set to a non-empty value. This is necessary to support disabling it via POSIX-compliant env(1) that does not support '-u' argument, and therefore fix regression caused by r366980. Differential Revision: https://reviews.llvm.org/D65334 llvm-svn: 367122
* gn build: Merge r367043Nico Weber2019-07-261-0/+1
| | | | llvm-svn: 367109
* gn build: Merge r366956Nico Weber2019-07-262-0/+2
| | | | llvm-svn: 367108
* [lit] Protect full test suite from FILECHECK_OPTSJoel E. Denny2019-07-252-3/+10
| | | | | | | | | | | | | | | | | | | | | lit's test suite calls lit multiple times for various sample test suites. `FILECHECK_OPTS` is safe for FileCheck calls in lit's test suite. It's not safe for FileCheck calls in the sample test suites, whose output affects the results of lit's test suite. Without this patch, only one such sample test suite is protected from `FILECHECK_OPTS`, and I admit I haven't discovered other cases for which I can produce false failures using `FILECHECK_OPTS`. However, it's hard to predict the future, especially false passes. Thus, this patch protects all existing and future sample test suites from `FILECHECK_OPTS` (and the deprecated `FILECHECK_DUMP_INPUT_ON_FAILURE`). Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D65156 llvm-svn: 366980
* github-upload-release.py: Fix script name in examplesTom Stellard2019-07-251-4/+4
| | | | llvm-svn: 366978
* Add github-release.py scriptTom Stellard2019-07-251-0/+77
| | | | | | | | | | | | | | | | | | Summary: This script can be used for uploading relases sources and binaries to github. Reviewers: hans Reviewed By: hans Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64841 llvm-svn: 366977
* gn build: Merge r366919Nico Weber2019-07-241-0/+1
| | | | llvm-svn: 366927
* [AIX][lit] Don't depend on psutil on AIXDavid Tenty2019-07-245-37/+71
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: On AIX psutil can run into problems with permissions to read the process tree, which causes problems for python timeout tests which need to kill off a test and it's children. This patch adds a workaround by invoking shell via subprocess and using a platform specific option to ps to list all the descendant processes so we can kill them. We add some checks so lit can tell whether timeout tests are supported with out exposing whether we are utilizing the psutil implementation or the alternative. Reviewers: hubert.reinterpretcast, andusy, davide, delcypher Reviewed By: delcypher Subscribers: davide, delcypher, christof, lldb-commits, libcxx-commits, llvm-commits Tags: #lldb, #libc, #llvm Differential Revision: https://reviews.llvm.org/D64251 llvm-svn: 366912
* [RISCV] Implement benchmark::cycleclock::NowRoger Ferrer Ibanez2019-07-242-0/+17
| | | | | | | | | This is a cherrypick of D64237 onto llvm/utils/benchmark and libcxx/utils/google-benchmark. Differential Revision: https://reviews.llvm.org/D65142 llvm-svn: 366868
* gn build: Merge r366832Nico Weber2019-07-231-0/+1
| | | | llvm-svn: 366837
* gn build: Wrap two comments to 80 columnsNico Weber2019-07-221-2/+3
| | | | llvm-svn: 366763
* TableGen: Support physical register inputs > 255Matt Arsenault2019-07-223-11/+27
| | | | | | | This was truncating register value that didn't fit in unsigned char. Switch AMDGPU sendmsg intrinsics to using a tablegen pattern. llvm-svn: 366695
* Add location of SVN staging dir to git-llvm error outputStefan Granitz2019-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In pre-monorepo times the svn staging directory was `.git/svn`. The below error message wasn't mentioning the new name yet. Example before: ``` Can't push git rev 104cfa289d9 because svn status is not empty: ! llvm/trunk/include/llvm ``` Example after: ``` Can't push git rev 104cfa289d9 because status in svn staging dir (.git/llvm-upstream-svn) is not empty: ! llvm/trunk/include/llvm ``` Reviewers: mehdi_amini, jlebar, teemperor Reviewed By: mehdi_amini Subscribers: llvm-commits, #llvm Tags: #llvm Differential Revision: https://reviews.llvm.org/D65038 llvm-svn: 366671
* [utils] Clean up UpdateTestChecks/common.pyFangrui Song2019-07-221-6/+6
| | | | llvm-svn: 366664
* gn build: Merge r366622Nico Weber2019-07-211-1/+1
| | | | llvm-svn: 366646
* [AMDGPU] Allow register tuples to set asm namesStanislav Mekhanoshin2019-07-191-3/+12
| | | | | | | | | | | | This change reverts most of the previous register name generation. The real problem is that RegisterTuple does not generate asm names. Added optional operand to RegisterTuple. This way we can simplify register name access and dramatically reduce the size of static tables for the backend. Differential Revision: https://reviews.llvm.org/D64967 llvm-svn: 366598
* gn build: Set +x on symlink_or_copy.pyNico Weber2019-07-191-0/+0
| | | | llvm-svn: 366576
OpenPOWER on IntegriCloud