summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert r374652: "[lit] Fix internal diff's --strip-trailing-cr and use it"Joel E. Denny2019-10-124-8/+8
| | | | | | This series of patches still breaks a Windows bot. llvm-svn: 374679
* [lit] Fix internal diff's --strip-trailing-cr and use itJoel E. Denny2019-10-124-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Using GNU diff, `--strip-trailing-cr` removes a `\r` appearing before a `\n` at the end of a line. Without this patch, lit's internal diff only removes `\r` if it appears as the last character. That seems useless. This patch fixes that. This patch also adds `--strip-trailing-cr` to some tests that fail on Windows bots when D68664 is applied. Based on what I see in the bot logs, I think the following is happening. In each test there, lit diff is comparing a file with `\r\n` line endings to a file with `\n` line endings. Without D68664, lit diff reads those files with Python's universal newlines support activated, causing `\r` to be dropped. However, with D68664, lit diff reads the files in binary mode instead and thus reports that every line is different, just as GNU diff does (at least under Ubuntu). Adding `--strip-trailing-cr` to those tests restores the previous behavior while permitting the behavior of lit diff to be more like GNU diff. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D68839 llvm-svn: 374652
* Revert 374629 "[sancov] Accommodate sancov and coverage report server for ↵Vitaly Buka2019-10-129-13/+11
| | | | | | | | | | | | use under Windows" http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/27650/steps/ninja%20check%201/logs/stdio http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/31759 http://lab.llvm.org:8011/builders/clang-s390x-linux-lnt/builds/15095 http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/21075 http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/31759 llvm-svn: 374636
* [sancov] Accommodate sancov and coverage report server for use under WindowsVitaly Buka2019-10-129-11/+13
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch makes the following changes to SanCov and its complementary Python script in order to resolve issues pertaining to non-UNIX file paths in JSON symbolization information: * Convert all paths to use forward slash. * Update `coverage-report-server.py` to correctly handle paths to sources which contain spaces. * Remove Linux platform restriction for all SanCov unit tests. All SanCov tests passed when ran on my local Windows machine. Patch by Douglas Gliner. Reviewers: kcc, filcab, phosek, morehouse, vitalybuka, metzman Reviewed By: vitalybuka Subscribers: vsk, Dor1s, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D51018 llvm-svn: 374629
* [sancov] Use LLVM Support library JSON writer in favor of individual ↵Vitaly Buka2019-10-123-78/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | implementation Summary: In this diff, I've replaced the individual implementation of `JSONWriter` with `json::OStream` provided by `llvm/Support/JSON.h`. Important Note: The output format of the JSON is considerably different compared to the original implementation. Important differences include: * New line for each entry in an array (should make diffs cleaner) * No space between keys and colon in attributed object entries. * Attributes with empty strings will now print the attribute name and a quote pair rather than excluding the attribute altogether Examples of these differences can be seen in the changes to the sancov tests which compare the JSON output. Patch by Douglas Gliner. Reviewers: kcc, filcab, phosek, morehouse, vitalybuka, metzman Subscribers: mehdi_amini, dexonsmith, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68752 llvm-svn: 374628
* [llvm-profdata] Make "malformed-ptr-to-counter-array.test" textualVedant Kumar2019-10-122-2/+47
| | | | | | | | | As pointed out in https://reviews.llvm.org/D66979 post-commit, making this test textual would make it more maintainable. Differential Revision: https://reviews.llvm.org/D68718 llvm-svn: 374617
* llvm-dwarfdump: Add verbose printing for debug_loclistsDavid Blaikie2019-10-111-1/+3
| | | | llvm-svn: 374582
* [Tests] Output of od can be lower or upper case (llvm-objcopy/yaml2obj).Kai Nacke2019-10-1111-28/+28
| | | | | | | | | | | | | | | The command `od -t x` is used to dump data in hex format. The LIT tests assumes that the hex characters are in lowercase. However, there are also platforms which use uppercase letter. To solve this issue the tests are updated to use the new `--ignore-case` option of FileCheck. Reviewers: Bigcheese, jakehehrlich, rupprecht, espindola, alexshap, jhenderson Differential Revision: https://reviews.llvm.org/D68693 llvm-svn: 374547
* [llvm-readobj] - Remove excessive fields when dumping "Version symbols".George Rimar2019-10-113-53/+41
| | | | | | | | | | | This removes a few fields that are not useful: "Section Name", "Address", "Offset" and "Link" (they duplicated the information available under the "Sections [" tag). Differential revision: https://reviews.llvm.org/D68704 llvm-svn: 374541
* [llvm-exegesis] Show noise cluster in analysis output.Clement Courbet2019-10-111-0/+23
| | | | | | | | | | | | Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68780 llvm-svn: 374533
* Fix test to avoid check-not matching the temp file absolute pathReid Kleckner2019-10-101-0/+3
| | | | | | Fix for PR43636 llvm-svn: 374404
* [MCA] Show aggregate over Average Wait times for the whole snippet (PR43219)Roman Lebedev2019-10-10150-0/+296
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As disscused in https://bugs.llvm.org/show_bug.cgi?id=43219, i believe it may be somewhat useful to show //some// aggregates over all the sea of statistics provided. Example: ``` Average Wait times (based on the timeline view): [0]: Executions [1]: Average time spent waiting in a scheduler's queue [2]: Average time spent waiting in a scheduler's queue while ready [3]: Average time elapsed from WB until retire stage [0] [1] [2] [3] 0. 3 1.0 1.0 4.7 vmulps %xmm0, %xmm1, %xmm2 1. 3 2.7 0.0 2.3 vhaddps %xmm2, %xmm2, %xmm3 2. 3 6.0 0.0 0.0 vhaddps %xmm3, %xmm3, %xmm4 3 3.2 0.3 2.3 <total> ``` I.e. we average the averages. Reviewers: andreadb, mattd, RKSimon Reviewed By: andreadb Subscribers: gbedwell, arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68714 llvm-svn: 374361
* Revert "[Tests] Output of od can be lower or upper case ↵Dmitri Gribenko2019-10-1011-1300/+1300
| | | | | | | | | (llvm-objcopy/yaml2obj)." This reverts commit r374343. It broke tests: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/19066 llvm-svn: 374358
* Revert "[test] Use system locale for mri-utf8.test"Thomas Preud'homme2019-10-102-22/+23
| | | | | | This reverts commit r374318 / b6f1d1fa0e3ee0e25f22414bf97c05276b934507. llvm-svn: 374349
* [llvm-readelf] - Do not enter an infinite loop when printing histogram.George Rimar2019-10-101-24/+67
| | | | | | | | | | This is similar to D68086. We are entering an infinite loop when dumping a histogram for a specially crafted .hash section with a loop in a chain. Differential revision: https://reviews.llvm.org/D68771 llvm-svn: 374344
* [Tests] Output of od can be lower or upper case (llvm-objcopy/yaml2obj).Kai Nacke2019-10-1011-1300/+1300
| | | | | | | | | | | | | | | The command `od -t x` is used to dump data in hex format. The LIT tests assumes that the hex characters are in lowercase. However, there are also platforms which use uppercase letter. To solve this issue the tests are updated to use the new `--ignore-case` option of FileCheck. Reviewers: Bigcheese, jakehehrlich, rupprecht, espindola, alexshap, jhenderson Differential Revision: https://reviews.llvm.org/D68693 llvm-svn: 374343
* MinidumpYAML: Add support for the memory info list streamPavel Labath2019-10-101-0/+42
| | | | | | | | | | | | | | | | | | | | | Summary: The implementation is fairly straight-forward and uses the same patterns as the existing streams. The yaml form does not attempt to preserve the data in the "gaps" that can be created by setting a larger-than-required header or entry size in the stream header, because the existing consumer (lldb) does not make use of the information in the gap in any way, and attempting to preserve that would make the implementation more complicated. Reviewers: amccarth, jhenderson, clayborg Subscribers: llvm-commits, lldb-commits, markmentovai, zturner, JosephTremoulet Tags: #llvm Differential Revision: https://reviews.llvm.org/D68645 llvm-svn: 374337
* [test] Use system locale for mri-utf8.testThomas Preud'homme2019-10-102-23/+22
| | | | | | | | | | | | | | | | | | | | | | | Summary: llvm-ar's mri-utf8.test test relies on the en_US.UTF-8 locale to be installed for its last RUN line to work. If not installed, the unicode string gets encoded (interpreted) as ascii which fails since the most significant byte is non zero. This commit changes the test to only rely on the system being able to encode the pound sign in its default encoding (e.g. UTF-16 for Microsoft Windows) by always opening the file via input/output redirection. This avoids forcing a given locale to be present and supported. A Byte Order Mark is also added to help recognizing the encoding of the file and its endianness. Reviewers: gbreynoo, MaskRay, rupprecht, JamesNagurne, jfb Subscribers: dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68472 llvm-svn: 374318
* llvm-dwarfdump: Support multiple debug_loclists contributionsDavid Blaikie2019-10-092-1/+45
| | | | | | | Also fixing the incorrect "offset" field being computed/printed for each location list. llvm-svn: 374232
* Re-land "[dsymutil] Fix handling of common symbols in multiple object files."Jonas Devlieghere2019-10-094-0/+39
| | | | | | | | The original patch got reverted because it hit a long-standing legacy issue on Windows that prevents files from being named `com`. Thanks Kristina & Jeremy for pointing this out. llvm-svn: 374178
* [llvm-exegesis] Explore LEA addressing modes.Clement Courbet2019-10-092-0/+32
| | | | | | | | | | | | | | | | | Summary: This will help for PR32326. This shows the well-known issue with `RBP` and `R13` as base registers. Reviewers: gchatelet Subscribers: tschuett, llvm-commits, RKSimon, andreadb Tags: #llvm Differential Revision: https://reviews.llvm.org/D68646 llvm-svn: 374146
* Revert r374139, "[dsymutil] Fix handling of common symbols in multiple ↵Jeremy Morse2019-10-094-39/+0
| | | | | | | | | object files." The added test files ("com", "com1.o", "com2.o") are reserved names on Windows, and makes 'git checkout' fail with a filesystem error. llvm-svn: 374144
* [dsymutil] Fix handling of common symbols in multiple object files.Jonas Devlieghere2019-10-094-0/+39
| | | | | | | | | | | | | For common symbols the linker emits only a single symbol entry in the debug map. This caused dsymutil to not relocate common symbols when linking DWARF coming form object files that did not have this entry. This patch fixes that by keeping track of common symbols in the object files and synthesizing a debug map entry for them using the address from the main binary. Differential revision: https://reviews.llvm.org/D68680 llvm-svn: 374139
* [dsymutil] Improve verbose output (NFC)Jonas Devlieghere2019-10-081-22/+44
| | | | | | | | | | | | The verbose output for finding relocations assumed that we'd always dump the DIE after (which starts with a newline) and therefore didn't include one itself. However, this isn't always true, leading to garbled output. This patch adds a newline to the verbose output and adds a line that says that the DIE is being kept (which isn't obvious otherwise). It also adds a 0x prefix to the relocations. llvm-svn: 374123
* [llvm-exegesis] Add options to SnippetGenerator.Clement Courbet2019-10-081-0/+24
| | | | | | | | | | | | | | | | Summary: This adds a `-max-configs-per-opcode` option to limit the number of configs per opcode. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68642 llvm-svn: 374054
* [MCA][LSUnit] Track loads and stores until retirement.Andrea Di Biagio2019-10-083-75/+72
| | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, loads and stores were only tracked by their corresponding queues in the LSUnit from dispatch until execute stage. In practice we should be more conservative and assume that memory opcodes leave their queues at retirement stage. Basically, loads should leave the load queue only when they have completed and delivered their data. We conservatively assume that a load is completed when it is retired. Stores should be tracked by the store queue from dispatch until retirement. In practice, stores can only leave the store queue if their data can be written to the data cache. This is mostly a mechanical change. With this patch, the retire stage notifies the LSUnit when a memory instruction is retired. That would triggers the release of LDQ/STQ entries. The only visible change is in memory tests for the bdver2 model. That is because bdver2 is the only model that defines the load/store queue size. This patch partially addresses PR39830. Differential Revision: https://reviews.llvm.org/D68266 llvm-svn: 374034
* [llvm-exegesis] Finish plumbing the `Config` field.Clement Courbet2019-10-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: Right now there are no snippet generators that emit the `Config` Field, but I plan to add it to investigate LEA operands for PR32326. What was broken was: - `Config` Was not propagated up until the BenchmarkResult::Key. - Clustering should really consider different configs as measuring different things, so we should stabilize on (Opcode, Config) instead of just Opcode. Reviewers: gchatelet Subscribers: tschuett, llvm-commits, lebedev.ri Tags: #llvm Differential Revision: https://reviews.llvm.org/D68629 llvm-svn: 374031
* [llvm-readobj/llvm-readelf] - Add checks for GNU-style to "all.test" test case.George Rimar2019-10-081-17/+101
| | | | | | | | | We do not check the GNU-style output when -all is given. This patch does that. Differential revision: https://reviews.llvm.org/D68462 llvm-svn: 374028
* [llvm-exegesis] Add stabilization test with configClement Courbet2019-10-081-0/+43
| | | | | | In preparation for D68629. llvm-svn: 374020
* [SampleFDO] Add compression support for any section in ExtBinary profile formatWei Mi2019-10-072-0/+16
| | | | | | | | | | | | | Previously ExtBinary profile format only supports compression using zlib for profile symbol list. In this patch, we extend the compression support to any section. User can select some or all of the sections to compress. In an experiment, for a 45M profile in ExtBinary format, compressing name table reduced its size to 24M, and compressing all the sections reduced its size to 11M. Differential Revision: https://reviews.llvm.org/D68253 llvm-svn: 373914
* [llvm-readelf/llvm-objdump] - Improve/refactor the implementation of ↵George Rimar2019-10-072-0/+85
| | | | | | | | | | | | | | | | | SHT_LLVM_ADDRSIG section dumping. This patch: * Adds a llvm-readobj/llvm-readelf test file for SHT_LLVM_ADDRSIG sections. (we do not have any) * Enables dumping of SHT_LLVM_ADDRSIG with --all. * Changes the logic to report a warning instead of an error when something goes wrong during dumping (allows to continue dumping SHT_LLVM_ADDRSIG and other sections on error). * Refactors a piece of logic to a new toULEB128Array helper which might be used for GNU-style dumping implementation. Differential revision: https://reviews.llvm.org/D68383 llvm-svn: 373890
* [test] Remove another two unnecessary uses of REQUIRES: target-windows. NFC.Martin Storsjo2019-10-042-3/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D68449 llvm-svn: 373780
* [llvm-ar][test] Clarified commentOwen Reynolds2019-10-041-0/+4
| | | | | | | The test is dependant on the installation of the en_US.UTF-8 locale. The reasoning for this is clarified in the amended comment. llvm-svn: 373737
* [llvm-readobj][mips] Implement GNU-style printing of .MIPS.abiflags sectionSimon Atanasyan2019-10-041-0/+29
| | | | | | | | In this patch `llvm-readobj` prints ASEs flags on a single line separated by a comma. GNU `readelf` prints each ASEs flag on a separate line. It will be fixed later. llvm-svn: 373732
* Revert [test] Remove locale dependency for mri-utf8.testOwen Reynolds2019-10-041-1/+5
| | | | | | This reverts r373700 (git commit b455ebf921c5c940c2366bec226959e3a4127fee) llvm-svn: 373728
* Revert "[Symbolize] Use the local MSVC C++ demangler instead of relying on ↵Martin Storsjo2019-10-042-0/+8
| | | | | | | | | dbghelp. NFC." This reverts SVN r373698, as it broke sanitizer tests, e.g. in http://lab.llvm.org:8011/builders/sanitizer-windows/builds/52441. llvm-svn: 373701
* [test] Remove locale dependency for mri-utf8.testThomas Preud'homme2019-10-041-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: llvm-ar's mri-utf8.test test relies on the en_US.UTF-8 locale to be installed for its last RUN line to work. If not installed, the unicode string gets encoded (interpreted) as ascii which fails since the most significant byte is non zero. This commit changes the call to open to use a binary literal of the UTF-8 encoding for the pound sign instead, thus bypassing the encoding step. Note that the echo to create the <pound sign>.txt file will work regardless of the locale because both the shell and the echo (in case it's not a builtin of the shell concerned) only care about ascii character to operate. Indeed, the mri-utf8.test file (and in particular the pound sign) is encoded in UTF-8 and UTF-8 guarantees only ascii characters can create bytes that can be interpreted as ascii characters (i.e. bytes with the most significant bit null). So the process to break down the filename in the line goes something along: - find an ascii chevron '>' - find beginning of the filename by removing ascii space-like characters - find ascii newline character indicating the end of the redirection (no semicolon ';', closing curly bracket '}' or parenthesis ')' or the like - create a file whose name is made of all the bytes in between beginning and end of filename *without interpretting them* Reviewers: gbreynoo, MaskRay, rupprecht, JamesNagurne, jfb Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68418 llvm-svn: 373700
* [Symbolize] Use the local MSVC C++ demangler instead of relying on dbghelp. NFC.Martin Storsjo2019-10-042-8/+0
| | | | | | | | | This allows making a couple llvm-symbolizer tests run in all environments. Differential Revision: https://reviews.llvm.org/D68133 llvm-svn: 373698
* [test] Remove a needless declaration of REQUIRES: target-windowsMartin Storsjo2019-10-041-1/+1
| | | | | | | | | This test only relies on running on a case insensitive file system, the exact target triple of the toolchain shouldn't matter. Differential Revision: https://reviews.llvm.org/D68136 llvm-svn: 373697
* [llvm-objdump][test] Move test to X86 dir to avoid errors disassembling on ↵Jordan Rupprecht2019-10-031-0/+0
| | | | | | non-x86 llvm-svn: 373676
* [llvm-objdump] Further rearrange llvm-objdump sections for compatabilityJordan Rupprecht2019-10-035-42/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more. I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump: * Archive headers * File headers * Section headers * Symbol table * Dwarf debugging * Relocations (if `--disassemble` is not used) * Section contents * Disassembly Reviewers: jhenderson, justice_adams, grimar, ychen, espindola Reviewed By: jhenderson Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay Tags: #llvm Differential Revision: https://reviews.llvm.org/D68066 llvm-svn: 373671
* [dsymutil] Tablegenify option parsingJonas Devlieghere2019-10-031-8/+6
| | | | | | | | | | | | | | | | | | | This patch reimplements command line option parsing in dsymutil with Tablegen and libOption. The main motivation for this change is to prevent clashes with other cl::opt options defined in llvm. Although it's a bit more heavyweight, it has some nice advantages such as no global static initializers and better separation between the code and the option definitions. I also used this opportunity to improve how dsymutil deals with incompatible options. Instead of having checks spread across the code, everything is now grouped together in verifyOptions. The fact that the options are no longer global means that we need to pass them around a bit more, but I think it's worth the trade-off. Differential revision: https://reviews.llvm.org/D68361 llvm-svn: 373622
* [yaml2obj] - Add a Size tag support for SHT_LLVM_ADDRSIG sections.George Rimar2019-10-031-2/+96
| | | | | | | | | It allows using "Size" with or without "Content" in YAML descriptions of SHT_LLVM_ADDRSIG sections. Differential revision: https://reviews.llvm.org/D68334 llvm-svn: 373610
* Recommit r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG ↵George Rimar2019-10-033-0/+312
| | | | | | | | | | | | | | | | | sections." Fix: call `consumeError()` for a case missed. Original commit message: SHT_LLVM_ADDRSIG is described here: https://llvm.org/docs/Extensions.html#sht-llvm-addrsig-section-address-significance-table This patch teaches tools to dump them and to parse the YAML declarations of such sections. Differential revision: https://reviews.llvm.org/D68333 llvm-svn: 373606
* Revert r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG ↵George Rimar2019-10-033-312/+0
| | | | | | | | | sections." It broke BB: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/18655/steps/test/logs/stdio llvm-svn: 373599
* [yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections.George Rimar2019-10-033-0/+312
| | | | | | | | | | | SHT_LLVM_ADDRSIG is described here: https://llvm.org/docs/Extensions.html#sht-llvm-addrsig-section-address-significance-table This patch teaches tools to dump them and to parse the YAML declarations of such sections. Differential revision: https://reviews.llvm.org/D68333 llvm-svn: 373598
* [llvm-readobj] - Stop using a precompiled binary in all.testGeorge Rimar2019-10-031-15/+24
| | | | | | | | | Having a precompiled binary here is excessive. I also added a few missing tags. Differential revision: https://reviews.llvm.org/D68386 llvm-svn: 373594
* [mips] Use llvm-readobj `-A` flag in test cases. NFCSimon Atanasyan2019-10-031-2/+2
| | | | llvm-svn: 373589
* [llvm-readobj][mips] Display MIPS specific info under --arch-specific flagSimon Atanasyan2019-10-035-16/+16
| | | | | | | Old options `--mips-plt-got`, `--mips-abi-flags`, '--mips-reginfo`, and `--mips-options` wiil be deleted in a separate patch. llvm-svn: 373588
* [llvm-readobj][mips] Do not show an error if GOT is missedSimon Atanasyan2019-10-031-8/+0
| | | | | | It is not an error if a file does not contain GOT. llvm-svn: 373587
OpenPOWER on IntegriCloud