summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
* [cmake] Export gtest/gtest_main and its dependencies via a special build ↵Michael Gottesman2016-09-092-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tree only cmake exports file. Previously, gtest/gtest_main were not exported via cmake. The intention here was to ensure that users whom are linking against the LLVM install tree would not get the gtest/gtest_main targets. This prevents downstream projects that link against the LLVM build tree (i.e. Swift) from getting this dependency information in their cmake builds. Without such dependency information, linker issues can result on linux due to LLVMSupport being put before gtest on the linker command line. This commit preserves behavior that we want for the install tree, while adding support for the build tree by: 1. The special casing for gtest/gtest_main in the add_llvm_library code is removed in favor of a flag called "BUILDTREE_ONLY". If this is set, then the library is communicating that it is only meant to be exported into the build tree and is not meant to be installed or exported via the install tree. This part is just a tweak to remove the special case, the underlying code is the same. 2. The cmake code that exports cmake targets for the build tree has special code to import an additional targets file called LLVMBuildTreeOnlyExports.cmake. Additionally the extra targets are added to the LLVMConfig.cmake's LLVM_EXPORTED_TARGETS variable. In contrast, the "installation" cmake file uses the normal LLVM_EXPORTS_TARGETS as before and does not include the extra exports file. This is implemented by defining/undefining variables when performing a configure of the build/install tree LLVMConfig.cmake files. llvm-svn: 281085
* [TableGen] AsmMatcher: Add AsmVariantName to Instruction class.Sam Kolton2016-09-081-0/+11
| | | | | | | | | | | | | | Summary: This allows specifying instructions that are available only in specific assembler variant. If AsmVariantName is specified then instruction will be presented only in MatchTable for this variant. If not specified then assembler variants will be determined based on AsmString. Also this allows splitting assembler match tables in same way as it is done in dissasembler. Reviewers: ab, tstellarAMD, craig.topper, vpykhtin Subscribers: wdng Differential Revision: https://reviews.llvm.org/D24249 llvm-svn: 280952
* [lit] Downgrade error to warning on gtest crashes during discovery.Ahmed Bougacha2016-09-051-2/+2
| | | | | | | | | | Lots of unittests started failing under asan after r280455. It seems they've been failing for a long time, but lit silently ignored them. Downgrade the error so we can figure out what is going on. Filed http://llvm.org/PR30285. llvm-svn: 280674
* lit/util.py: Another fix for py3.NAKAMURA Takumi2016-09-051-0/+2
| | | | | | 'str' object has no attribute 'decode'. llvm-svn: 280641
* Make lit/util.py py3-compatible.NAKAMURA Takumi2016-09-031-1/+1
| | | | llvm-svn: 280579
* lit: print process output, if getting the list of google-tests failed.Ivan Krasin2016-09-022-6/+11
| | | | | | | | | | | | | Summary: This is a follow up to r280455, where a check for the process exit code was introduced. Some ASAN bots throw this error now, but it's impossible to understand what's wrong with them, and the issue is not reproducible. Reviewers: vitalybuka Differential Revision: https://reviews.llvm.org/D24210 llvm-svn: 280550
* Quick fix to make LIT_PRESERVES_TMP work againReid Kleckner2016-09-021-1/+2
| | | | llvm-svn: 280502
* [lit] Clean up temporary files created by testsReid Kleckner2016-09-022-11/+28
| | | | | | | | | | | | Do this by creating a temp directory in the normal system temp directory, and cleaning it up on exit. It is still possible for this temp directory to leak if Python exits abnormally, but this is probably good enough for now. Fixes PR18335 llvm-svn: 280501
* [lit] Fail testing if a googletest executable crashes during test discoveryGreg Parker2016-09-022-2/+6
| | | | | | | | | googletest formatted tests are discovered by running the test executable. Previously testing would silently succeed if the test executable crashed during the discovery process. Now testing fails with "error: unable to discover google-tests ..." if the test executable exits with a non-zero status. llvm-svn: 280455
* [lit] Use multiprocessing by default on WindowsReid Kleckner2016-09-011-6/+3
| | | | | | | | | | | | | | | | Apparently nobody evaluated multiprocessing on Windows since Daniel enabled multiprocessing on Unix in r193279. It works so far as I can tell. Today this is worth about an 8x speedup (631.29s to 73.25s) on my 24 core Windows machine. Hopefully this will improve Windows buildbot cycle time, where currently it takes more time to run check-all than it does to self-host with assertions enabled: http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/20 build stage 2 ninja all ( 28 mins, 22 secs ) ninja check 2 stage 2 ( 37 mins, 38 secs ) llvm-svn: 280382
* TableGen: Switch from a std::map to a DenseMap in CodeGenSubRegIndex. NFCJustin Bogner2016-08-261-2/+1
| | | | | | | | | This mapping is between pointers, which DenseMap is particularly good at. Most targets aren't really affected, but if there's a lot of subregister composition this can shave off a good chunk of time from generating registers. llvm-svn: 279875
* FileCheck: Minor cleanup of the class PatternSaleem Abdulrasool2016-08-261-8/+6
| | | | | | | | | 1. Add the "explicit" specifier to the single-argument constructor of Pattern 2. Reorder the fields to remove excessive padding (8 bytes). Patch by Alexander Shaposhnikov! llvm-svn: 279832
* [X86] Create a new instruction format to handle 4VOp3 encoding. This saves ↵Craig Topper2016-08-222-18/+25
| | | | | | one bit in TSFlags and simplifies MRMSrcMem/MRMSrcReg format handling. llvm-svn: 279424
* [X86] Create a new instruction format to handle MemOp4 encoding. This saves ↵Craig Topper2016-08-222-17/+28
| | | | | | one bit in TSFlags and simplifies MRMSrcMem/MRMSrcReg format handling. llvm-svn: 279423
* [X86] Space out the encodings of X86 instruction formats. I plan to add some ↵Craig Topper2016-08-221-83/+83
| | | | | | | | new encodings in future commits and this will reduce the size of those commits. NFC This tries to keep all the ModRM memory and register forms in their own regions of the encodings. Hoping to make it simple on some of the switch statements that operate on these encodings. llvm-svn: 279422
* [X86] Merge small helper function into the switch that calls it since they ↵Craig Topper2016-08-221-17/+9
| | | | | | both operate on the same variable. NFC llvm-svn: 279421
* [X86] Explicitly list all X86 instruction forms in switch statement so its ↵Craig Topper2016-08-221-1/+10
| | | | | | easier to detect when one is missing. NFC llvm-svn: 279420
* Replace a few more "fall through" comments with LLVM_FALLTHROUGHJustin Bogner2016-08-171-4/+4
| | | | | | Follow up to r278902. I had missed "fall through", with a space. llvm-svn: 278970
* Use the range variant of remove_if instead of unpacking begin/endDavid Majnemer2016-08-122-58/+41
| | | | | | No functionality change is intended. llvm-svn: 278475
* Use the range variant of find/find_if instead of unpacking begin/endDavid Majnemer2016-08-124-27/+11
| | | | | | | | | If the result of the find is only used to compare against end(), just use is_contained instead. No functionality change is intended. llvm-svn: 278469
* Use the range variant of find_if instead of unpacking begin/endDavid Majnemer2016-08-122-16/+11
| | | | | | No functionality change is intended. llvm-svn: 278443
* Use the range variant of find instead of unpacking begin/endDavid Majnemer2016-08-116-19/+11
| | | | | | | | | If the result of the find is only used to compare against end(), just use is_contained instead. No functionality change is intended. llvm-svn: 278433
* Use range algorithms instead of unpacking begin/endDavid Majnemer2016-08-111-8/+7
| | | | | | No functionality change is intended. llvm-svn: 278417
* [vim] Add more attributes to llvm.vimDavid Majnemer2016-08-111-0/+2
| | | | llvm-svn: 278415
* [vim] Update the llvm.vim syntax fileDavid Majnemer2016-08-091-2/+7
| | | | | | | We never updated this file to contain the WinEH instructions. Also, add the dereferenceable attribute. llvm-svn: 278146
* test-release.sh: Drop autoconf supportHans Wennborg2016-08-091-46/+17
| | | | | | The autoconf build was deleted some time ago. llvm-svn: 278133
* Fix gdb pretty printers to work with Python 3.Igor Kudrin2016-08-051-0/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D23202 llvm-svn: 277833
* build_llvm_package.bat: try tests three timesHans Wennborg2016-07-271-8/+8
| | | | | | | Sometimes they're flaky on Windows, and starting the whole thing over is painful. llvm-svn: 276913
* [mips][ias] Check '$rs = $rd' constraints when both registers are in AsmText.Daniel Sanders2016-07-271-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is one possible solution to the problem of ignoring constraints that Simon raised in D21473 but it's a bit of a hack. The integrated assembler currently ignores violations of the tied register constraints when the operands involved in a tie are both present in the AsmText. For example, 'dati $rs, $rt, $imm' with the '$rs = $rt' will silently replace $rt with $rs. So 'dati $2, $3, 1' is processed as if the user provided 'dati $2, $2, 1' without any diagnostic being emitted. This is difficult to solve properly because there are multiple parts of the matcher that are silently forcing these constraints to be met. Tied operands are rendered to instructions by cloning previously rendered operands but this is unnecessary because the matcher was already instructed to render the operand it would have cloned. This is also unnecessary because earlier code has already replaced the MCParsedOperand with the one it was tied to (so the parsed input is matched as if it were 'dati <RegIdx 2>, <RegIdx 2>, <Imm 1>'). As a result, it looks like fixing this properly amounts to a rewrite of the tied operand handling which affects all targets. This patch however, merely inserts a checking hook just before the substitution of MCParsedOperands and the Mips target overrides it. It's not possible to accurately check the registers are the same this early (because numeric registers haven't been bound to a register class yet) so it cheats a bit and checks that the tokens that produced the operand are lexically identical. This works because tied registers need to have the same register class but it does have a flaw. It will reject 'dati $4, $a0, 1' for violating the constraint even though $a0 ends up as the same register as $4. Reviewers: sdardis Subscribers: dsanders, llvm-commits, sdardis Differential Revision: https://reviews.llvm.org/D21994 llvm-svn: 276867
* [tblgen] Compare const char * with strcmp instead of creating StringRef.Benjamin Kramer2016-07-261-2/+2
| | | | | | | Avoids a call to strlen on both strings which always reads the entire string. strcmp can use early exit. llvm-svn: 276737
* [utils] Update coverage regression checking scriptVedant Kumar2016-07-221-37/+41
| | | | | | | | r276409 changed the coverage summary format. Update the script so that it can parse the new output, and incorporate the new information into its warnings. llvm-svn: 276446
* [lit] Use full config path in diagnostics.Daniel Dunbar2016-07-211-1/+1
| | | | | | | | | - This allows tools like emacs to automatically find the config file path when you step through errors. - Patch by Dave Abrahams. llvm-svn: 276357
* [lit] Bump version number.Daniel Dunbar2016-07-211-2/+2
| | | | llvm-svn: 276353
* GlobalISel: Remove explicit enumerator values from .def file.Tim Northover2016-07-201-1/+1
| | | | | | | | | | They were all auto-incremented from 0 anyway, and I'm getting really annoying conflicts and runtime failures when different people add more for GlobalISel (and even when I'm refactoring my own patches). NFC. llvm-svn: 276204
* [utils] Add script to check for code coverage regressionsVedant Kumar2016-07-201-0/+135
| | | | | | Differential Revision: https://reviews.llvm.org/D22544 llvm-svn: 276199
* TableGen: Allow custom register operand decoder methodMatt Arsenault2016-07-181-25/+33
| | | | | | | | | | | | | | | | | | This is for a situation where the encoding for a register may be different depending on the specific operand. For some instructions, we want to apply additional restrictions beyond the encoding's constraints. In AMDGPU some operands are VSrc_32, using the VS_32 pseudo register class which accept VGPRs, SGPRs, or immediates in the encoding. Some specific instructions with the same encoding operand do not want to allow immediates or SGPRs, but the encoding format is different in this case than a regular VGPR_32 operand. This allows specifying the encoding should be treated the same without introducing yet another dummy register class. llvm-svn: 275929
* [utils] Generate html reports with the code coverage utility scriptVedant Kumar2016-07-181-19/+31
| | | | | | | | | | | Instead of extracting raw coverage mappings into an artifact directory, actually generate useful html reports for a given list of binaries with symbol demangling turned on. No tests, but this is actively being used to drive the (still nascent) coverage bot. llvm-svn: 275927
* build_llvm_package.bat: update version to 4.0.0Hans Wennborg2016-07-181-2/+2
| | | | llvm-svn: 275903
* Revert r273099 "If the revision number starts with r, drop it. It will get ↵Hans Wennborg2016-07-181-1/+1
| | | | | | | | | | | | | added back" This doesn't seem to work with Bash: $ /work/llvm/utils/release/merge.sh --proj llvm --rev r275870 /work/llvm/utils/release/merge.sh: line 34: ${$1#r}: bad substitution I get the same error with and without a leading 'r'. llvm-svn: 275898
* IR: Sort generic intrinsics before target specific onesJustin Bogner2016-07-155-39/+78
| | | | | | | | | | | | This splits out the intrinsic table such that generic intrinsics come first and target specific intrinsics are grouped by target. From here we can find out which target an intrinsic is for or differentiate between generic and target intrinsics. The motivation here is to make it easier to move target specific intrinsic handling out of generic code. llvm-svn: 275575
* TableGen: Fix a confusing use of both i and I as variables. NFCJustin Bogner2016-07-141-5/+5
| | | | llvm-svn: 275450
* XRay: Add entry and exit sledsDean Michael Berris2016-07-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: In this patch we implement the following parts of XRay: - Supporting a function attribute named 'function-instrument' which currently only supports 'xray-always'. We should be able to use this attribute for other instrumentation approaches. - Supporting a function attribute named 'xray-instruction-threshold' used to determine whether a function is instrumented with a minimum number of instructions (IR instruction counts). - X86-specific nop sleds as described in the white paper. - A machine function pass that adds the different instrumentation marker instructions at a very late stage. - A way of identifying which return opcode is considered "normal" for each architecture. There are some caveats here: 1) We don't handle PATCHABLE_RET in platforms other than x86_64 yet -- this means if IR used PATCHABLE_RET directly instead of a normal ret, instruction lowering for that platform might do the wrong thing. We think this should be handled at instruction selection time to by default be unpacked for platforms where XRay is not availble yet. 2) The generated section for X86 is different from what is described from the white paper for the sole reason that LLVM allows us to do this neatly. We're taking the opportunity to deviate from the white paper from this perspective to allow us to get richer information from the runtime library. Reviewers: sanjoy, eugenis, kcc, pcc, echristo, rnk Subscribers: niravd, majnemer, atrick, rnk, emaste, bmakam, mcrosier, mehdi_amini, llvm-commits Differential Revision: http://reviews.llvm.org/D19904 llvm-svn: 275367
* vim: separate the keywords into one per lineSaleem Abdulrasool2016-07-131-22/+116
| | | | | | | | | | | This achieves the same result as previously by using line wrapping. This allows us to have one keyword per line which makes adding a new keyword significantly easier, especially if they are inserted in a lexicographical sort order as you no longer need to reflow the content around it. This only does the keywords as that is the group which changes more often. llvm-svn: 275248
* vim: add local_unnamed_addr keywordSaleem Abdulrasool2016-07-131-6/+6
| | | | | | | The `local_unnamed_addr` was introduced in SVN r272709. Update the syntax highlighting rules. llvm-svn: 275245
* Add a 'Returned' intrinsic property corresponding to the 'returned' argument ↵Hal Finkel2016-07-113-1/+10
| | | | | | | | | | attribute This will be used by the upcoming llvm.noalias intrinsic. Differential Revision: http://reviews.llvm.org/D22201 llvm-svn: 275034
* TableGen: Update style in CodeGenIntrinsics. NFCJustin Bogner2016-07-081-103/+96
| | | | | | | | Ran clang-format to remove the namespace indentation, and stopped repeating names in doc comments since I was updating every line anyway. llvm-svn: 274919
* TableGen: avoid string copy.Tim Northover2016-07-051-1/+1
| | | | llvm-svn: 274584
* AArch64: TableGenerate system instruction operands.Tim Northover2016-07-054-1/+329
| | | | | | | | | | | | | | | | | | | | The way the named arguments for various system instructions are handled at the moment has a few problems: - Large-scale duplication between AArch64BaseInfo.h and AArch64BaseInfo.cpp - That weird Mapping class that I have no idea what I was on when I thought it was a good idea. - Searches are performed linearly through the entire list. - We print absolutely all registers in upper-case, even though some are canonically mixed case (SPSel for example). - The ARM ARM specifies sysregs in terms of 5 fields, but those are relegated to comments in our implementation, with a slightly opaque hex value indicating the canonical encoding LLVM will use. This adds a new TableGen backend to produce efficiently searchable tables, and switches AArch64 over to using that infrastructure. llvm-svn: 274576
* TableGen: promote "code" type from syntactic sugar.Tim Northover2016-07-051-1/+1
| | | | | | | It's being immediately converted to a "string", but being able to tell what type the field was originally can be useful in backends. llvm-svn: 274575
* [TableGen] Remove dead code. NFCI.Davide Italiano2016-07-041-28/+0
| | | | llvm-svn: 274515
OpenPOWER on IntegriCloud