summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Add writeonly IR attributeNicolai Haehnle2016-07-043-1/+20
| | | | | | | | | | | | | | | | | Summary: This complements the earlier addition of IntrWriteMem and IntrWriteArgMem LLVM intrinsic properties, see D18291. Also start using the attribute for memset, memcpy, and memmove intrinsics, and remove their special-casing in BasicAliasAnalysis. Reviewers: reames, joker.eph Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D18714 llvm-svn: 274485
* [X86][AVX512] Add support for masked shuffle commentsSimon Pilgrim2016-07-032-2/+2
| | | | | | | | | | This patch adds support for including the avx512 mask register information in the mask/maskz versions of shuffle instruction comments. This initial version just adds support for MOVDDUP/MOVSHDUP/MOVSLDUP to reduce the mass of test regenerations, other shuffle instructions can be added in due course. Differential Revision: http://reviews.llvm.org/D21953 llvm-svn: 274459
* Make extract_symbols.py be compatible with Python 3John Brawn2016-07-011-13/+21
| | | | | | | | This involved running 2to3 on it and adjusting all uses of subprocess to use universal_newlines=True so the output is text instead of binary. It remains compatible with Python 2.7. llvm-svn: 274365
* [lit] Add SANITIZER_IGNORE_CVE_2016_2143 to pass_vars.Marcin Koscielnicki2016-06-261-1/+2
| | | | | | | | | | | | | | | This variable is used by ASan (and other sanitizers in the future) on s390x-linux to override a check for CVE-2016-2143 in the running kernel (see revision 267747 on compiler-rt). Since the check simply checks if the kernel version is in a whitelist of known-good versions, it may miss distribution kernels, or manually-patched kernels - hence the need for this variable. To enable running the ASan testsuite on such kernels, this variable should be passed from the environment down to the testcases. Differential Revision: http://reviews.llvm.org/D19888 llvm-svn: 273825
* Revert "Revert "[misched] Extend scheduler to handle unsupported features""Simon Dardis2016-06-242-1/+37
| | | | | | | | This reverts commit r273565. This was an over-eager revert. llvm-svn: 273658
* [TableGen] Use StringRef::compare instead of != and <. NFC.Ahmed Bougacha2016-06-231-2/+2
| | | | | | | | | The previous code would always do 1 or 2 prefix compares; explicitly only do one. This speeds up debug -gen-asm-matcher by ~10% (e.g. X86: 40s -> 35s). llvm-svn: 273583
* Revert "[misched] Extend scheduler to handle unsupported features"Simon Dardis2016-06-232-37/+1
| | | | | | | | This reverts commit r273551. Patch contained a wrong check for isUnsupported. llvm-svn: 273565
* Explicitly specify the ANSI version of these Win32 APIs. While these are ↵Aaron Ballman2016-06-231-1/+1
| | | | | | seemingly unrelated changes, they are all NFC because we currently default to the ANSI versions of the APIs when building for Windows. This simply makes the ANSI usage explicit. llvm-svn: 273564
* [misched] Extend scheduler to handle unsupported featuresSimon Dardis2016-06-232-1/+37
| | | | | | | | | | | | | | | | | | | | | | | Currently isComplete = 1 requires that every instruction must be described, declared unsupported or marked as having no scheduling information for a processor. For some backends such as MIPS, this requirement entails long regex lists of instructions that are unsupported. This patch teaches Tablegen to skip over instructions that are associated with unsupported feature when checking if the scheduling model is complete. Patch by: Daniel Sanders Contributions by: Simon Dardis Reviewers: MatzeB Differential Reviewer: http://reviews.llvm.org/D20522 llvm-svn: 273551
* TableGen/CodeGenSchedule: Move some getAllDerivedDefinitions() calls out of ↵Matthias Braun2016-06-212-3/+11
| | | | | | | | | inner loops This cuts the runtime of the two slowest tblgen invocations in aarch64 in half for me... llvm-svn: 273235
* test commit: remove trailing whitespaceThomas Jablin2016-06-201-1/+1
| | | | llvm-svn: 273197
* If the revision number starts with r, drop it. It will get added backJoerg Sonnenberger2016-06-181-1/+1
| | | | | | later and we don't want to use it twice. llvm-svn: 273099
* Remove the ScalarReplAggregates passDavid Majnemer2016-06-151-1/+1
| | | | | | | | | | Nearly all the changes to this pass have been done while maintaining and updating other parts of LLVM. LLVM has had another pass, SROA, which has superseded ScalarReplAggregates for quite some time. Differential Revision: http://reviews.llvm.org/D21316 llvm-svn: 272737
* [FileCheck] Add --check-prefixes as a shorthand for multiple --check-prefix ↵Daniel Sanders2016-06-141-0/+5
| | | | | | | | | | | | | | | | | options. Summary: This new alias takes a comma separated list of prefixes which allows '--check-prefix=A --check-prefix=B --check-prefix=C' to be written as '--check-prefixes=A,B,C'. Reviewers: probinson Subscribers: probinson, llvm-commits, dsanders Differential Revision: http://reviews.llvm.org/D21293 llvm-svn: 272670
* Add support for collating profiles for use with code coverageVedant Kumar2016-06-131-0/+55
| | | | | | Differential Revision: http://reviews.llvm.org/D20993 llvm-svn: 272599
* Improved Visual Studio 2015 visualization of SmallVectorImplMike Spertus2016-06-131-2/+25
| | | | | | | | | | | | When visualizing small vectors in VS2015, show the first few elements in the DisplayString instead of the size. For example, a SmallVector of DeclAccessPair will visualize like {public typename ...Ts, public typename U} The visualization in VS2013 remains the same because we continue to include the old visualizer with a lower-than-default priority of MediumLow, and the same SmallVector would continue to be visualized as {size = 2} llvm-svn: 272525
* Run clang-tidy's performance-unnecessary-copy-initialization over LLVM.Benjamin Kramer2016-06-122-2/+2
| | | | | | No functionality change intended. llvm-svn: 272516
* [X86] Updated test checks script to generalise LCPI symbol refsSimon Pilgrim2016-06-112-1/+7
| | | | | | | | The script now replace '.LCPI888_8' style asm symbols with the {{\.LCPI.*}} re pattern - this helps stop hardcoded symbols in 32-bit x86 tests changing with every edit of the file Refreshed some tests to demonstrate the new check llvm-svn: 272488
* [lit] Only gather redirected files for command failures.Daniel Dunbar2016-06-101-10/+11
| | | | | | | | | | | - The intended use of this was just in diagnostics, so we shouldn't pay the cost of reading these all the time. - This will avoid including the full output of each command in tests which fail, but the most important use case for this was to gather the output of the specific command which failed. llvm-svn: 272365
* Revert "[lit] Use os.devnull instead of named temp files"Vedant Kumar2016-06-091-5/+19
| | | | | | | | | This reverts commit r272290. It breaks a test that depends on being able to seek the /dev/null equivalent on Windows: http://bb.pgr.jp/builders/ninja-clang-x64-mingw64-RA/builds/11360 llvm-svn: 272293
* [lit] Use os.devnull instead of named temp filesVedant Kumar2016-06-091-19/+5
| | | | | | | | | | | Use os.devnull instead of tempfiles when substituting '/dev/null' on Windows machines. This should make the bots just a bit speedier. Thanks to Yunzhong Gao for testing this patch on Windows! Differential Revision: http://reviews.llvm.org/D20549 llvm-svn: 272290
* Search for llvm-symbolizer binary in the same directory as argv[0], beforeRichard Smith2016-06-094-4/+5
| | | | | | | looking for it along $PATH. This allows installs of LLVM tools outside of $PATH to find the symbolizer and produce pretty backtraces if they crash. llvm-svn: 272232
* Apply most suggestions of clang-tidy's performance-unnecessary-value-paramBenjamin Kramer2016-06-084-16/+13
| | | | | | | Avoids unnecessary copies. All changes audited & pass tests with asan. No functional change intended. llvm-svn: 272190
* [lit] Ensure we get bytes when reading redirected output files.Daniel Dunbar2016-06-081-1/+1
| | | | llvm-svn: 272147
* [lit] Ignore errors when decoding redirected output.Daniel Dunbar2016-06-071-1/+1
| | | | llvm-svn: 272066
* [lit] Fix an uninitialized var on Windows.Daniel Dunbar2016-06-071-1/+2
| | | | llvm-svn: 272052
OpenPOWER on IntegriCloud