summaryrefslogtreecommitdiffstats
path: root/llvm/utils
Commit message (Collapse)AuthorAgeFilesLines
* 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
* [utils/lit] Show available_features with --show-suites.Daniel Dunbar2016-06-071-0/+3
| | | | llvm-svn: 272022
* [lit] Improve logging with file redirection.Daniel Dunbar2016-06-074-9/+39
| | | | | | | | | - This will cause lit to automatically include the first 1K of data in redirected output files when a command fails (previously if the command failed, but the main point of the test was, say, a `FileCheck` later on, then the log wasn't helpful in showing why the command failed). llvm-svn: 272021
* Add Visual Studio Visualizer for ArrayRefMike Spertus2016-06-051-1/+12
| | | | | | Modeled after visualization of llvm::SmallVec llvm-svn: 271847
* AsmWriterEmitter.cpp assumes that all operands of a printed aliasSjoerd Meijer2016-06-031-3/+4
| | | | | | | | | | | will appear after a blank. This assumption does not hold in the ARM target. Patch by: Roger Ferrer Ibanez Differential Revision: http://reviews.llvm.org/D20234 llvm-svn: 271666
* Currently AsmWriterEmiter.cpp (used by tblgen -gen-asm-writer) does notSjoerd Meijer2016-06-031-2/+34
| | | | | | | | | | | | | consider the Predicates attached to InstAlias when generating printAliasInstr. This forces users of printAliasInstr to check those predicates beforehand. This commit adds them in the condition set of the IAPrinter object. Patch by: Roger Ferrer Ibanez Differential Revision: http://reviews.llvm.org/D20233 llvm-svn: 271665
* [lit] Improve readability of failing scripts.Daniel Dunbar2016-06-026-14/+69
| | | | | | | | | | | | | | | | | | | | | | | - This only applies to scripts executed by the _internal_ shell script interpreter. - This patch reworks the log to look more like a shell transcript, and be less verbose (but in the interest of calling attention to the important parts). Here is an example of the new format, for commands with/without failures and with/without output: ``` $ true $ echo hi hi $ false note: command had no output on stdout or stderr error: command failed with exit status 1 ``` llvm-svn: 271610
* [lit] Factor out a helper for shell command results.Daniel Dunbar2016-06-021-8/+22
| | | | llvm-svn: 271608
* Add "REQUIRES-ANY" feature testEric Fiselier2016-06-024-3/+19
| | | | | | | | | | | | | | | | Summary: This patch adds a "REQUIRES-ANY" feature test that is disjunctive. This marks a test as `UNSUPPORTED` if none of the specified features are available. Libc++ has the need to write feature test such as `// REQUIRES-ANY: c++98, c++03` when testing of behavior that is specific to older dialects but has since changed. Reviewers: rnk, ddunbar Subscribers: ddunbar, probinson, llvm-commits, cfe-commits Differential Revision: http://reviews.llvm.org/D20757 llvm-svn: 271468
* Update usage(), make sure srcdir is really empty.Joerg Sonnenberger2016-06-011-0/+2
| | | | llvm-svn: 271396
* Reference gdb python type printer scripts from SmallString, SmallVector, ↵David Blaikie2016-06-011-0/+107
| | | | | | ArrayRef, and StringRef llvm-svn: 271357
* Make it easier to process merges in a normal buildable directory tree byJoerg Sonnenberger2016-05-291-1/+9
| | | | | | allowing the user to specify the base directory of the checkout. llvm-svn: 271192
* FileCheck: dump command line context with empty inputXinliang David Li2016-05-271-0/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D20716 llvm-svn: 271047
* Apply clang-tidy's misc-move-constructor-init throughout LLVM.Benjamin Kramer2016-05-274-16/+18
| | | | | | No functionality change intended, maybe a tiny performance improvement. llvm-svn: 270997
* Avoid some copies by using const references.Benjamin Kramer2016-05-271-1/+1
| | | | | | | clang-tidy's performance-unnecessary-copy-initialization with some manual fixes. No functional changes intended. llvm-svn: 270988
* Add auto-exporting of symbols from tools so that plugins work on WindowsJohn Brawn2016-05-261-0/+488
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem with plugins on Windows is that when building a plugin DLL it needs to explicitly link against something (an exe or DLL) if it uses symbols from that thing, and that thing must explicitly export those symbols. Also there's a limit of 65535 symbols that can be exported. This means that currently plugins only work on Windows when using BUILD_SHARED_LIBS, and that doesn't work with MSVC. This patch adds an LLVM_EXPORT_SYMBOLS_FOR_PLUGINS option, which when enabled automatically exports from all LLVM tools the symbols that a plugin could want to use so that a plugin can link against a tool directly. Plugins can specify what tool they link against by using PLUGIN_TOOL argument to llvm_add_library. The option can also be enabled on Linux, though there all it should do is restrict the set of symbols that are exported as by default all symbols are exported. This option is currently OFF by default, as while I've verified that it works with MSVC, linux gcc, and cygwin gcc, I haven't tried mingw gcc and I have no idea what will happen on OSX. Also unfortunately we can't turn on LLVM_ENABLE_PLUGINS when the option is ON as bugpoint-passes needs to be loaded by both bugpoint.exe and opt.exe which is incompatible with this approach. Also currently clang plugins don't work with this approach, which will be fixed in future patches. Differential Revision: http://reviews.llvm.org/D18826 llvm-svn: 270839
* TableGen: Use StringRef instead of std::stringMatt Arsenault2016-05-252-4/+4
| | | | llvm-svn: 270741
* Fix Clang-tidy modernize-use-bool-literals in generated Target code; other ↵Eugene Zelenko2016-05-172-51/+80
| | | | | | | | | | | | minor fixes; other minor fixes. Make generated code more readable. Fix some Include What You Use warnings. Differential revision: http://reviews.llvm.org/D20317 llvm-svn: 269783
* SDAG: Make SelectCodeCommon return voidJustin Bogner2016-05-101-2/+3
| | | | | | | | | | | This means SelectCode unconditionally returns nullptr now. I'll follow up with a change to make that return void as well, but it seems best to keep that one very mechanical. This is part of the work to have Select return void instead of an SDNode *, which is in turn part of llvm.org/pr26808. llvm-svn: 269136
* [TableGen] AsmMatcher: support for default values for optional operandsSam Kolton2016-05-061-31/+117
| | | | | | | | | | | | | | Summary: This change allows to specify "DefaultMethod" for optional operand (IsOptional = 1) in AsmOperandClass that return default value for operand. This is used in convertToMCInst to set default values in MCInst. Previously if you wanted to set default value for operand you had to create custom converter method. With this change it is possible to use standard converters even when optional operands presented. Reviewers: tstellarAMD, ab, craig.topper Subscribers: jyknight, dsanders, arsenm, nhaustov, llvm-commits Differential Revision: http://reviews.llvm.org/D18242 llvm-svn: 268726
* [TableGen] Fix a memory leak when creating SwitchOpcodeMatchers.Craig Topper2016-05-061-1/+2
| | | | llvm-svn: 268712
OpenPOWER on IntegriCloud