summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [PDB] Partial resubmit of r296215, which improved PDB Stream Library.Zachary Turner2017-02-274-24/+24
| | | | | | | | | | | | | | | | | This was reverted because it was breaking some builds, and because of incorrect error code usage. Since the CL was large and contained many different things, I'm resubmitting it in pieces. This portion is NFC, and consists of: 1) Renaming classes to follow a consistent naming convention. 2) Fixing the const-ness of the interface methods. 3) Adding detailed doxygen comments. 4) Fixing a few instances of passing `const BinaryStream& X`. These are now passed as `BinaryStreamRef X`. llvm-svn: 296394
* llvm-mc-fuzzer: add support for assemblyBrian Cain2017-02-274-23/+342
| | | | | | | This creates an llvm-mc-disassemble-fuzzer from the existing llvm-mc-fuzzer and finishing the assemble support in llvm-mc-assemble-fuzzer. llvm-svn: 296323
* Revert r296215, "[PDB] General improvements to Stream library." and followings.NAKAMURA Takumi2017-02-253-25/+25
| | | | | | | | | | | | | | | | | r296215, "[PDB] General improvements to Stream library." r296217, "Disable BinaryStreamTest.StreamReaderObject temporarily." r296220, "Re-enable BinaryStreamTest.StreamReaderObject." r296244, "[PDB] Disable some tests that are breaking bots." r296249, "Add static_cast to silence -Wc++11-narrowing." std::errc::no_buffer_space should be used for OS-oriented errors for socket transmission. (Seek discussions around llvm/xray.) I could substitute s/no_buffer_space/others/g, but I revert whole them ATM. Could we define and use LLVM errors there? llvm-svn: 296258
* [PDB] General improvements to Stream library.Zachary Turner2017-02-253-25/+25
| | | | | | | | | | | | | | | This adds various new functionality and cleanup surrounding the use of the Stream library. Major changes include: * Renaming of all classes for more consistency / meaningfulness * Addition of some new methods for reading multiple values at once. * Full suite of unit tests for reader / writer functionality. * Full set of doxygen comments for all classes. * Streams now store their own endianness. * Fixed some bugs in a few of the classes that were discovered by the unit tests. llvm-svn: 296215
* [PDB] Rename Stream related source files.Zachary Turner2017-02-253-3/+3
| | | | | | | | | | | | | | This is part of a larger effort to get the Stream code moved up to Support. I don't want to do it in one large patch, in part because the changes are so big that it will treat everything as file deletions and add, losing history in the process. Aside from that though, it's just a good idea in general to make small changes. So this change only changes the names of the Stream related source files, and applies necessary source fix ups. llvm-svn: 296211
* [XRAY] A Color Choosing helper for XRay GraphDean Michael Berris2017-02-255-60/+292
| | | | | | | | | | | | | | | | | | | Summary: In Preparation for graph comparison, this patch breaks out the color choice code from xray-graph into a library and adds polynomials for the Sequential and Difference sets from ColorBrewer. Depends on D29005 Reviewers: dblaikie, chandlerc, dberris Reviewed By: dberris Subscribers: chandlerc, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D29363 llvm-svn: 296210
* [sancov] extending sancov --help documentationMike Aizatsky2017-02-241-2/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D30361 llvm-svn: 296205
* [llvm-cov] Strip redundant path components from filenames (fix PR31982)Vedant Kumar2017-02-231-14/+44
| | | | | | | | | Instead of stripping the longest common prefix off of the filenames in a report, strip out the longest chain of redundant path components. This fixes the case in PR31982, where there are two files with the same prefix, and stripping out the LCP makes things less intelligible. llvm-svn: 296029
* Don't modify archive members unless really needed.Rafael Espindola2017-02-211-4/+11
| | | | | | | | | | | For whatever reason ld64 requires that member headers (not the member themselves) should be aligned. The only way to do that is to edit the previous member so that it ends at an aligned boundary. Since modifying data put in an archive is an undesirable property, llvm-ar should only do it when it is absolutely necessary. llvm-svn: 295765
* [Orc] Rename ObjectLinkingLayer -> RTDyldObjectLinkingLayer.Lang Hames2017-02-201-2/+2
| | | | | | | | | | The current ObjectLinkingLayer (now RTDyldObjectLinkingLayer) links objects in-process using MCJIT's RuntimeDyld class. In the near future I hope to add new object linking layers (e.g. a remote linking layer that links objects in the JIT target process, rather than the client), so I'm renaming this class to be more descriptive. llvm-svn: 295636
* [llvm-cov] Respect Windows line endings when parsing demangled symbols.Igor Kudrin2017-02-191-1/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D30096 llvm-svn: 295605
* Don't assume little endian in StreamReader / StreamWriter.Zachary Turner2017-02-181-3/+3
| | | | | | | In an effort to generalize this so it can be used by more than just PDB code, we shouldn't assume little endian. llvm-svn: 295525
* opt: Rename -default-data-layout flag to -data-layout and make it always ↵Peter Collingbourne2017-02-171-11/+7
| | | | | | | | | | override the layout. There isn't much point in a flag that only works if the data layout is empty. Differential Revision: https://reviews.llvm.org/D30014 llvm-svn: 295468
* [XRAY] [x86_64] Adding a Flight Data filetype reader to the llvm-xray Trace ↵Dean Michael Berris2017-02-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | implementation. Summary: The file type packs function trace data onto disk from potentially multiple threads that are aggregated and flushed during the course of an instrumented program's runtime. It is named FDR mode or Flight Data recorder as an analogy to plane blackboxes, which instrument a running system without access to IO. The writer code is defined in compiler-rt in xray_fdr_logging.h/cc Reviewers: rSerge, kcc, dberris Reviewed By: dberris Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29697 llvm-svn: 295397
* [pdb] Add the ability to resolve TypeServer PDBs.Zachary Turner2017-02-163-2/+4
| | | | | | | | | | | | | | Some PDBs or object files can contain references to other PDBs where the real type information lives. When this happens, all type indices in the original PDB are meaningless because their records are not there. With this patch we add the ability to pull type info from those secondary PDBs. Differential Revision: https://reviews.llvm.org/D29973 llvm-svn: 295382
* Remove uses of deprecated std::random_shuffle in the LLVM code base. ↵Marshall Clow2017-02-163-6/+14
| | | | | | Reviewed as https://reviews.llvm.org/D29780. llvm-svn: 295325
* [LTO] Add ability to emit assembly to new LTO APITobias Edler von Koch2017-02-151-0/+3
| | | | | | | | | | | | | | | | Summary: Add a field to LTO::Config, CGFileType, to select the file type to emit (object or assembly). This is useful for testing and to implement -save-temps. Reviewers: tejohnson, mehdi_amini, pcc Reviewed By: mehdi_amini Subscribers: davide, llvm-commits Differential Revision: https://reviews.llvm.org/D29475 llvm-svn: 295226
* Disable wrapping llvm-xray YAML outputDimitry Andric2017-02-142-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: The YAML output produced by llvm-xray is supposed to be wrapped at the arbitrary default of 70 columns set by `yaml:Output`. Unfortunately, the wrapping is rather unpredictable, and can easily go past the set number of columns, depending on the execution environment. To make the YAML output environment-independent, disable wrapping instead. Reviewers: dberris Reviewed By: dberris Subscribers: fhahn, llvm-commits Differential Revision: https://reviews.llvm.org/D29962 llvm-svn: 295116
* [llvm-lto2] Fix typo spotted by Teresa (r294885 post-commit review).Davide Italiano2017-02-131-2/+2
| | | | llvm-svn: 294962
* llvm-readobj: process FreeBSD core notesSaleem Abdulrasool2017-02-121-0/+30
| | | | | | | core files on FreeBSD have additional notes to capture state. Process those notes when dumping the notes. llvm-svn: 294909
* [lib/LTO] Add support for hotness optremarks in the new API.Davide Italiano2017-02-121-0/+6
| | | | llvm-svn: 294885
* [llvm-lto2] Fix typo in error message.Davide Italiano2017-02-121-1/+1
| | | | llvm-svn: 294883
* [lib/LTO] Initial support for optimization remarks in the new API.Davide Italiano2017-02-121-0/+7
| | | | llvm-svn: 294882
* IR: Function summary extensions for whole-program devirtualization pass.Peter Collingbourne2017-02-101-0/+4
| | | | | | | | | | The summary information includes all uses of llvm.type.test and llvm.type.checked.load intrinsics that can be used to devirtualize calls, including any constant arguments for virtual constant propagation. Differential Revision: https://reviews.llvm.org/D29734 llvm-svn: 294795
* [XRay] A graph Class for the llvm-xray graphDean Michael Berris2017-02-102-96/+104
| | | | | | | | | | | | | | | | | | | Summary: In preparation for graph comparison and filtering, this is a library for representing graphs in LLVM. This will enable easier encapsulation and reuse of graphs in llvm-xray. Depends on D28999, D28225 Reviewers: dblaikie, dberris Reviewed By: dberris Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D29005 llvm-svn: 294717
* Revert "[XRay] A graph Class for the llvm-xray graph"Dean Michael Berris2017-02-102-105/+96
| | | | | | Broke tests, reverting. llvm-svn: 294714
* [XRay] A graph Class for the llvm-xray graphDean Michael Berris2017-02-102-96/+105
| | | | | | | | | | | | | | | | | | | Summary: In preparation for graph comparison and filtering, this is a library for representing graphs in LLVM. This will enable easier encapsulation and reuse of graphs in llvm-xray. Depends on D28999, D28225 Reviewers: dblaikie, dberris Reviewed By: dberris Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D29005 llvm-svn: 294713
* [dsymutil] Fix handling of empty CUs in LTO links.Frederic Riss2017-02-091-14/+20
| | | | | | | | | r288399 introduced the DIEUnit class, and in the process broke the corner case where dsymutil generates an empty CU during an LTO link. This restores the logic and adds a test for the corner case. llvm-svn: 294618
* Tweak the implementation of llvm-objdump’s -objc-meta-data option soKevin Enderby2017-02-091-63/+91
| | | | | | | | | that it works when the ObjC metadata sections end up in the __DATA_CONST or __DATA_DIRTY segments. rdar://26315238 llvm-svn: 294599
* llvm-objdump: make NoLeadingAddr work on more than just MachOSaleem Abdulrasool2017-02-083-6/+9
| | | | | | | | | Support printing the disassembly without the address on all formats rather than making it MachO specific. Patch by Jeff Muizelaar! llvm-svn: 294495
* Use dynamic symbols for ELF disassemblySam Parker2017-02-081-1/+50
| | | | | | | | | | | Disassembly currently begins from addresses obtained from the objects symbol table. For ELF, add the dynamic symbols to the list if no static symbols are available so that we can more successfully disassemble stripped binaries. Differential Revision: https://reviews.llvm.org/D29632 llvm-svn: 294430
* Fix a bug in llvm-obdump(1) with the -macho and -info-plist optionsKevin Enderby2017-02-061-1/+1
| | | | | | | | | which caused it to print more than the (__TEXT,__info_plist) if that section did not end with a null. rdar://27378808 llvm-svn: 294236
* Fix a bug in llvm-obdump(1) with the -macho and -disassemble optionsKevin Enderby2017-02-061-1/+28
| | | | | | | | | | which caused it to not disassemble the bytes a the start of the section if the section had symbols and the first symbol was not at the start of the section. rdar://30143243 llvm-svn: 294212
* [llvm-cov] Don't show function summaries when filtering by filename (fixes ↵Vedant Kumar2017-02-051-1/+5
| | | | | | PR31395) llvm-svn: 294137
* [llvm-cov] Demangle symbols in function summaries (fixes PR31394)Vedant Kumar2017-02-053-7/+12
| | | | llvm-svn: 294136
* [llvm-cov] Refactor logic for storing demangled symbols, NFCVedant Kumar2017-02-052-15/+19
| | | | llvm-svn: 294135
* [llvm-cov] Fix a comment, NFCVedant Kumar2017-02-051-1/+1
| | | | llvm-svn: 294134
* Fix a bug in llvm-obdump(1) with the -objc-meta-data flag with -machoKevin Enderby2017-02-031-1/+1
| | | | | | | | which caused a hang on a malformed binary with bad bind info. rdar://29672108 llvm-svn: 294021
* [LLC] Add an inline assembly diagnostics handler.Sanne Wouda2017-02-031-0/+11
| | | | | | | | | | | | | | | | Summary: llc would hit a fatal error for errors in inline assembly. The diagnostics message is now printed. Reviewers: rengolin, MatzeB, javed.absar, anemet Reviewed By: anemet Subscribers: jyknight, nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D29408 llvm-svn: 293999
* llvm-readobj: fix next note entry calculation and print unknown note typesKonstantin Zhuravlyov2017-02-021-1/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D29131 llvm-svn: 293964
* [ThinLTO] PrintStatistics when we exit early for thinlto-index-onlyTeresa Johnson2017-02-021-0/+3
| | | | | | | | | | | | | | Summary: This is necessary to get stats from the ThinLink printed before the early exit when compiling in a distributed build. Reviewers: mehdi_amini Subscribers: Prazek, llvm-commits Differential Revision: https://reviews.llvm.org/D29461 llvm-svn: 293908
* Re-submit r293820: Return Error instead of bool from mergeTypeStreams().Rui Ueyama2017-02-021-1/+3
| | | | llvm-svn: 293847
* [dsymutil] Fix __LINKEDIT vmsize in dsymutil upgrade pathSteven Wu2017-02-021-0/+2
| | | | | | | | | | | | | | | | Summary: dsymutil upgrade path can change the size of segment and it needs to update the vmsize of the segment to reflect the size change. rdar://problem/30290714 Reviewers: friss Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29433 llvm-svn: 293842
* [pdb] Add a new command for analyzing hash collisions.Zachary Turner2017-02-014-0/+222
| | | | | | | | | | This introduces the `analyze` subcommand. For now there is only one option, to analyze hash collisions in the type streams. In the future, however, we could add many more things here, such as performing size analyses, compacting, and statistics about the type of records etc. llvm-svn: 293795
* [XRay] Use std::errc::invalid_argument instead of std::errc::bad_messageDean Michael Berris2017-02-011-1/+1
| | | | | | | | This change should appease the mingw32 builds. Follow-up to D29319. llvm-svn: 293725
* [XRay] Define the InstrumentationMap typeDean Michael Berris2017-02-016-448/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change implements the instrumentation map loading library which can understand both YAML-defined instrumentation maps, and ELF 64-bit object files that have the XRay instrumentation map section. We break it out into a library on its own to allow for other applications to deal with the XRay instrumentation map defined in XRay-instrumented binaries. This type provides both raw access to the logical representation of the instrumentation map entries as well as higher level functions for converting a function ID into a function address. At this point we only support ELF64 binaries and YAML-defined XRay instrumentation maps. Future changes should extend this to support 32-bit ELF binaries, as well as other binary formats (like MachO). As part of this change we also migrate all uses of the extraction logic that used to be defined in tools/llvm-xray/ to use this new type and interface for loading from files. We also remove the flag from the `llvm-xray` tool that required users to specify the type of the instrumentation map file being provided to instead make the library auto-detect the file type. Reviewers: dblaikie Subscribers: mgorny, varno, llvm-commits Differential Revision: https://reviews.llvm.org/D29319 llvm-svn: 293721
* Add a verbose/human readable mode to llvm-symbolizer to investigate ↵David Blaikie2017-01-311-1/+4
| | | | | | | | | | discriminators and other line table/backtrace features Patch by Simon Que! Differential Revision: https://reviews.llvm.org/D29094 llvm-svn: 293697
* Fix a bug in llvm-obdump(1) with the -macho flag disassembling an objectKevin Enderby2017-01-311-2/+5
| | | | | | | | | | | | | without symbols that makes calls through a symbol stub which were not correctly being annotated with “## symbol stub for: _foo”. Just adds the same parameters for getting the annotations from DisAsm->getInstruction() and passing them to IP->printInst() from the code above when boolean variable symbolTableWorked was true. rdar://29791952 llvm-svn: 293662
* Fix llvm-readobj build error after r293569Vedant Kumar2017-01-301-1/+1
| | | | | | | Clang complains about an ambiguous call to printNumber() because it can't work out what size_t should convert to. I picked uint64_t. llvm-svn: 293573
* [WebAssembly] Add wasm support for llvm-readobjDerek Schuff2017-01-304-0/+99
| | | | | | | | | | | Create a WasmDumper subclass of ObjDumper to support Webassembly binary files. Patch by Sam Clegg Differential Revision: https://reviews.llvm.org/D27355 llvm-svn: 293569
OpenPOWER on IntegriCloud