summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-mca] Move the AssembleInput logic into its own class.Matt Davis2018-11-075-103/+218
| | | | | | | | | | | | | | | | | Summary: This patch introduces a CodeRegionGenerator class which is responsible for parsing some type of input and creating a 'CodeRegions' instance for use by llvm-mca. In the future, we will also have a CodeRegionGenerator subclass for converting an input object file into CodeRegions. For now, we only have the subclass for converting input assembly into CodeRegions. This is mostly a NFC patch, as the logic remains close to the original, but now encapsulated in its own class and moved outside of llvm-mca.cpp. Reviewers: andreadb, courbet, RKSimon Reviewed By: andreadb Subscribers: mgorny, tschuett, gbedwell, llvm-commits Differential Revision: https://reviews.llvm.org/D54179 llvm-svn: 346344
* [llvm-mt] Accept and ignore notify_update flagPetr Hosek2018-11-071-0/+1
| | | | | | | | This flag is being set by CMake when invoking mt. Differential Revision: https://reviews.llvm.org/D54196 llvm-svn: 346341
* [llvm-exegesis] Remove superfluous move.Clement Courbet2018-11-071-1/+1
| | | | | | | | | | | /Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/tools/llvm-exegesis/lib/X86/Target.cpp:155:12: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move] return std::move(Error); ^ /Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/tools/llvm-exegesis/lib/X86/Target.cpp:155:12: note: remove std::move call here return std::move(Error); ^~~~~~~~~~ ~ llvm-svn: 346333
* [llvm-exegesis] Correclty handle all X86 memory encoding formats.Clement Courbet2018-11-071-63/+141
| | | | | | | | | | | | | | Summary: Add unit tests to check the support for each supported format to avoid regressions such as the one in PR36906. Reviewers: gchatelet Subscribers: tschuett, lebedev.ri, llvm-commits Differential Revision: https://reviews.llvm.org/D54144 llvm-svn: 346330
* [llvm-exegesis] Increasing wrapping limit.Clement Courbet2018-11-071-1/+1
| | | | | | | | | | | | Summary: Fixes PR39097. Reviewers: gchatelet Subscribers: llvm-commits, tschuett Differential Revision: https://reviews.llvm.org/D54151 llvm-svn: 346328
* [llvm-strip] Check "strip" with StringRef::contains instead of ends_withFangrui Song2018-11-071-1/+1
| | | | | | | | | | | | | | Summary: If argv[0] is version suffixed, e.g. llvm-strip-7, this will still work. Reviewers: rupprecht, jhenderson, alexshap, jakehehrlich Reviewed By: rupprecht Subscribers: alexshap, jakehehrlich, llvm-commits Differential Revision: https://reviews.llvm.org/D54193 llvm-svn: 346292
* [llvm-exegesis] Ignore X86 pseudo instructions.Clement Courbet2018-11-061-0/+3
| | | | | | | | | | | | Summary: They do not lower to actual MCInsts and have no scheduling info. Reviewers: gchatelet Subscribers: llvm-commits, tschuett Differential Revision: https://reviews.llvm.org/D54147 llvm-svn: 346227
* [XRay] Update XRayRecord to support Custom/Typed EventsDean Michael Berris2018-11-064-18/+46
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change cuts across LLVM and compiler-rt to add support for rendering custom events in the XRayRecord type, to allow for including user-provided annotations in the output YAML (as raw bytes). This work enables us to add custom event and typed event records into the `llvm::xray::Trace` type for user-provided events. This can then be programmatically handled through the C++ API and can be included in some of the tooling as well. For now we support printing the raw data we encounter in the custom events in the converted output. Future work will allow us to start interpreting these custom and typed events through a yet-to-be-defined API for extending the trace analysis library. Reviewers: mboerger Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D54139 llvm-svn: 346214
* [LLVM-C] Improve Intrinsics BindingsRobert Widmann2018-11-061-1/+11
| | | | | | | | | | | | | | | | | | | | | Summary: Improve the intrinsic bindings with operations for - Retrieving and automatically inserting the declaration of an intrinsic by ID - Retrieving the name of a non-overloaded intrinsic by ID - Retrieving the name of an overloaded intrinsic by ID and overloaded parameter types Improve the echo test to copy non-overloaded intrinsics by ID. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53626 llvm-svn: 346195
* MachineModuleInfo: Store more specific reference to LLVMTargetMachine; NFCMatthias Braun2018-11-051-1/+3
| | | | | | | | MachineModuleInfo can only be used in code using lib/CodeGen, hence we can keep a more specific reference to LLVMTargetMachine rather than just TargetMachine around. llvm-svn: 346182
* AMDGPU: Add sram-ecc featureKonstantin Zhuravlyov2018-11-051-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D53222 llvm-svn: 346177
* [COFF][LLD] Add link support for Microsoft precompiled headers OBJsAlexandre Ganea2018-11-051-1/+3
| | | | | | | | | | | This change allows for link-time merging of debugging information from Microsoft precompiled types OBJs compiled with cl.exe /Z7 /Yc and /Yu. This fixes llvm.org/PR34278 Differential Revision: https://reviews.llvm.org/D45213 llvm-svn: 346154
* [CMake] Expose opt-remark tooling through libOptRemarks.dylibFrancis Visoiu Mistrih2018-11-053-0/+46
| | | | | | | | | | | | * Create an install target for it * Add it under tools/opt-remarks * Add an export file for the dylib * Install the llvm-c/OptRemarks.h header * Add an API to query its version rdar://45458839 llvm-svn: 346127
* [AArch64] [Windows] Misc fixes for llvm-readobj -unwind.Eli Friedman2018-11-021-19/+19
| | | | | | | | | | | | Use getImageBase() helper to compute the image base. Fix various offsets/addresses/masks so they're actually correct. This allows decoding unwind info from DLLs, and unwind info from object files containing multiple functions. Differential Revision: https://reviews.llvm.org/D54015 llvm-svn: 346036
* Fix a few small issues in llvm-pdbutilLeonard Mosescu2018-11-023-20/+25
| | | | | | | | | | | | | Running "llvm-pdbutil dump -all" on linux (using the native PDB reader), over a few PDBs pulled from the Microsoft public symbol store uncovered a few small issues: - stripped PDBs might not have the strings stream (/names) - stripped PDBs might not have the "module info" stream Differential Revision: https://reviews.llvm.org/D54006 llvm-svn: 346010
* [gold-plugin] Fix a bunch of build warningsMandeep Singh Grang2018-11-011-3/+2
| | | | | Phabricator: https://reviews.llvm.org/D53997 llvm-svn: 345910
* [llvm-objcopy/strip] [NFC] Clean up tablegen opts (clang-format + ↵Jordan Rupprecht2018-11-012-110/+108
| | | | | | reorganizing things). llvm-svn: 345896
* Silence -Wimplicit-fallthrough in gold pluginReid Kleckner2018-11-011-0/+1
| | | | | | | Fatal errors are likely fatal, but in case they aren't, return instead of printing a second warning. llvm-svn: 345894
* [llvm-mca] Add extra counters for move elimination in view ↵Andrea Di Biagio2018-11-017-47/+163
| | | | | | | | | | | | | | | | | | RegisterFileStatistics. This patch teaches view RegisterFileStatistics how to report events for optimizable register moves. For each processor register file, view RegisterFileStatistics reports the following extra information: - Number of optimizable register moves - Number of register moves eliminated - Number of zero moves (i.e. register moves that propagate a zero) - Max Number of moves eliminated per cycle. Differential Revision: https://reviews.llvm.org/D53976 llvm-svn: 345865
* [llvm-strip] Support --keep and --strip-all-gnu from llvm-objcopyJordan Rupprecht2018-11-013-3/+13
| | | | | | | | | | | | | | Summary: Add --keep and --strip-all-gnu from llvm-objcopy into llvm-strip. Reviewers: jakehehrlich, jhenderson, alexshap Reviewed By: jhenderson, alexshap Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53954 llvm-svn: 345861
* [llvm-objcopy] Support --{enable,disable}-deterministic-archivesJordan Rupprecht2018-11-015-4/+45
| | | | | | | | | | | | | | Summary: ar and objcopy/strip all support configuring whether archives are written deterministically (timestamps/UIDs/GIDs/etc zero'd). This has been ported to llvm-ar (the U/D modifiers) but not yet to llvm-objcopy/strip. Reviewers: jakehehrlich, jhenderson, alexshap Reviewed By: jhenderson Subscribers: ruiu, mgrang, llvm-commits Differential Revision: https://reviews.llvm.org/D53913 llvm-svn: 345859
* [llvm-objcopy] Don't apply --localize flags to common symbolsJordan Rupprecht2018-11-013-4/+8
| | | | | | | | | | | | | | | | | Summary: --localize-symbol and --localize-hidden will currently localize common symbols. GNU objcopy will not localize these symbols even when explicitly requested, which seems reasonable; common symbols should always be global so they can be merged during linking. See PR39461 Reviewers: jakehehrlich, jhenderson, alexshap, MaskRay, espindola Reviewed By: jakehehrlich, jhenderson, alexshap, MaskRay Subscribers: emaste, arichardson, alexshap, MaskRay, llvm-commits Differential Revision: https://reviews.llvm.org/D53782 llvm-svn: 345856
* [llvm-objcopy] For multiclass Eq, associate help text with --name= , not ↵Fangrui Song2018-11-012-81/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | with --name Summary: Before: % llvm-objcopy -help ... --weaken-symbol=symbol Mark <symbol> as weak --weaken-symbol symbol Mark <symbol> as weak After: % llvm-objcopy -help ... --weaken-symbol=symbol Mark <symbol> as weak Reviewers: jhenderson, rupprecht, alexshap, jakehehrlich Reviewed By: jhenderson Subscribers: llvm-commits, kristina Differential Revision: https://reviews.llvm.org/D53983 llvm-svn: 345855
* [llvm-objcopy] Use proper casesFangrui Song2018-11-011-17/+17
| | | | | | | | | | | | Reviewers: jhenderson, alexshap, jakehehrlich, espindola, rupprecht Reviewed By: jhenderson, rupprecht Subscribers: emaste, arichardson, rupprecht, llvm-commits Differential Revision: https://reviews.llvm.org/D53971 llvm-svn: 345845
* [llvm-mca] Remove the verb 'assemble' from a few options in help. NFC.Matt Davis2018-10-311-17/+17
| | | | | | | * MCA does not assemble anything. * Ran clang-format. llvm-svn: 345750
* [llvm-mca] Remove namespace prefixes made redundant by r345612. NFCAndrea Di Biagio2018-10-3118-149/+129
| | | | llvm-svn: 345730
* [llvm-objdump] Mark syms/t flags as NotHidden. NFC.Kristina Brooks2018-10-311-0/+1
| | | | | | | Slight improvement to help output of llvm-objdump that exposes the shorter -t flag for -syms instead of it being hidden away. llvm-svn: 345704
* [llvm-objdump] Add --reloc alias for -r (PR39407)Kristina Brooks2018-10-311-1/+5
| | | | | | | | | | | | | This addresses PR39407 (https://bugs.llvm.org/show_bug.cgi?id=39407) improving compatibility with GNU binutils counterparts. Reviewed By: kristina Patch by Higuoxing (Xing). Differential Revision: https://reviews.llvm.org/D53804 llvm-svn: 345703
* [llvm-objdump] support '--syms' as an alias of -tKristina Brooks2018-10-311-2/+3
| | | | | | | | | | | This adds support for '--syms' as an alias of '-t' for llvm-objdump, fixing PR39406 (https://bugs.llvm.org/show_bug.cgi?id=39406). Patch by Higuoxing (Xing). Differential Revision: https://reviews.llvm.org/D53803 llvm-svn: 345697
* [DWARF] Revert r345546: Refactor range list extraction and dumpingWolfgang Pieb2018-10-313-23/+23
| | | | | | This patch caused some internal tests to break which are being investigated. llvm-svn: 345687
* [llvm-objcopy] Delete a redundant override whose base is emptyFangrui Song2018-10-311-1/+0
| | | | llvm-svn: 345684
* [llvm-objcopy] Fix --keep-global-symbol/--globalize-symbol for undefined ↵Jordan Rupprecht2018-10-301-2/+4
| | | | | | | | | | | | | | | | symbols. Summary: --keep-global-symbol and --globalize-symbol don't make sense for undefined symbols, so it should be ignored for those symbols. This matches GNU objcopy behavior. Reviewers: jhenderson, alexshap, jakehehrlich, espindola Reviewed By: jhenderson, jakehehrlich Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D53733 llvm-svn: 345614
* [llvm-mca] Move namespace mca inside llvm::Fangrui Song2018-10-3059-42/+118
| | | | | | | | | | | | | | | | Summary: This allows to remove `using namespace llvm;` in those *.cpp files When we want to revisit the decision (everything resides in llvm::mca::*) in the future, we can move things to a nested namespace of llvm::mca::, to conceptually make them separate from the rest of llvm::mca::* Reviewers: andreadb, mattd Reviewed By: andreadb Subscribers: javed.absar, tschuett, gbedwell, llvm-commits Differential Revision: https://reviews.llvm.org/D53407 llvm-svn: 345612
* [llvm-size] Reject unknown radix valuesJames Henderson2018-10-301-4/+6
| | | | | | | | | | | | | | This addresses https://bugs.llvm.org/show_bug.cgi?id=39403 by making -radix an enumeration option with 8, 10, and 16 as the only accepted values. Reviewed by: jhenderson, MaskRay Differential Revision: https://reviews.llvm.org/D53799 Patch by Eugene Sharygin llvm-svn: 345588
* [DWARF][NFC] Refactor range list extraction and dumpingWolfgang Pieb2018-10-293-23/+23
| | | | | | | | | | | | | | | | | The purpose of this patch is twofold: - Fold pre-DWARF v5 functionality into v5 to eliminate the need for 2 different versions of range list handling. We get rid of DWARFDebugRangelist{.cpp,.h}. - Templatize the handling of range list tables so that location list handling can take advantage of it as well. Location list and range list tables have the same basic layout. A non-NFC version of this patch was previously submitted with r342218, but it caused errors with some TSan tests. This patch has no functional changes. The difference to the non-NFC patch is that there are no changes to rangelist dumping in this patch. Differential Revision: https://reviews.llvm.org/D53545 llvm-svn: 345546
* [llvm-objcopy] Move elf-specific code into subfolderAlexander Shaposhnikov2018-10-296-472/+540
| | | | | | | | | | | In this diff the elf-specific code is moved into the subfolder ELF (and factored out from llvm-objcopy.cpp). Test plan: make check-all Differential revision: https://reviews.llvm.org/D53790 llvm-svn: 345544
* [llvm-objdump] Don't crash when using `-a` on non-archivesJames Henderson2018-10-291-4/+4
| | | | | | | | | | | | | This fixes PR39402. The crash was caused when dereferencing nullptr in DumpObject and printArchiveChild. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D53690 Patch by Xing GUO llvm-svn: 345503
* [llvm-mca] Lower to mca::Instructon before the pipeline is run.Andrea Di Biagio2018-10-297-59/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, the lowering of instructions from llvm::MCInst to mca::Instruction was done as part of the first stage of the pipeline (i.e. the FetchStage). In particular, FetchStage was responsible for picking the next instruction from the source sequence, and lower it to an mca::Instruction with the help of an object of class InstrBuilder. The dependency on InstrBuilder was problematic for a number of reasons. Class InstrBuilder only knows how to lower from llvm::MCInst to mca::Instruction. That means, it is hard to support a different scenario where instructions in input are not instances of class llvm::MCInst. Even if we managed to specialize InstrBuilder, and generalize most of its internal logic, the dependency on InstrBuilder in FetchStage would have caused more troubles (other than complicating the pipeline logic). With this patch, the lowering step is done before the pipeline is run. The pipeline is no longer responsible for lowering from MCInst to mca::Instruction. As a consequence of this, the FetchStage no longer needs to interact with an InstrBuilder. The mca::SourceMgr class now simply wraps a reference to a sequence of mca::Instruction objects. This simplifies the logic of FetchStage, and increases the usability of it. As a result, on a debug build, we see a 7-9% speedup; on a release build, the speedup is around 3-4%. llvm-svn: 345500
* [llvm-objdump] Add '--full-contents' as alias for '-s'James Henderson2018-10-291-1/+5
| | | | | | | | | | | | This fixes PR39404. Reviewed By: jhenderson Patch by Xing Guo Differential Revision: https://reviews.llvm.org/D53576 llvm-svn: 345495
* [llvm-exegesis] Fix SNB counter definition and handling.Clement Courbet2018-10-281-3/+4
| | | | | | | | | | | | Summary: SNB is the only one that has P23 as a single proc res. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D53766 llvm-svn: 345480
* [llvm-readobj] Fix bugs with unrecognized types in switch statementsRyan Prichard2018-10-261-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add missing breaks. Several functions used nested switch statements, where the outer switch branches based on the architecture, and the inner switch handles architecture-specific types. If the type isn't architecture-specific, break out to the generic types rather than fall through. getElfPtType: For GNU-style output, llvm-readobj prints "<unknown>: 0xnnnnnnnn" for an unrecognized segment type, unless the architecture is EM_ARM, EM_MIPS, or EM_MIPS_RS3_LE, in which case it prints "". This behavior appears accidental, so instead, always print the "<unknown>: 0xnnnnnnnn" string. Reviewers: pcc, grimar Reviewed By: grimar Subscribers: sdardis, javed.absar, arichardson, kristof.beyls, atanasyan, llvm-commits Differential Revision: https://reviews.llvm.org/D53730 llvm-svn: 345436
* [llvm-ar] Strip trailing \r and formatFangrui Song2018-10-261-1018/+1046
| | | | | | | | | | | | Reviewers: mstorsjo, rupprecht, gbreynoo Reviewed By: rupprecht Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53769 llvm-svn: 345410
* [llvm-ar] Add a dependency to BinaryFormat after rL345383Fangrui Song2018-10-261-0/+1
| | | | llvm-svn: 345405
* [llvm-ar] Access ADDLIB in llvm-ar via command lineOwen Reynolds2018-10-261-979/+1018
| | | | | | | | | | ADDLIB is called to add the contents of an archive to another archive. Previously this was only accessible through the use of an MRI script. With the use of a new "L" modifier, archive files can treated in the manner above when using quick append. llvm-svn: 345383
* [llvm-mca] Fix -wreorder and -Wunused-private-field after r345376. NFCSam McCall2018-10-262-4/+2
| | | | llvm-svn: 345378
* [llvm-mca] Removed dependency on mca::SourcMgr in some Views. NFCAndrea Di Biagio2018-10-269-44/+61
| | | | llvm-svn: 345376
* [llvm-nm] Simplify. NFCFangrui Song2018-10-261-14/+7
| | | | | | | | Change a \t to spaces Change some zero-filling memcpy to aggregate initialization Delete redundant ArchiveName.clear() after declaration llvm-svn: 345367
* Dump public symbol records in pdb2yaml modeZachary Turner2018-10-266-0/+61
| | | | llvm-svn: 345348
* [llvm-mca] Introduce a new base class for mca::Instruction, and change how ↵Andrea Di Biagio2018-10-255-79/+84
| | | | | | | | | | | | | | | | | | | | | read/write information is stored. This patch introduces a new base class for Instruction named InstructionBase. Class InstructionBase is responsible for tracking data dependencies with the help of ReadState and WriteState objects. Class Instruction now derives from InstructionBase, and adds extra information related to the `InstrStage` as well as the `RCUTokenID`. ReadState and WriteState objects are no longer unique pointers. This avoids extra heap allocation and pointer checks that weren't really needed. Now, those objects are simply stored into SmallVectors. We use a SmallVector instead of a std::vector because we expect most instructions to only have a very small number of reads and writes. By using a simple SmallVector we also avoid extra heap allocations most of the time. In a debug build, this improves the performance of llvm-mca by roughly 10% (I still have to verify the impact in performance on a release build). llvm-svn: 345280
* [llvm-mca] Removed a couple of redundant method declarations, and simplified ↵Andrea Di Biagio2018-10-257-38/+23
| | | | | | code in ResourcePressureView. NFC llvm-svn: 345259
OpenPOWER on IntegriCloud