summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [X86][BtVer2] Update the WriteLoad latency.Andrea Di Biagio2019-01-216-17/+17
| | | | | | | | | | | | | | | | | | r327630 introduced new write definitions for float/vector loads. Before that revision, WriteLoad was used by both integer/float (scalar/vector) load. So, WriteLoad had to conservatively declare a latency to 5cy. That is because the load-to-use latency for float/vector load is 5cy. Now that we have dedicated writes for float/vector loads, there is no reason why we should keep the latency of WriteLoad to 5cy. At the moment, WriteLoad is only used by scalar integer loads only; we can assume an optimstic 3cy latency for them. This patch changes that latency from 5cy to 3cy, and regenerates the affected scheduling/mca tests. Differential Revision: https://reviews.llvm.org/D56922 llvm-svn: 351742
* [llvm-objcopy] [COFF] Implement --only-sectionMartin Storsjo2019-01-191-0/+21
| | | | | | Differential Revision: https://reviews.llvm.org/D56873 llvm-svn: 351663
* [llvm-objcopy] [COFF] Implement --only-keep-debugMartin Storsjo2019-01-192-0/+135
| | | | | | Differential Revision: https://reviews.llvm.org/D56840 llvm-svn: 351662
* [llvm-objcopy] [COFF] Implement --strip-debugMartin Storsjo2019-01-191-0/+109
| | | | | | | | | Also remove sections similarly for --strip-all, --discard-all, --strip-unneeded. Differential Revision: https://reviews.llvm.org/D56839 llvm-svn: 351661
* [llvm-objcopy] [COFF] Add support for removing sectionsMartin Storsjo2019-01-191-0/+210
| | | | | | Differential Revision: https://reviews.llvm.org/D56683 llvm-svn: 351660
* [llvm-objcopy] [COFF] Add a testcase for patching the debug directory. NFC.Martin Storsjo2019-01-191-0/+64
| | | | | | | | | | The debug directory contains the rwa file address of itself, which is updated on write. Add a testcase for this existing functionality. Differential Revision: https://reviews.llvm.org/D56876 llvm-svn: 351659
* [llvm-objcopy] [COFF] Rename a test from .yaml to .test. NFC.Martin Storsjo2019-01-191-0/+0
| | | | | | | Tests named .yaml aren't executed by default in this directory (while they are within e.g. LLD). llvm-svn: 351657
* [elfabi] Add support for reading DT_NEEDED from binariesArmando Montanez2019-01-182-0/+92
| | | | | | | | | This patch gives elfabi the ability to read DT_NEEDED entries from ELF binaries to populate NeededLibs in TextAPI's ELFStub. Differential Revision: https://reviews.llvm.org/D55852 llvm-svn: 351592
* [LTO] Change test/tools/lto/no-bitcode.s requirement from arm to aarch64Simon Pilgrim2019-01-181-1/+1
| | | | | | | | | | | | Set the test to properly require aarch64 instead of arm. Otherwise, this test fails with LLVM_TARGETS_TO_BUILD='ARM;X86' bin/llvm-mc: : error: unable to get target for 'arm64-apple-ios7.0.0' Committed on behalf of @easyaspi314 (Devin) Differential Revision: https://reviews.llvm.org/D56472 llvm-svn: 351560
* [llvm-objdump] - Dump the archive headers when -all-headers is specified.George Rimar2019-01-181-0/+25
| | | | | | | | | | | When -all-headers is given it is supposed to dump all headers, but now it skips the archive headers for no reason. The patch fixes that. Differential revision: https://reviews.llvm.org/D56780 llvm-svn: 351547
* [WebAssembly] Fixing 2 more symbol offset related tests.Wouter van Oortmerssen2019-01-171-1/+1
| | | | llvm-svn: 351465
* [WebAssembly] Fixed objdump not parsing function headers.Wouter van Oortmerssen2019-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: objdump was interpreting the function header containing the locals declaration as instructions. To parse these without injecting target specific code in objdump, MCDisassembler::onSymbolStart was added to be implemented by the WebAssembly implemention. WasmObjectFile now returns a code offset for the "address" of a symbol, rather than the index. This is also more in-line with what other targets do. Also ensured that the AsmParser correctly puts each function in its own segment to enable this test case. Reviewers: sbc100, dschuff Subscribers: jgravelle-google, aheejin, sunfish, rupprecht, llvm-commits Differential Revision: https://reviews.llvm.org/D56684 llvm-svn: 351460
* [llvm-readobj][ELF]Add demangling supportJames Henderson2019-01-171-0/+234
| | | | | | | | | | | | | | | | | | | | | This change adds demangling support to the ELF side of llvm-readobj, under the switch --demangle/-C. The following places are demangled: symbol table dumps (static and dynamic), relocation dumps (static and dynamic), addrsig dumps, call graph profile dumps, and group section signature symbols. Although GNU readelf doesn't support demangling, it is still a useful feature to have, and brings it on a par with llvm-objdump's capabilities. This fixes https://bugs.llvm.org/show_bug.cgi?id=40054. Reviewed by: grimar, rupprecht Differential Revision: https://reviews.llvm.org/D56791 llvm-svn: 351450
* [X86][BtVer2] Update latency of horizontal operations.Andrea Di Biagio2019-01-167-95/+95
| | | | | | | | | | | | | | | | On Jaguar, horizontal adds/subs have local forwarding disable. That means, we pay a compulsory extra cycle of write-back stage, and the value is not available until the end of that stage. This patch changes the latency of horizontal operations by adding an extra cycle. With this patch, latency numbers now match what is reported by perf. I plan to send another patch to also 'fix' the latency of shuffle operations (on Jaguar, local forwarding is disabled for vector shuffles too). Differential Revision: https://reviews.llvm.org/D56777 llvm-svn: 351366
* [elfabi] Add support for reading DT_SONAME from binariesArmando Montanez2019-01-1611-17/+408
| | | | | | | | | | | | | | This change gives the llvm-elfabi tool the ability to read DT_SONAME from a binary ELF file into an ELFStub. Added: - DynamicEntries struct for storing dynamic entries that are relevant to elfabi. - terminatedSubstr() retrieves a null-terminated substring from a StringRef. - appendToError() appends a string to an error, allowing more specific error messages. Differential Revision: https://reviews.llvm.org/D55629 llvm-svn: 351361
* [llvm-readobj] Set correct offset when dumping hex section output.Sid Manning2019-01-161-0/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D56369 llvm-svn: 351356
* [llvm-nm] Allow --size-sort to print symbols with only Symbol sizeSaurabh Badhwar2019-01-161-0/+12
| | | | | | | | | | | | | | | | | | | Summary: When llvm-nm is passed only the --size-sort option for an object file, there is no output generated. The commit modifies the behavior to print the symbols sorted and their size which is also inline with the output of the GNU nm tool. Signed-off-by: Saurabh Badhwar <sbsaurabhbadhwar9@gmail.com> Reviewers: enderby, rupprecht Reviewed By: rupprecht Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56063 llvm-svn: 351347
* [llvm-rc] Support '--' for delimiting options from input pathsMartin Storsjo2019-01-1621-27/+27
| | | | | | | | | | This allows avoiding conflicts between paths that begin with the same chars as some llvm-rc options (which can be used with either slashes or dashes). Differential Revision: https://reviews.llvm.org/D56743 llvm-svn: 351305
* [WebAssembly] Store section alignment as a power of 2Sam Clegg2019-01-165-3/+3
| | | | | | | | | | | This change bumps for version number of the wasm object file metadata. See https://github.com/WebAssembly/tool-conventions/pull/92 Differential Revision: https://reviews.llvm.org/D56758 llvm-svn: 351285
* [llvm-ar] Resubmit recursive thin archive test with fix for full path names ↵Jordan Rupprecht2019-01-151-0/+13
| | | | | | and better error messages llvm-svn: 351256
* llvm-objdump -m -D should disassemble all text segmentsMichael Trent2019-01-152-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When running llvm-objdump with the -macho option objdump will by default disassemble only the __TEXT,__text section (or __TEXT_EXEC,__text when disassembling MH_KEXT_BUNDLE files). The -disassemble-all option is treated no diferently than -disassemble. This change upates llvm-objdump's MachO parsing code to disassemble all __text sections found in a file when -disassemble-all is specified. This is useful for disassembling files with more than one __text section, or when disassembling files whose __text section is not present in __TEXT. I added a lit test case that verifies "llvm-objdump -m -d" and "llvm-objdump -m -D" produce the expected results on a reference binary. I also updated the CommandGuide documentation for llvm-objdump.rst and verified it renders correctly as man and html. rdar://42899338 Reviewers: ab, pete, lhames Reviewed By: lhames Subscribers: rupprecht, llvm-commits Differential Revision: https://reviews.llvm.org/D56649 llvm-svn: 351238
* [llvm-readelf] Allow single-letter flags to be merged.Jordan Rupprecht2019-01-153-0/+190
| | | | | | | | | | | | | | | | | | | Summary: This patch adds support for merged arguments (e.g. -SW == -S -W) for llvm-readelf. No changes are intended for llvm-readobj. There are a few short flags (-sd, -sr, -st, -dt) that would conflict with grouped single letter flags, and having only some grouped flags might be confusing. So, allow merged flags for readelf compatibility, but force separate args for llvm-readobj. From what I can tell, these two-letter flags are only used with llvm-readobj, not llvm-readelf. This fixes PR40064. Reviewers: jhenderson, kristina, echristo, phosek Reviewed By: jhenderson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56629 llvm-svn: 351205
* [llvm-objcopy] Use SHT_NOTE for added note sections.Jordan Rupprecht2019-01-152-0/+58
| | | | | | | | | | | | | | | | | | | Summary: Fix llvm-objcopy to add .note sections as SHT_NOTEs. GNU objcopy overrides section flags for special sections. For `.note` sections (with the exception of `.note.GNU-stack`), SHT_NOTE is used. Many other sections are special cased by libbfd, but `.note` is the only special section I can seem to find being used with objcopy --add-section. See `.note` in context of the full list of special sections here: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=bfd/elf.c;h=eb3e1828e9c651678b95a1dcbc3b124783d1d2be;hb=HEAD#l2675 Reviewers: jhenderson, alexshap, jakehehrlich, espindola Reviewed By: jhenderson Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D56570 llvm-svn: 351204
* Remove irrelevant references to legacy git repositories fromJames Y Knight2019-01-153-6/+6
| | | | | | | | | compiler identification lines in test-cases. (Doing so only because it's then easier to search for references which are actually important and need fixing.) llvm-svn: 351200
* [llvm-objcopy] [COFF] Implement --strip-all[-gnu] for symbolsMartin Storsjo2019-01-151-0/+55
| | | | | | Differential Revision: https://reviews.llvm.org/D56481 llvm-svn: 351174
* [llvm-objcopy] [COFF] Remove pointless comment chars from .test files. NFC.Martin Storsjo2019-01-152-30/+30
| | | | llvm-svn: 351173
* [llvm-ar] Temporarily remove failing test which is breaking buildbotsJordan Rupprecht2019-01-141-13/+0
| | | | llvm-svn: 351126
* [llvm-ar] Flatten thin archives.Jordan Rupprecht2019-01-148-0/+48
| | | | | | | | | | | | | | | | | | | | | | Summary: Normal behavior for GNU ar is to flatten thin archives when adding them to another thin archive, i.e. add the members directly instead of nesting the archive. Some refactoring done as part of this patch to ease things: - Consolidate `addMember`/`addLibMember` methods - Rename `addMember` to `addChildMember` to make it more visibly different at the call site that an archive child is passed instead of a regular member - Pass in a separate vector and splice it back into position instead of passing a vector + optional Pos (which makes expanding libs tricky) This fixes PR37530 as raised by https://github.com/ClangBuiltLinux/linux/issues/279. Reviewers: mstorsjo, pcc, ruiu Reviewed By: mstorsjo Subscribers: llvm-commits, tpimh, nickdesaulniers Differential Revision: https://reviews.llvm.org/D56508 llvm-svn: 351120
* [llvm-objcopy] [COFF] Remove unreferenced undefined externals with ↵Martin Storsjo2019-01-143-1/+12
| | | | | | | | --strip-unneeded. Differential Revision: https://reviews.llvm.org/D56660 llvm-svn: 351099
* [llvm-objcopy] [COFF] Test absolute symbols wrt --strip-unneeded and ↵Martin Storsjo2019-01-143-0/+8
| | | | | | | | --discard-all. NFC. Differential Revision: https://reviews.llvm.org/D56659 llvm-svn: 351098
* [llvm-symbolizer] Add -addresses, -a as aliases for -print-addressDmitry Venikov2019-01-141-0/+2
| | | | | | | | | | | | | | Summary: Provides -addresses, -a as aliases for -print-address. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40067. Reviewers: jhenderson, ruiu, rnk, fjricci Reviewed By: jhenderson Subscribers: rupprecht, llvm-commits Differential Revision: https://reviews.llvm.org/D56635 llvm-svn: 351043
* [llvm-objdump] - Change the output for --all-headers.George Rimar2019-01-121-0/+20
| | | | | | | | | | | This is for https://bugs.llvm.org/show_bug.cgi?id=40008, it starts printing the file headers when --all-headers is given and do a minor cosmetic change. Differential revision: https://reviews.llvm.org/D56588 llvm-svn: 351006
* [llvm-mca] Update tests for Exynos (NFC)Evandro Menezes2019-01-114-0/+46
| | | | | | Update test cases for Exynos M4. llvm-svn: 350961
* [llvm-objcopy][NFC] Consistenly use two dashes for flags in tests.Jordan Rupprecht2019-01-11101-199/+203
| | | | | | | | | | | | | | | | | | | | | | | Summary: As pointed out in D53667, our use of hyphens in flags can be inconsistent, mixing `-` with `--`. This change makes all long style flags use `--`. Automatically changed via: ``` find test/tools/llvm-objcopy/ELF -type f | xargs sed -i 's/ -\([a-zA-Z]\{3\}\)/ --\1/g' ``` Two false positives were manually fixed/reverted. Reviewers: jhenderson, espindola, alexshap Reviewed By: jhenderson Subscribers: emaste, javed.absar, arichardson, fedor.sergeev, jakehehrlich, llvm-commits Differential Revision: https://reviews.llvm.org/D56513 llvm-svn: 350944
* [llvm-objcopy] [COFF] Implmement --strip-unneeded and -x/--discard-all for ↵Martin Storsjo2019-01-113-0/+84
| | | | | | | | symbols Differential Revision: https://reviews.llvm.org/D56480 llvm-svn: 350927
* [llvm-objcopy] [COFF] Fix writing object files without symbols/string tableMartin Storsjo2019-01-112-0/+17
| | | | | | | | | | Previously, this was broken - by setting PointerToSymbolTable to zero but still actually writing the string table length, the object file header was corrupted. Differential Revision: https://reviews.llvm.org/D56584 llvm-svn: 350926
* [llvm-symbolizer] Add -exe, -e as aliases to -objDmitry Venikov2019-01-111-0/+4
| | | | | | | | | | | | | | Summary: Provides -exe, -e as aliases to -obj. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40071 Reviewers: ruiu, rnk, fjricci, jhenderson Reviewed By: jhenderson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56580 llvm-svn: 350925
* [llvm-objdump][MachO] Disable some invalid input testsFrancis Visoiu Mistrih2019-01-101-9/+0
| | | | | | | It causes some (but not all) bots to fail. I'll look into it tomorrow morning. Remove the tests for now to make the bots green. llvm-svn: 350908
* [llvm-objcopy] [COFF] Fix a test matching pathnames for Windows. NFC.Martin Storsjo2019-01-101-1/+1
| | | | llvm-svn: 350899
* [llvm-objcopy] [COFF] Add support for removing symbolsMartin Storsjo2019-01-103-0/+90
| | | | | | Differential Revision: https://reviews.llvm.org/D55881 llvm-svn: 350893
* [llvm-objdump][MachO] Fix test to work on WindowsFrancis Visoiu Mistrih2019-01-101-1/+1
| | | | | | This fails in http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/3208/steps/stage%201%20check/logs/stdio. llvm-svn: 350871
* [llvm-objdump][MachO] Fix error reporting after r350848 and r350849Francis Visoiu Mistrih2019-01-101-3/+2
| | | | llvm-svn: 350851
* [llvm-objdump][MachO] Use the -dsym file name when reporting errorsFrancis Visoiu Mistrih2019-01-101-0/+7
| | | | | | Instead of using the binary filename. llvm-svn: 350849
* [llvm-objdump][MachO] Correctly handle the llvm::Error when -dsym has errorsFrancis Visoiu Mistrih2019-01-101-0/+3
| | | | | | | | | In an assert build, the Error gets destroyed and we get "Program aborted due to an unhandled Error:". In release, we get an empty message. llvm-svn: 350848
* [llvm-objdump] - Do not include reserved undefined symbol in -t output.George Rimar2019-01-103-3/+0
| | | | | | | | | | | | | | | | | | | | This is https://bugs.llvm.org/show_bug.cgi?id=26892, GNU objdump hides the special symbol entry: SYMBOL TABLE: 000000000000a7e0 l F .text 00000000000003f9 bi_copymodules while llvm-objdump does not: SYMBOL TABLE: 0000000000000000 *UND* 00000000 000000000000a7e0 l F .text 000003f9 bi_copymodules Patch makes the behavior of the llvm-objdump to be consistent with the GNU objdump. Differential revision: https://reviews.llvm.org/D56076 llvm-svn: 350840
* [llvm-symbolizer] Add -p as alias to -pretty-printDmitry Venikov2019-01-101-2/+3
| | | | | | | | | | | | | | Summary: Provides -p as a short alias for -pretty-print. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40076 Reviewers: samsonov, khemant, ruiu, rnk, fjricci, jhenderson Reviewed By: jhenderson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56542 llvm-svn: 350832
* [llvm-symbolizer] Add support for specifying addresses on command-lineJames Henderson2019-01-101-0/+19
| | | | | | | | | | | | | | | | See https://bugs.llvm.org/show_bug.cgi?id=40070. GNU addr2line accepts input addresses both on the command-line and via stdin. llvm-symbolizer previously only supported the latter. This change adds support for the former. As with addr2line, the new behaviour is to only look for addresses on stdin if no positional arguments were provided to llvm-symbolizer. Reviewed by: ruiu Differential Revision: https://reviews.llvm.org/D56272 llvm-svn: 350821
* [llvm-objdump] - Print symbol addressed when dumping disassembly output (-d)George Rimar2019-01-091-0/+29
| | | | | | | | | | | | | | | | | | | | When GNU objdump dumps the input with -d it prints the symbol addresses, for example: 0000000000000031 <foo>: 31: 00 00 add %al,(%rax) ... llvm-objdump currently does not do that. Patch changes the behavior to match the GNU objdump. That is useful for implementing -z/--disassemble-zeroes (D56083), it allows omitting first zero bytes and keep the information about the symbol address in the output. Differential revision: https://reviews.llvm.org/D56123 llvm-svn: 350726
* [llvm-profdata] add value-cutoff functionality in show commandRong Xu2019-01-083-3/+47
| | | | | | | | | | | | | This patch improves llvm-profdata show command: (1) add -value-cutoff=<N> option: Show only those functions whose max count values are greater or equal to N. (2) add -list-below-cutoff option: Only output names of functions whose max count value are below the cutoff. (3) formats value-profile counts and prints out percentage. Differential Revision: https://reviews.llvm.org/D56342 llvm-svn: 350673
* [PGO] Revert r350579 to fix commit message.Rong Xu2019-01-083-47/+3
| | | | | | Will re-commit it using the correct commit message. llvm-svn: 350670
OpenPOWER on IntegriCloud