aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils
AgeCommit message (Collapse)AuthorFilesLines
2016-09-13Revert of r281304 as it is causing build bot failures in hexagonSjoerd Meijer2-2/+0
hwloop regression tests. These tests pass locally; will be investigating where these differences come from. llvm-svn: 281306
2016-09-13This adds a new field isAdd to MCInstrDesc. The ARM and Hexagon instructionSjoerd Meijer2-0/+2
descriptions now tag add instructions, and the Hexagon backend is using this to identify loop induction statements. Patch by Sam Parker and Sjoerd Meijer. Differential Revision: https://reviews.llvm.org/D23601 llvm-svn: 281304
2016-09-09[cmake] Export gtest/gtest_main and its dependencies via a special build ↵Michael Gottesman2-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
2016-09-08[TableGen] AsmMatcher: Add AsmVariantName to Instruction class.Sam Kolton1-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
2016-09-05[lit] Downgrade error to warning on gtest crashes during discovery.Ahmed Bougacha1-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
2016-09-05lit/util.py: Another fix for py3.NAKAMURA Takumi1-0/+2
'str' object has no attribute 'decode'. llvm-svn: 280641
2016-09-03Make lit/util.py py3-compatible.NAKAMURA Takumi1-1/+1
llvm-svn: 280579
2016-09-02lit: print process output, if getting the list of google-tests failed.Ivan Krasin2-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
2016-09-02Quick fix to make LIT_PRESERVES_TMP work againReid Kleckner1-1/+2
llvm-svn: 280502
2016-09-02[lit] Clean up temporary files created by testsReid Kleckner2-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
2016-09-02[lit] Fail testing if a googletest executable crashes during test discoveryGreg Parker2-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
2016-09-01[lit] Use multiprocessing by default on WindowsReid Kleckner1-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
2016-08-26TableGen: Switch from a std::map to a DenseMap in CodeGenSubRegIndex. NFCJustin Bogner1-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
2016-08-26FileCheck: Minor cleanup of the class PatternSaleem Abdulrasool1-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
2016-08-22[X86] Create a new instruction format to handle 4VOp3 encoding. This saves ↵Craig Topper2-18/+25
one bit in TSFlags and simplifies MRMSrcMem/MRMSrcReg format handling. llvm-svn: 279424
2016-08-22[X86] Create a new instruction format to handle MemOp4 encoding. This saves ↵Craig Topper2-17/+28
one bit in TSFlags and simplifies MRMSrcMem/MRMSrcReg format handling. llvm-svn: 279423
2016-08-22[X86] Space out the encodings of X86 instruction formats. I plan to add some ↵Craig Topper1-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
2016-08-22[X86] Merge small helper function into the switch that calls it since they ↵Craig Topper1-17/+9
both operate on the same variable. NFC llvm-svn: 279421
2016-08-22[X86] Explicitly list all X86 instruction forms in switch statement so its ↵Craig Topper1-1/+10
easier to detect when one is missing. NFC llvm-svn: 279420
2016-08-17Replace a few more "fall through" comments with LLVM_FALLTHROUGHJustin Bogner1-4/+4
Follow up to r278902. I had missed "fall through", with a space. llvm-svn: 278970
2016-08-12Use the range variant of remove_if instead of unpacking begin/endDavid Majnemer2-58/+41
No functionality change is intended. llvm-svn: 278475
2016-08-12Use the range variant of find/find_if instead of unpacking begin/endDavid Majnemer4-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
2016-08-12Use the range variant of find_if instead of unpacking begin/endDavid Majnemer2-16/+11
No functionality change is intended. llvm-svn: 278443
2016-08-11Use the range variant of find instead of unpacking begin/endDavid Majnemer6-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
2016-08-11Use range algorithms instead of unpacking begin/endDavid Majnemer1-8/+7
No functionality change is intended. llvm-svn: 278417
2016-08-11[vim] Add more attributes to llvm.vimDavid Majnemer1-0/+2
llvm-svn: 278415
2016-08-09[vim] Update the llvm.vim syntax fileDavid Majnemer1-2/+7
We never updated this file to contain the WinEH instructions. Also, add the dereferenceable attribute. llvm-svn: 278146
2016-08-09test-release.sh: Drop autoconf supportHans Wennborg1-46/+17
The autoconf build was deleted some time ago. llvm-svn: 278133
2016-08-05Fix gdb pretty printers to work with Python 3.Igor Kudrin1-0/+4
Differential Revision: https://reviews.llvm.org/D23202 llvm-svn: 277833
2016-07-27build_llvm_package.bat: try tests three timesHans Wennborg1-8/+8
Sometimes they're flaky on Windows, and starting the whole thing over is painful. llvm-svn: 276913
2016-07-27[mips][ias] Check '$rs = $rd' constraints when both registers are in AsmText.Daniel Sanders1-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
2016-07-26[tblgen] Compare const char * with strcmp instead of creating StringRef.Benjamin Kramer1-2/+2
Avoids a call to strlen on both strings which always reads the entire string. strcmp can use early exit. llvm-svn: 276737
2016-07-22[utils] Update coverage regression checking scriptVedant Kumar1-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
2016-07-21[lit] Use full config path in diagnostics.Daniel Dunbar1-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
2016-07-21[lit] Bump version number.Daniel Dunbar1-2/+2
llvm-svn: 276353
2016-07-20GlobalISel: Remove explicit enumerator values from .def file.Tim Northover1-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
2016-07-20[utils] Add script to check for code coverage regressionsVedant Kumar1-0/+135
Differential Revision: https://reviews.llvm.org/D22544 llvm-svn: 276199
2016-07-18TableGen: Allow custom register operand decoder methodMatt Arsenault1-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
2016-07-18[utils] Generate html reports with the code coverage utility scriptVedant Kumar1-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
2016-07-18build_llvm_package.bat: update version to 4.0.0Hans Wennborg1-2/+2
llvm-svn: 275903
2016-07-18Revert r273099 "If the revision number starts with r, drop it. It will get ↵Hans Wennborg1-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
2016-07-15IR: Sort generic intrinsics before target specific onesJustin Bogner5-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
2016-07-14TableGen: Fix a confusing use of both i and I as variables. NFCJustin Bogner1-5/+5
llvm-svn: 275450
2016-07-14XRay: Add entry and exit sledsDean Michael Berris1-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
2016-07-13vim: separate the keywords into one per lineSaleem Abdulrasool1-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
2016-07-13vim: add local_unnamed_addr keywordSaleem Abdulrasool1-6/+6
The `local_unnamed_addr` was introduced in SVN r272709. Update the syntax highlighting rules. llvm-svn: 275245
2016-07-11Add a 'Returned' intrinsic property corresponding to the 'returned' argument ↵Hal Finkel3-1/+10
attribute This will be used by the upcoming llvm.noalias intrinsic. Differential Revision: http://reviews.llvm.org/D22201 llvm-svn: 275034
2016-07-08TableGen: Update style in CodeGenIntrinsics. NFCJustin Bogner1-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
2016-07-05TableGen: avoid string copy.Tim Northover1-1/+1
llvm-svn: 274584
2016-07-05AArch64: TableGenerate system instruction operands.Tim Northover4-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