summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
* [tblgen] Add a timer covering the time spent reading the Instruction defsDaniel Sanders2019-02-112-0/+15
| | | | | | | | | | | | | | | This patch adds a -time-regions option to tablegen that can enable timers (currently only one) that assess the performance of tablegen itself. This can be useful for identifying scaling problems with tablegen backends. This particular timer has allowed me to ignore time that is not attributed the GISel combiner pass. It's useful by itself but it is particularly useful in combination with https://reviews.llvm.org/D52954 which causes this period of time to be annotated within Xcode Instruments which in turn allows profile samples and recorded allocations attributed to reading instructions to be filtered out. llvm-svn: 353763
* test-release.sh: Add option to use ninjaDiana Picus2019-02-111-9/+29
| | | | | | | | | | | | | | | | | | | | Allow the use of ninja instead of make. This is useful on some platforms where we'd like to be able to limit the number of link jobs without slowing down the other steps of the release. This patch adds a -use-ninja command line option, which sets the generator to Ninja both for LLVM and the test-suite. It also deals with some differences between make and ninja: * DESTDIR handling - ninja doesn't like this to be listed after the target, but both make and ninja can handle it before the command * Verbose mode - ninja uses -v, make uses VERBOSE=1 * Keep going mode - make has a -k mode, which builds as much as possible even when failures are encountered; for ninja we need to set a hard limit (we use 100 since most people won't look at 100 failures anyway) I haven't tested with gmake. llvm-svn: 353685
* gn build: Fix clang-tidy dep on ClangSACheckers.Nico Weber2019-02-111-4/+1
| | | | | | | | Patch by Mirko Bonadei <mbonadei@webrtc.org>! Differential Revision: https://reviews.llvm.org/D57998 llvm-svn: 353657
* gn build: Merge r353590Nico Weber2019-02-095-7/+6
| | | | llvm-svn: 353621
* [GlobalISel] Skip patterns that define complex suboperands twice instead of ↵Jessica Paquette2019-02-091-6/+16
| | | | | | | | | | | | | | | | | | | dying If we run into a pattern that looks like this: add (complex $x, $y) (complex $x, $z) We should skip the pattern instead of asserting/doing something unpredictable. This makes us return an Error in that case, and adds a testcase for skipped patterns. Differential Revision: https://reviews.llvm.org/D57980 llvm-svn: 353586
* gn build: Merge r353566Nico Weber2019-02-091-0/+1
| | | | llvm-svn: 353585
* Implementation of asm-goto support in LLVMCraig Topper2019-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This patch accompanies the RFC posted here: http://lists.llvm.org/pipermail/llvm-dev/2018-October/127239.html This patch adds a new CallBr IR instruction to support asm-goto inline assembly like gcc as used by the linux kernel. This instruction is both a call instruction and a terminator instruction with multiple successors. Only inline assembly usage is supported today. This also adds a new INLINEASM_BR opcode to SelectionDAG and MachineIR to represent an INLINEASM block that is also considered a terminator instruction. There will likely be more bug fixes and optimizations to follow this, but we felt it had reached a point where we would like to switch to an incremental development model. Patch by Craig Topper, Alexander Ivchenko, Mikhail Dvoretckii Differential Revision: https://reviews.llvm.org/D53765 llvm-svn: 353563
* gn build: Merge r353471, r353373.Nico Weber2019-02-086-6/+8
| | | | llvm-svn: 353518
* gn build: Make check-{clang,lld,llvm} pass on FreeBSD.Peter Collingbourne2019-02-0713-37/+43
| | | | | | | | | Mostly achieved by assuming that anything that isn't Win or Mac is ELF, which seems reasonable enough for now. Differential Revision: https://reviews.llvm.org/D57870 llvm-svn: 353470
* gn build: Merge the test part of r353237.Peter Collingbourne2019-02-071-0/+1
| | | | llvm-svn: 353369
* build: Remove the cmake check for malloc.h.Peter Collingbourne2019-02-061-2/+0
| | | | | | | | | | | As far as I can tell, malloc.h is only being used here to provide a definition of mallinfo (malloc itself is declared in stdlib.h via cstdlib). We already have a macro for whether mallinfo is available, so switch to using that instead. Differential Revision: https://reviews.llvm.org/D57807 llvm-svn: 353329
* gn build: Merge r353265, r353237Nico Weber2019-02-065-2/+3
| | | | llvm-svn: 353298
* gn build: Fix clang-tidy buildNico Weber2019-02-051-8/+6
| | | | | | | | | | | | | | | | | | Not depending on //clang/lib/StaticAnalyzer/Core and //clang/lib/StaticAnalyzer/Frontend causes a linker error even if ClangSACheckers are not supported. Undefined symbols for architecture x86_64: "clang::ento::CreateAnalysisConsumer(clang::CompilerInstance&)", referenced from: clang::tidy::ClangTidyASTConsumerFactory::CreateASTConsumer( clang::CompilerInstance&, llvm::StringRef) in libclangTidy.a(libclangTidy.ClangTidy.o) Patch from Mirko Bonadei <mbonadei@webrtc.org>! Differential Revision: https://reviews.llvm.org/D57777 llvm-svn: 353244
* gn build: BUILD.gn files for clang-tidy and clang-apply-replacementsNico Weber2019-02-0526-1/+731
| | | | | | | | Patch from Mirko Bonadei <mbonadei@webrtc.org>! Differential Revision: https://reviews.llvm.org/D57329 llvm-svn: 353177
* Fix typo in comment, NFCIKrasimir Georgiev2019-02-051-1/+1
| | | | llvm-svn: 353176
* gn build: Merge r353072Nico Weber2019-02-051-0/+1
| | | | llvm-svn: 353175
* Recommit: Detect incorrect FileCheck variable CLI definitionThomas Preud'homme2019-02-051-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: While the backend code of FileCheck relies on definition of variable from the command-line to have an equal sign '=' and a variable name before that, the frontend does not actually enforce it. This leads to FileCheck crashing when invoked with invalid syntax for the -D option. This patch adds the missing validation in the frontend. It also makes the -D option an AlwaysPrefix option to be able to detect -D=FOO as being a define without variable and -D as missing its value. Copyright: - Linaro (changes in version 2 of revision D55940) - GraphCore (changes in later versions) Reviewers: jdenny Subscribers: JonChesterfield, hiraditya, kristina, probinson, llvm-commits Differential Revision: https://reviews.llvm.org/D55940 llvm-svn: 353173
* gn build: Fix Python 3 write_vcsrevision script compatibilitySerge Guelton2019-02-051-1/+1
| | | | | | | | | | Trivial fix: decode was not called for all subprocess.check_output calls. Commited on behalf of Andrew Boyarshin Differential Revision: https://reviews.llvm.org/D57505 llvm-svn: 353168
* gn build: Upgrade to NDK r19.Peter Collingbourne2019-02-055-27/+7
| | | | | | | | | | NDK r19 includes a sysroot that can be used directly by the compiler without creating a standalone toolchain, so we just need a handful of flags to point Clang there. Differential Revision: https://reviews.llvm.org/D57733 llvm-svn: 353139
* [WebAssembly] Make disassembler always emit most canonical name.Wouter van Oortmerssen2019-02-051-5/+26
| | | | | | | | | | | | | | | | | | | | | Summary: There are a few instructions that all map to the same opcode, so when disassembling, we have to pick one. That was just the first one before (the except_ref variant in the case of "call"), now it is the one marked as IsCanonical in tablegen, or failing that, the shortest name (which is typically the "canonical" one). Also introduced a canonical "end" instruction for this purpose. Reviewers: dschuff, tlively Subscribers: sbc100, jgravelle-google, aheejin, llvm-commits, sunfish Tags: #llvm Differential Revision: https://reviews.llvm.org/D57713 llvm-svn: 353131
* gn build: Windows: use a more standard format for PDB filenamesDavid Major2019-02-041-7/+13
| | | | | | | | The current build was producing names like llvm-undname.exe.pdb, which looks unusual to me at least. This switches them to the more common llvm-undname.pdb style. Differential Revision: https://reviews.llvm.org/D57613 llvm-svn: 353099
* gn build: Revert r353094 (bad merge)David Major2019-02-041-14/+8
| | | | llvm-svn: 353098
* gn build: Windows: use a more standard format for PDB filenamesDavid Major2019-02-041-8/+14
| | | | | | | | The current build was producing names like llvm-undname.exe.pdb, which looks unusual to me at least. This switches them to the more common llvm-undname.pdb style. Differential Revision: https://reviews.llvm.org/D57613 llvm-svn: 353094
* gn build: Windows: write PDBs when is_debugDavid Major2019-02-041-2/+6
| | | | | | | | | | Without /DEBUG, the /Zi doesn't on its own create PDB files. And since ninja runs multiple compilations in parallel, we need /FS to prevent contention on PDBs. Differential Revision: https://reviews.llvm.org/D57612 llvm-svn: 353093
* [Tablegen][DAG]: Fix build breakage when LLVM_ENABLE_DAGISEL_COV=1Aditya Nandakumar2019-02-041-2/+2
| | | | | | | | | | LLVM_ENABLE_DAGISEL_COV can be used to instrument DAGISel tablegen selection code to show which patterns along with Complex patterns were used when selecting instructions. Unfortunately this is turned off by default and was broken but never tested. This required a simple fix (missing new line) to get it to build again. llvm-svn: 353091
* gn build: Merge r352944Nico Weber2019-02-041-0/+3
| | | | llvm-svn: 353063
* [X86] Print %st(0) as %st when its implicit to the instruction. Continue ↵Craig Topper2019-02-041-0/+2
| | | | | | | | printing it as %st(0) when its encoded in the instruction. This is a step back from the change I made in r352985. This appears to be more consistent with gcc and objdump behavior. llvm-svn: 353015
* gn build: Create regular archives for the sanitizer runtimes.Peter Collingbourne2019-02-014-3/+18
| | | | | | | | | | We'll need to do this eventually if we create an installable package. For now, this lets me use the archives to build Android, whose build system wants to copy the archives to another location. Differential Revision: https://reviews.llvm.org/D57607 llvm-svn: 352907
* gn build: Add a missing dependency from llvm/test to llvm-litNico Weber2019-02-011-0/+1
| | | | | | | | check-llvm already listed llvm-lit as script which counts as a dep, so running check-llvm worked fine, but `ninja -C out/gn llvm/test` didn't build llvm-lit before if it wasn't already there. llvm-svn: 352893
* gn build: Merge r352483Nico Weber2019-01-311-0/+7
| | | | llvm-svn: 352759
* gn build: Merge r352681, r352739Nico Weber2019-01-312-1/+1
| | | | llvm-svn: 352758
* Reland "gn build: Add BPF target."Peter Collingbourne2019-01-317-0/+241
| | | | | | Differential Revision: https://reviews.llvm.org/D57436 llvm-svn: 352705
* lit: Let lit.util.which() return a normcase()ed pathNico Weber2019-01-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | LLVMConfig.with_environment() uses os.path.normcase(os.path.normpath(x)) to normalize temporary env vars. LLVMConfig.use_clang() uses with_environment() to temporarily set PATH and then look for clang there. This means that on Windows, clang will be run with a path like c:\foo\bin\clang.EXE (with a lower-case "C:"). lit.util.which() used to not do this, which means the executables added in clang/test/lit.cfg.py (e.g. c-index-test) were run with a path like C:\foo\bin\c-index-test.EXE (because both CMake and GN happen to write clang_tools_dir with an upper-case C to lit.site.cfg.py). clang/test/Index/pch-from-libclang.c requires that both c-index-test and clang use _exactly_ the same resource dir path (same case and everything), because a hash of the resource directory is used as module cache path. This patch is necessary but not sufficient to make pch-from-libclang.c pass on Windows. Differential Revision: https://reviews.llvm.org/D57343 llvm-svn: 352704
* gn build: Set executable bit on get.pyNico Weber2019-01-301-0/+0
| | | | llvm-svn: 352659
* Revert "gn build: Add BPF target."Yonghong Song2019-01-307-241/+0
| | | | | | | | | This reverts commit r352638. The change in this patch is not trivial and it is merged without component owner approval. llvm-svn: 352649
* gn build: Add BPF target.Peter Collingbourne2019-01-307-0/+241
| | | | | | Differential Revision: https://reviews.llvm.org/D57436 llvm-svn: 352638
* [utils] Fix update scripts output when run on python3.Simon Pilgrim2019-01-304-4/+4
| | | | | | This fixes a "bytes-like object is required, not 'str'" python3 error I hit on update_llc_test_checks.py (but present on the other scripts as well) by matching what update_mca_test_checks.py already does, plus I've added an explicit 'utf-8' encoding. llvm-svn: 352633
* Add 8.0 release bug to merge request scriptMatt Arsenault2019-01-301-0/+3
| | | | llvm-svn: 352579
* Adjust documentation for git migration.James Y Knight2019-01-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes most references to the paths: llvm.org/svn/ llvm.org/git/ llvm.org/viewvc/ github.com/llvm-mirror/ github.com/llvm-project/ reviews.llvm.org/diffusion/ to instead point to https://github.com/llvm/llvm-project. This is *not* a trivial substitution, because additionally, all the checkout instructions had to be migrated to instruct users on how to use the monorepo layout, setting LLVM_ENABLE_PROJECTS instead of checking out various projects into various subdirectories. I've attempted to not change any scripts here, only documentation. The scripts will have to be addressed separately. Additionally, I've deleted one document which appeared to be outdated and unneeded: lldb/docs/building-with-debug-llvm.txt Differential Revision: https://reviews.llvm.org/D57330 llvm-svn: 352514
* gn build: Merge r352444, r352431, r352430Nico Weber2019-01-293-0/+3
| | | | llvm-svn: 352502
* Revert r351833 and r352250.Hans Wennborg2019-01-291-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They were breaking the Windows build when using MSBuild, see the discussion on D56781. r351833: "Use response file when generating LLVM-C.dll" > Use response file when generating LLVM-C.dll > > As discovered in D56774 the command line gets to long, so use a response file to give the script the libs. This change has been tested and is confirmed working for me. > > Commited on behalf of Jakob Bornecrantz > > Differential Revision: https://reviews.llvm.org/D56781 r352250: "Build LLVM-C.dll by default on windows and enable in release package" > Build LLVM-C.dll by default on windows and enable in release package > > With the fixes to the building of LLVM-C.dll in D56781 this should now > be safe to land. This will greatly simplify dealing with LLVM for people > that just want to use the C API on windows. This is a follow up from > D35077. > > Patch by Jakob Bornecrantz! > > Differential revision: https://reviews.llvm.org/D56774 llvm-svn: 352492
* gn build: Add get.py script to download prebuilt gn, make gn.py run ↵Nico Weber2019-01-284-3/+99
| | | | | | | | | | | downloaded gn if gn is not on PATH Prebuilts are available for x86_64 Linux, macOS, Windows. The script always pulls the latest GN version. Differential Revision: https://reviews.llvm.org/D57256 llvm-svn: 352420
* gn build: Make cmake sync script work on Windows if git is a bat fileNico Weber2019-01-281-2/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D57338 llvm-svn: 352419
* gn build: Fix `lld-link: unknown flag: -fuse-ld=lld` warnings on WindowsNico Weber2019-01-282-2/+5
| | | | | | | | | | Fixes a minor regression from r351248. While here, also make it possible to opt out of lld by saying use_lld=false when clang_base_path is set. (use_lld still defaults to true if clang_base_path is set.) llvm-svn: 352415
* Revert "Detect incorrect FileCheck variable CLI definition"Thomas Preud'homme2019-01-271-22/+4
| | | | | | This reverts commit r351039. llvm-svn: 352309
* Build LLVM-C.dll by default on windows and enable in release packageHans Wennborg2019-01-251-1/+11
| | | | | | | | | | | | | With the fixes to the building of LLVM-C.dll in D56781 this should now be safe to land. This will greatly simplify dealing with LLVM for people that just want to use the C API on windows. This is a follow up from D35077. Patch by Jakob Bornecrantz! Differential revision: https://reviews.llvm.org/D56774 llvm-svn: 352250
* gn build: Merge r352149Nico Weber2019-01-253-2/+1
| | | | llvm-svn: 352202
* gn build: Revert r352200, commit message was wrongNico Weber2019-01-253-1/+2
| | | | llvm-svn: 352201
* gn build: Merge r352148Nico Weber2019-01-253-2/+1
| | | | llvm-svn: 352200
* gn build: Set is_clang to true in stage2 toolchains.Peter Collingbourne2019-01-251-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D57202 llvm-svn: 352146
OpenPOWER on IntegriCloud