summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-mca] Update the Exynos test cases (NFC)Evandro Menezes2019-01-081-18/+18
| | | | | | Add more entropy to the test cases. llvm-svn: 350662
* [llvm-readobj] Don't print '@' at end of unversioned dynsym namesJames Henderson2019-01-084-32/+32
| | | | | | | | | | | | | This fixes https://bugs.llvm.org/show_bug.cgi?id=40097. The problem was caused by a regression in r188022. See also r350614. Reviewed by: rupprecht, mstorsjo, Higuoxing, jakehehrlich Differential Revision: https://reviews.llvm.org/D56319 llvm-svn: 350615
* [dsymutil] Upstream unobfuscation logic.Jonas Devlieghere2019-01-077-0/+213
| | | | | | | | | | The unobufscation support for BCSymbolMaps was the last piece of code that hasn't been upstreamed yet. This patch contains a reworked version of the existing code and relevant tests. Differential revision: https://reviews.llvm.org/D56346 llvm-svn: 350580
* [PGO] Use SourceFileName rather module name in PGOFuncNameRong Xu2019-01-073-3/+47
| | | | | | | | | | In LTO or Thin-lto mode (though linker plugin), the module names are of temp file names which are different for different compilations. Using SourceFileName avoids the issue. This should not change any functionality for current PGO as all the current callers of getPGOFuncName() is before LTO. llvm-svn: 350579
* [ObjectYAML] [COFF] Support multiple symbols with the same nameMartin Storsjo2019-01-071-0/+74
| | | | | | Differential Revision: https://reviews.llvm.org/D56294 llvm-svn: 350566
* [elfabi] Add option to manually specify file read formatArmando Montanez2019-01-072-0/+29
| | | | | | Although llvm-elfabi will attempt to read input files without needing the format to be manually specified, doing so has the potential to introduce extraneous errors that can hinder debugging (since multiple readers may fail in attempts to read the file). This change allows the input file format to be manually specified to force elfabi to use a single reader. This makes it easier to test and debug errors specific to a given reader. llvm-svn: 350545
* [llvm-objcopy] Handle -O <format> flag.Jordan Rupprecht2019-01-074-0/+257
| | | | | | | | | | | | | | | | | Summary: The -O flag is currently being mostly ignored; it's only checked whether or not the output format is "binary". This adds support for a few formats (e.g. elf64-x86-64), so that when specified, the output can change between 32/64 bit and sizes/alignments are updated accordingly. This fixes PR39135 Reviewers: jakehehrlich, jhenderson, alexshap, espindola Reviewed By: jhenderson Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D53667 llvm-svn: 350541
* [llvm-nm] Add --portability as alias for --format=posixJames Henderson2019-01-071-0/+5
| | | | | | | | | | | | | GNU nm supports this alias, so supporting it in llvm-nm makes it easier to transition between the two. Fixes https://bugs.llvm.org/show_bug.cgi?id=40002 Reviewed by: mstorsjo, rupprecht Differential Revision: https://reviews.llvm.org/D56312 llvm-svn: 350522
* [gn build] Commit change that should have been in r350410.Nico Weber2019-01-041-1/+1
| | | | llvm-svn: 350416
* [elfabi] Introduce tool for ELF TextAPIArmando Montanez2019-01-036-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | Follow up for D53051 This patch introduces the tool associated with the ELF implementation of TextAPI (previously llvm-tapi, renamed for better distinction). This tool will house a number of features related to enalysis and manipulation of shared object's exposed interfaces. The first major feature for this tool is support for producing binary stubs that are useful for compile-time linking of shared objects. This patch introduces beginnings of support for reading binary ELF objects to work towards that goal. Added: - elfabi tool. - support for reading architecture from a binary ELF file into an ELFStub. - Support for writing .tbe files. Differential Revision: https://reviews.llvm.org/D55352 llvm-svn: 350341
* [llvm-objcopy][ELF] Implement a mutable section visitor that updates ↵Jordan Rupprecht2019-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | size-related fields (Size, EntrySize, Align) before layout. Summary: Fix EntrySize, Size, and Align before doing layout calculation. As a side cleanup, this removes a dependence on sizeof(Elf_Sym) within BinaryReader, so we can untemplatize that. This unblocks a cleaner implementation of handling the -O<format> flag. See D53667 for a previous attempt. Actual implementation of the -O<format> flag will come in an upcoming commit, this is largely a NFC (although not _totally_ one, because alignment on binary input was actually wrong before). Reviewers: jakehehrlich, jhenderson, alexshap, espindola Reviewed By: jhenderson Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D56211 llvm-svn: 350336
* Python compat - iteritems() vs. items()Serge Guelton2019-01-031-1/+1
| | | | | | | | Always use `items()` and introduce extra `list(...)` call when needed. Differential Revision: https://reviews.llvm.org/D56257 llvm-svn: 350312
* Python compat - portable way of raising exceptionsSerge Guelton2019-01-031-13/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D56256 llvm-svn: 350311
* [NFC] Remove unused Python importSerge Guelton2019-01-031-1/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D56254 llvm-svn: 350310
* Python compat - print statementSerge Guelton2019-01-031-0/+2
| | | | | | | | | Make sure all print statements are compatible with Python 2 and Python3 using the `from __future__ import print_function` statement. Differential Revision: https://reviews.llvm.org/D56249 llvm-svn: 350307
* [llvm-readobj] [COFF] Print the symbol index for relocationsMartin Storsjo2019-01-031-3/+3
| | | | | | | | | | There can be multiple local symbols with the same name (for e.g. comdat sections), and thus the symbol name itself isn't enough to disambiguate symbols. Differential Revision: https://reviews.llvm.org/D56140 llvm-svn: 350288
* [gold] emit assembly listing from gold plugin on LTO stageTeresa Johnson2019-01-021-0/+25
| | | | | | | | | | | | | | | | | | Summary: Sometimes it's useful to emit assembly after LTO stage to modify it manually. Emitting precodegen bitcode file (via save-temps plugin option) and then feeding it to llc doesn't always give the same binary as original. This patch is simpler alternative to https://reviews.llvm.org/D24020. Patch by Denis Bakhvalov. Reviewers: mehdi_amini, tejohnson Reviewed By: tejohnson Subscribers: MaskRay, inglorion, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D56114 llvm-svn: 350276
* llvm-dwarfdump: Skip address index info (and dump only the address, if ↵David Blaikie2018-12-241-0/+77
| | | | | | | | found) when non-verbose dumping addrx forms There's a few bugs here still - demonstrated with FIXITs in the test. llvm-svn: 350046
* llvm-dwarfdump: Dump the section name/number for addr attributesDavid Blaikie2018-12-221-1/+1
| | | | llvm-svn: 350009
* Add missing -oso-prepend-path to dsymutil test.Adrian Prantl2018-12-201-1/+1
| | | | | | Thanks to Galina Kistanova for pointing this out! llvm-svn: 349793
* [llvm-objcopy] - Do not drop the OS/ABI and ABIVersion fields of ELF headerGeorge Rimar2018-12-201-0/+16
| | | | | | | | | | | This is https://bugs.llvm.org/show_bug.cgi?id=40005, Patch teaches llvm-objcopy to preserve OS/ABI and ABIVersion fields of ELF header. (Currently, it drops them to zero). Differential revision: https://reviews.llvm.org/D55886 llvm-svn: 349738
* [yaml2obj/obj2yaml] - Support dumping/parsing ABI version.George Rimar2018-12-201-0/+16
| | | | | | | | | | | These tools were assuming ABI version is 0, that is not always true. Patch teaches them to work with that field. Differential revision: https://reviews.llvm.org/D55884 llvm-svn: 349737
* [llvm-mca] Rename directory for the Cortex tests (NFC)Evandro Menezes2018-12-192-0/+0
| | | | llvm-svn: 349688
* [llvm-mca] Update Exynos test cases (NFC)Evandro Menezes2018-12-192-108/+0
| | | | llvm-svn: 349687
* llvm-dwarfdump: Improve/fix pretty printing of array dimensionsDavid Blaikie2018-12-191-3/+59
| | | | | | | | | | | | | | This is to address post-commit feedback from Paul Robinson on r348954. The original commit misinterprets count and upper bound as the same thing (I thought I saw GCC producing an upper bound the same as Clang's count, but GCC correctly produces an upper bound that's one less than the count (in C, that is, where arrays are zero indexed)). I want to preserve the C-like output for the common case, so in the absence of a lower bound the count (or one greater than the upper bound) is rendered between []. In the trickier cases, where a lower bound is specified, a half-open range is used (eg: lower bound 1, count 2 would be "[1, 3)" and an unknown parts use a '?' (eg: "[1, ?)" or "[?, 7)" or "[?, ? + 3)"). Reviewers: aprantl, probinson, JDevlieghere Differential Revision: https://reviews.llvm.org/D55721 llvm-svn: 349670
* [AArch64] Improve the Exynos M3 pipeline modelEvandro Menezes2018-12-191-1/+1
| | | | llvm-svn: 349652
* [llvm-mca] Split test (NFC)Evandro Menezes2018-12-192-29/+56
| | | | | | | Split the Exynos test of the register offset addressing mode into separate loads and stores tests. llvm-svn: 349651
* [llvm-objdump] - Demangle the symbols when printing symbol table and ↵George Rimar2018-12-191-0/+23
| | | | | | | | | | | | | | | relocations. This is https://bugs.llvm.org/show_bug.cgi?id=40009, llvm-objdump does not demangle the symbols when prints symbol table and/or relocations. Patch teaches it to do that. Differential revision: https://reviews.llvm.org/D55821 llvm-svn: 349613
* [llvm-objcopy] Initial COFF supportMartin Storsjo2018-12-195-0/+754
| | | | | | | | | This is an initial implementation of no-op passthrough copying of COFF with objcopy. Differential Revision: https://reviews.llvm.org/D54939 llvm-svn: 349605
* [llvm-mca] Improve test (NFC)Evandro Menezes2018-12-181-18/+56
| | | | | | Add more instruction variations for Exynos. llvm-svn: 349567
* [llvm-mca] Update the Exynos test cases (NFC)Evandro Menezes2018-12-185-49/+60
| | | | | | Add more entropy to the test cases. llvm-svn: 349537
* [llvm-dwarfdump] - Do not error out on R_X86_64_DTPOFF64/R_X86_64_DTPOFF32 ↵George Rimar2018-12-181-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | relocations. This is https://bugs.llvm.org/show_bug.cgi?id=39992, If we have the following code (test.cpp): thread_local int tdata = 24; and build an .o file with debug information: clang --target=x86_64-pc-linux -c bar.cpp -g Then object produced may have R_X86_64_DTPOFF64/R_X86_64_DTPOFF32 relocations. (clang emits R_X86_64_DTPOFF64 and gcc emits R_X86_64_DTPOFF32 for the code above for me) Currently, llvm-dwarfdump fails to compute this TLS relocation when dumping object and reports an error: failed to compute relocation: R_X86_64_DTPOFF64, Invalid data was encountered while parsing the file This relocation represents the offset in the TLS block and resolved by the linker, but this info is unavailable at the point when the object file is dumped by this tool. The patch adds the simple evaluation for such relocations to avoid emitting errors. Resulting behavior seems to be equal to GNU dwarfdump. Differential revision: https://reviews.llvm.org/D55762 llvm-svn: 349476
* DebugInfo: Update gold plugin tests due to CU attribute reordering in r349207David Blaikie2018-12-171-2/+2
| | | | llvm-svn: 349395
* [MCA] Add support for BeginGroup/EndGroup.Andrea Di Biagio2018-12-171-10/+10
| | | | llvm-svn: 349354
* [MCA] Don't assume that createMCInstrAnalysis() always returns a valid pointer.Andrea Di Biagio2018-12-172-0/+75
| | | | | | | | | | Class InstrBuilder wrongly assumed that llvm targets were always able to return a non-null pointer when createMCInstrAnalysis() was called on them. This was causing crashes when simulating executions for targets that don't provide an MCInstrAnalysis object. This patch fixes the issue by making MCInstrAnalysis optional. llvm-svn: 349352
* [llvm-xray] Support for PIEPetr Hosek2018-12-142-0/+11
| | | | | | | | | | When the instrumented binary is linked as PIE, we need to apply the relative relocations to sleds. This is handled by the dynamic linker at runtime, but when processing the file we have to do it ourselves. Differential Revision: https://reviews.llvm.org/D55542 llvm-svn: 349120
* [llvm-size][libobject] Add explicit "inTextSegment" methods similar to ↵Jordan Rupprecht2018-12-132-2/+57
| | | | | | | | | | | | | | | | | | | | | "isText" section methods to calculate size correctly. Summary: llvm-size uses "isText()" etc. which seem to indicate whether the section contains code-like things, not whether or not it will actually go in the text segment when in a fully linked executable. The unit test added (elf-sizes.test) shows some types of sections that cause discrepencies versus the GNU size tool. llvm-size is not correctly reporting sizes of things mapping to text/data segments, at least for ELF files. This fixes pr38723. Reviewers: echristo, Bigcheese, MaskRay Reviewed By: MaskRay Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D54369 llvm-svn: 349074
* DebugInfo/DWARF: Pretty print subroutine typesDavid Blaikie2018-12-121-0/+45
| | | | | | | | Doesn't handle varargs and other fun things, but it's a start. (also doesn't print these strictly as valid C++ when it's a pointer to function, it'll print as "void(int)*" instead of "void (*)(int)") llvm-svn: 348965
* DebugInfo/DWARF: Improve dumping of pointers to members ('int foo::*' rather ↵David Blaikie2018-12-121-3/+17
| | | | | | than 'int*') llvm-svn: 348962
* llvm-dwarfdump: Dump array dimensions in stringified type namesDavid Blaikie2018-12-121-0/+179
| | | | llvm-svn: 348954
* [llvm-readelf] Add -e/--headers support to readobj/elfSid Manning2018-12-111-0/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D55298 llvm-svn: 348859
* [AArch64] Refactor the Exynos scheduling predicatesEvandro Menezes2018-12-103-50/+47
| | | | | | | | | Refactor the scheduling predicates based on `MCInstPredicate`. In this case, for the Exynos processors. Differential revision: https://reviews.llvm.org/D55345 llvm-svn: 348774
* [llvm-mca] Add new tests for Exynos (NFC)Evandro Menezes2018-12-103-0/+150
| | | | llvm-svn: 348766
* [llvm-exegesis] Also check latency mode in local lit.Clement Courbet2018-12-101-2/+6
| | | | | | | | | | Summary: This should avoid failing on old CPUs that do not have a cycle counter. Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D55416 llvm-svn: 348740
* [COFF] Map truncated .eh_frame section nameMartin Storsjo2018-12-082-0/+132
| | | | | | | | | | | | | | | PE/COFF sections can have section names truncated to 8 chars, in order to have the name available at runtime. (The string table, where long untruncated names are stored, isn't loaded at runtime.) This allows various llvm tools to dump the .eh_frame section from such executables. Patch by Peiyuan Song! Differential Revision: https://reviews.llvm.org/D55407 llvm-svn: 348708
* [llvm-mca][x86] Add RDSEED instruction resource tests for GLMSimon Pilgrim2018-12-071-0/+39
| | | | llvm-svn: 348624
* [llvm-mca][x86] Add missing AES instruction resource testsSimon Pilgrim2018-12-074-0/+292
| | | | | | Add missing non-VEX instructions llvm-svn: 348623
* [llvm-mca][x86] Add RDRAND/RDSEED instruction resource testsSimon Pilgrim2018-12-0713-0/+529
| | | | llvm-svn: 348622
* Fix test/tools/llvm-mca/AArch64/Exynos/direct-branch.s on MacHans Wennborg2018-12-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | It was failing as below. Adding a triple seems to help. -- : 'RUN: at line 2';   /work/llvm.combined/build.release/bin/llvm-mca -march=aarch64 -mcpu=exynos-m1 -resource-pressure=false < /work/llvm.combined/llvm/test/tools/llvm-mca/AArch64/Exynos/direct-branch.s | /work/llvm.combined/build.release/bin/FileCheck /work/llvm.combined/llvm/test/tools/llvm-mca/AArch64/Exynos/direct-branch.s -check-prefixes=ALL,M1 : 'RUN: at line 3';   /work/llvm.combined/build.release/bin/llvm-mca -march=aarch64 -mcpu=exynos-m3 -resource-pressure=false < /work/llvm.combined/llvm/test/tools/llvm-mca/AArch64/Exynos/direct-branch.s | /work/llvm.combined/build.release/bin/FileCheck /work/llvm.combined/llvm/test/tools/llvm-mca/AArch64/Exynos/direct-branch.s -check-prefixes=ALL,M3 -- Exit Code: 1 Command Output (stderr): -- /work/llvm.combined/llvm/test/tools/llvm-mca/AArch64/Exynos/direct-branch.s:36:12: error: M1-NEXT: expected string not found in input            ^ <stdin>:21:2: note: scanning from here  1 0 0.25 b Ltmp0  ^ -- llvm-svn: 348577
* [llvm-mca] Improve test (NFC)Evandro Menezes2018-12-071-8/+14
| | | | | | Add more instructions to the test for Cortex. llvm-svn: 348565
OpenPOWER on IntegriCloud