summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a bug in llvm-objdump’s printing of Objective-C meta dataKevin Enderby2015-10-082-0/+6
| | | | | | | from malformed Mach-O files that caused a crash because of loops in the class meta data. llvm-svn: 249700
* Support for llvm-bcanalyzer dumping of record array strings.Teresa Johnson2015-10-081-2/+6
| | | | | | | | | | | | | | | | | | Summary: Adds support for automatically detecting and printing strings represented by Array abbrev operands, analogous to the string dumping performed for Blob abbrev operands. Enhanced the ThinLTO combined index test to check for the appropriate module and function strings. Reviewers: dexonsmith, joker.eph, davidxl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13553 llvm-svn: 249695
* Revert "Handle inline stacks in gcov-encoded sample profiles."Diego Novillo2015-10-082-24/+0
| | | | | | | | This reverts commit r249644. The buildbots are failing the new test I added. Investigating. llvm-svn: 249648
* Handle inline stacks in gcov-encoded sample profiles.Diego Novillo2015-10-082-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for reading sample profiles with inline stacks. Inline stacks in a profile are generated when the sampled binary has samples in inlined functions. For instance, if main() calls foo() and foo() calls bar(), and bar() is inlined into foo() and foo() inlined into main(), the profile may look something like: main total:364084 head:0 [ ... ] 2.3: _Z3fool total:243786 1: 60149 1.2: 38568 1.4: 46511 1.7: _Z3bari total:98558 1.1: 52672 1.2: 45886 At line 2, discriminator 3, main() calls foo(). In turn, foo() calls bar() at line 1, discriminator 7. In the textual format, this stacking of inline calls is represented with indentation. With this change, LLVM can now read sample profile files generated by the create_gcov tool from https://github.com/google/autofdo. llvm-svn: 249644
* Fix two bugs in llvm-objdump’s printing of Objective-C meta dataKevin Enderby2015-10-063-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | from malformed Mach-O files that caused crashes. We recently got about 700 malformed Mach-O files which we have been using the improve the robustness of tools that deal with reading data from object files. These resulted in about 20 small bug fixes to the darwin based tools. The goal here is to also improve the robustness of llvm-objdump and this is the first two fixes. In talking with Tim Northover the approach we thought might be best is to: 1) Only include tests for the malformed Mach-O files that cause crashes (not all 700+ tests). 2) The test should only contain the command line option that caused the crash and not all the others that don’t matter. 3) There should be only one line for the FileCheck that is past the point of the crash if possible and if possible indicates the malformation. Again the goal is to fix crashes and not so much care about how the printing of malformed data comes out. Tim also suggested if we really wanted to add test cases for all 700+ malformed Mach-O files putting them in the regression tests might be an option. But many of these do not cause crashes. llvm-svn: 249479
* dsymutil: Don't prune forward declarations inside of an imported TAG_moduleAdrian Prantl2015-10-053-1/+15
| | | | | | | | if there exists not definition for the type. For this to work, we need to clone the imported modules before building the decl context chains of the DIEs in the non-skeleton CUs. llvm-svn: 249362
* Added missing test for [ARM] AttributeParser. Check that build attributeAlexandros Lamprineas2015-10-051-0/+7
| | | | | | | | Tag_Advanced_SIMD_arch is set correctly when targeting v8.1-a NEON. Differential Revision: http://reviews.llvm.org/D13281 llvm-svn: 249304
* Support for function summary index bitcode sections and files.Teresa Johnson2015-10-042-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The bitcode format is described in this document: https://drive.google.com/file/d/0B036uwnWM6RWdnBLakxmeDdOeXc/view For more info on ThinLTO see: https://sites.google.com/site/llvmthinlto The first customer is ThinLTO, however the data structures are designed and named more generally based on prior feedback. There are a few comments regarding how certain interfaces are used by ThinLTO, and the options added here to gold currently have ThinLTO-specific names as the behavior they provoke is currently ThinLTO-specific. This patch includes support for generating per-module function indexes, the combined index file via the gold plugin, and several tests (more are included with the associated clang patch D11908). Reviewers: dexonsmith, davidxl, joker.eph Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13107 llvm-svn: 249270
* [llvm-size] Attempt to fix a test failure on Windows.Davide Italiano2015-10-031-1/+1
| | | | llvm-svn: 249247
* [llvm-size] Fix time to check if time of use bug.Davide Italiano2015-10-031-0/+2
| | | | | | This was the last tool relying on this pattern. llvm-svn: 249244
* dsymutil: Also ignore the ByteSize when building the DeclContext cache forAdrian Prantl2015-10-024-1/+23
| | | | | | | | clang modules. Forward decls of ObjC interfaces don't have a bytesize. llvm-svn: 249110
* [PATCH] D13360: [llvm-objdump] Teach -d about AArch64 mapping symbolsDavide Italiano2015-10-011-0/+30
| | | | | | | | | | AArch64 uses $d* and $x* to interleave between text and data. llvm-objdump didn't know about this so it ended up printing garbage. This patch is a first step towards a solution of the problem. Differential Revision: http://reviews.llvm.org/D13360 llvm-svn: 249083
* http://reviews.llvm.org/D13145Dehao Chen2015-09-301-9/+9
| | | | | | Support hierarachical sample profile format. llvm-svn: 248865
* [llvm-pdbdump] Add include-only filters.Zachary Turner2015-09-291-0/+20
| | | | | | | | | | | | | | | | PDB files have a lot of noise in them, with hundreds (or thousands) of symbols from system libraries and compiler generated types. If you're only looking for a specific type, this can be problematic. This CL allows you to display *only* types, variables, or compilands matching a particular pattern. These filters can even be combined with exclude filters. Include-only filters are given priority, so that first the set of items to display is limited only to those that match the include filters, and then the set of exclude filters is applied to those. If there are no include filters specified, then it means "display everything". llvm-svn: 248822
* dsymutil: Fix the condition to distinguish module imports form definitions.Adrian Prantl2015-09-243-0/+40
| | | | llvm-svn: 248512
* dsymutil: Don't prune forward declarations inside a module definition.Adrian Prantl2015-09-234-3/+8
| | | | llvm-svn: 248428
* Fix this dsymutil testcase by not passing in a path to the modulemap file,Adrian Prantl2015-09-232-3/+1
| | | | | | | | so the lookup works as expected after prepending the oso-prepend-path. This manifested only on Windows, because "/" is not a relative path there. llvm-svn: 248423
* Fix the order of operations.Adrian Prantl2015-09-231-1/+1
| | | | llvm-svn: 248406
* Temporarily make testcase more verbose to debug a msvc buildbot failure.Adrian Prantl2015-09-231-1/+3
| | | | llvm-svn: 248403
* dsymutil: Resolve forward decls for types defined in clang modules.Adrian Prantl2015-09-232-11/+31
| | | | | | | | | This patch extends llvm-dsymutil's ODR type uniquing machinery to also resolve forward decls for types defined in clang modules. http://reviews.llvm.org/D13038 llvm-svn: 248398
* dsymutil: print a warning when there is a module hash mismatch.Adrian Prantl2015-09-237-1/+29
| | | | | | | This also updates the module binaries in the test directory because their module hash mismatched. llvm-svn: 248396
* dsymutil: Follow references to clang modules and recursively clone theAdrian Prantl2015-09-225-1/+63
| | | | | | | | debug info. This does not yet resolve external type references. llvm-svn: 248331
* [llvm-readobj] Fix another "time of check to time of use bug".Davide Italiano2015-09-171-0/+2
| | | | | | It seems there's more copy-paste between tools than needed. llvm-svn: 247954
* Disable the second verification run when performing LTO throughTeresa Johnson2015-09-161-0/+25
| | | | | | | | gold in NDEBUG mode. Follow on patch for r247729 - LTO: Disable extra verify runs in release builds. llvm-svn: 247824
* Improve "default_triple" specification: make it at the directory level for ↵Mehdi Amini2015-09-165-5/+2
| | | | | | | test/tools/llvm-mc From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 247819
* Make the default triple optional by allowing an empty stringMehdi Amini2015-09-165-4/+7
| | | | | | | | | | | | | | | When building LLVM as a (potentially dynamic) library that can be linked against by multiple compilers, the default triple is not really meaningful. We allow to explicitely set it to an empty string when configuring LLVM. In this case, said "target independent" tests in the test suite that are using the default triple are disabled by matching the newly available feature "default_triple". Reviewers: probinson, echristo Differential Revision: http://reviews.llvm.org/D12660 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 247775
* [llvm-cxxdump] Remove duplicate code check.Davide Italiano2015-09-151-0/+3
| | | | | | | We already fail with 'No such file or directory' when we try to open the file -- if that doesn't exist. Also add a test to verify this behavior. llvm-svn: 247744
* test: Add "REQUIRES: native" so this test passes with no default triple ↵Justin Bogner2015-09-151-0/+2
| | | | | | configured llvm-svn: 247719
* [llvm-mc] Better error handling in ENOENT case + test.Davide Italiano2015-09-141-0/+2
| | | | | | | | | | | | | This is a follow up to r247518. As a general note, I think we could do a much better job testing for error conditions in tools. I already anticipated in a previous mail, but while implementing this I noticed that the code coverage we have for error checking is pretty low. I can arbitrarily remove checks from several tools and the suite still passes. Differential Revision: http://reviews.llvm.org/D12846 llvm-svn: 247582
* Tweak 2 x86 gold tests so they can run on non-x86 platformsArnaud A. de Grandmaison2015-09-112-3/+5
| | | | llvm-svn: 247415
* Fix llvm/test/tools/gold/X86/bad-alias.ll.NAKAMURA Takumi2015-09-111-2/+2
| | | | llvm-svn: 247391
* [dsymutil] Discard useless location attributes.Frederic Riss2015-09-112-0/+48
| | | | | | | | | | | | | | When cloning the debug info for a function that hasn't been linked, strip the DIEs from all location attributes that wouldn't contain any meaningful information anyway. This kind of situation can happen when a function got discarded by the linker, but its debug information is still wanted in the final link because it was marked as required as some other DIE dependency. The easiest way to get into that situation is to have using directives. They get linked unconditionally, but their targets might not always be present. llvm-svn: 247386
* Fix the gold test cases after alias changesDavid Blaikie2015-09-111-1/+1
| | | | llvm-svn: 247381
* [opaque pointer type] Add textual IR support for explicit type parameter for ↵David Blaikie2015-09-115-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | global aliases update.py: import fileinput import sys import re alias_match_prefix = r"(.*(?:=|:|^)\s*(?:external |)(?:(?:private|internal|linkonce|linkonce_odr|weak|weak_odr|common|appending|extern_weak|available_externally) )?(?:default |hidden |protected )?(?:dllimport |dllexport )?(?:unnamed_addr |)(?:thread_local(?:\([a-z]*\))? )?alias" plain = re.compile(alias_match_prefix + r" (.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|addrspacecast|\[\[[a-zA-Z]|\{\{).*$)") cast = re.compile(alias_match_prefix + r") ((?:bitcast|inttoptr|addrspacecast)\s*\(.* to (.*?)(| addrspace\(\d+\) *)\*\)\s*(?:;.*)?$)") gep = re.compile(alias_match_prefix + r") ((?:getelementptr)\s*(?:inbounds)?\s*\((?P<type>.*), (?P=type)(?:\s*addrspace\(\d+\)\s*)?\* .*\)\s*(?:;.*)?$)") def conv(line): m = re.match(cast, line) if m: return m.group(1) + " " + m.group(3) + ", " + m.group(2) m = re.match(gep, line) if m: return m.group(1) + " " + m.group(3) + ", " + m.group(2) m = re.match(plain, line) if m: return m.group(1) + ", " + m.group(2) + m.group(3) + "*" + m.group(4) + "\n" return line for line in sys.stdin: sys.stdout.write(conv(line)) apply.sh: for name in "$@" do python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name" rm -f "$name.tmp" done The actual commands: From llvm/src: find test/ -name *.ll | xargs ./apply.sh From llvm/src/tools/clang: find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}" From llvm/src/tools/polly: find test/ -name *.ll | xargs ./apply.sh llvm-svn: 247378
* Tweak llvm/test/tools/gold/X86/parallel.ll to run with pthread-unaware ↵NAKAMURA Takumi2015-09-031-4/+1
| | | | | | | | | ld.gold on Linux. If ld.gold is configured without --enable-thread, ld.gold might not load libpthread.so. Preloading LLVMgold.so loads also libpthread.so. llvm-svn: 246739
* Reapply r246012 [dsymutil] Emit real dSYM companion binaries.Frederic Riss2015-09-022-0/+339
| | | | | | | | | | | | | | | | | | | | | | | With a fix for big endian machines. Thanks to Daniel Sanders for the debugging! Original commit message: The binaries containing the linked DWARF generated by dsymutil are not standard relocatable object files like emitted did previsously. They should be dSYM companion files, which means they have a different file type in the header, but also a couple other peculiarities: - they contain the segments and sections from the original binary in their load commands, but not the actual contents. This means they get an address and a size, but their offset is always 0 (but these are not virtual sections) - they also conatin all the defined symbols from the original binary This makes MC a really bad fit to emit these kind of binaries. The approach that was used in this patch is to leverage MC's section layout for the debug sections, but to use a replacement for MachObjectWriter that lives in MachOUtils.cpp. Some of the low-level helpers from MachObjectWriter were reused too. llvm-svn: 246673
* Suppress llvm/test/tools/gold/X86/parallel.ll while investigating.NAKAMURA Takumi2015-09-021-0/+3
| | | | | | | | | For me, Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7deb0dc in _dl_fixup () from /lib64/ld-linux-x86-64.so.2 llvm-svn: 246641
* gold-plugin: Implement parallel LTO code generation using llvm::splitCodeGen.Peter Collingbourne2015-09-011-0/+22
| | | | | | | | | Parallelism can be enabled using a new plugin option, jobs=N, where N is the number of code generation threads. Differential Revision: http://reviews.llvm.org/D12308 llvm-svn: 246584
* [llvm-readobj] MachO -- correctly dump section field 'Reserved3'Davide Italiano2015-09-012-0/+14
| | | | | | Before we incorrectly ignored it. llvm-svn: 246556
* Object: Fix COFF import file's symbols.Rui Ueyama2015-09-011-1/+1
| | | | | | | If a symbol is marked as "data", the symbol should be exported with __imp_ prefix. Previously, the symbol was exported as-is. llvm-svn: 246532
* [dsymutil] Do not mistakenly reuse the current object file when the next one ↵Frederic Riss2015-08-311-0/+4
| | | | | | isn't found. llvm-svn: 246412
* [dsymutil] Fix testcase.Frederic Riss2015-08-312-1/+1
| | | | | | | | This testcase required 2 copies of the same file, and the second copy was missing. It was currently working because of a bug I'm about to fix. llvm-svn: 246411
* [dsymutil] Do not crash on empty debug_range range.Frederic Riss2015-08-313-1/+58
| | | | | | | | | | The fix is trivial (The actual patch is 2 lines, but as it changes indentation it looks like more). clang does not produce this kind of (slightly bogus) debug info anymore, thus I had to rely on a hand-crafted assembly test to trigger that case. llvm-svn: 246410
* [dsymutil] Fix handling of inlined_subprogram low_pcsFrederic Riss2015-08-314-0/+33
| | | | | | | | | The value of an inlined subprogram low_pc attribute should not get relocated, but it can happen that it matches the enclosing function's start address and thus gets the generic treatment. Special case it to avoid applying the PC offset twice. llvm-svn: 246406
* [dsymutil] Implement -symtab/-s option.Frederic Riss2015-08-311-0/+44
| | | | | | | This option dumps the STAB entries that define the debug map(s) stored in the input binaries, and then exits. llvm-svn: 246403
* Split the gold tests into X86 and PowerPC directories.Rafael Espindola2015-08-2832-1/+3
| | | | | | Patch by Than McIntosh! llvm-svn: 246328
* DI: Require subprogram definitions to be distinctDuncan P. N. Exon Smith2015-08-282-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | As a follow-up to r246098, require `DISubprogram` definitions (`isDefinition: true`) to be 'distinct'. Specifically, add an assembler check, a verifier check, and bitcode upgrading logic to combat testcase bitrot after the `DIBuilder` change. While working on the testcases, I realized that test/Linker/subprogram-linkonce-weak-odr.ll isn't relevant anymore. Its purpose was to check for a corner case in PR22792 where two subprogram definitions match exactly and share the same metadata node. The new verifier check, requiring that subprogram definitions are 'distinct', precludes that possibility. I updated almost all the IR with the following script: git grep -l -E -e '= !DISubprogram\(.* isDefinition: true' | grep -v test/Bitcode | xargs sed -i '' -e 's/= \(!DISubprogram(.*, isDefinition: true\)/= distinct \1/' Likely some variant of would work for out-of-tree testcases. llvm-svn: 246327
* llvm-readobj: Dump more info for COFF import libraries.Rui Ueyama2015-08-281-1/+5
| | | | | | This patch teaches llvm-readobj to print out COFF import file header fields. llvm-svn: 246291
* Re-apply r246276 - Object: Teach llvm-ar to create symbol table for COFF ↵Rui Ueyama2015-08-281-13/+1
| | | | | | | | | | | short import files This patch includes a fix for a llvm-readobj test. With this patch, the tool does no longer print out COFF headers for the short import file, but that's probably desirable because the header for the short import file is dummy. llvm-svn: 246283
* Revert "[dsymutil] Emit real dSYM companion binaries."Frederic Riss2015-08-262-339/+0
| | | | | | | This reverts commit r246012. Some bots do not like it (mips/s390). llvm-svn: 246019
OpenPOWER on IntegriCloud