summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
* Rename *CommandFlags.def to *CommandFlags.incDavid Blaikie2018-04-1113-13/+13
| | | | | | | | These aren't the .def style files used in LLVM that require a macro defined before their inclusion - they're just basic non-modular includes to stamp out command line flag variables. llvm-svn: 329840
* [llvm-mca] Let the Scheduler notify dispatch stall events caused by the lack ↵Andrea Di Biagio2018-04-114-70/+25
| | | | | | | | | | | | | | | | | | | of scheduling resources. This patch moves part of the logic that notifies dispatch stall events from the DispatchUnit to the Scheduler. The main goal of this patch is to remove (yet another) dependency between the DispatchUnit and the Scheduler. Before this patch, the DispatchUnit had to know about `Scheduler::Event` and how to classify stalls due to the lack of scheduling resources. This patch removes that knowledge and simplifies the logic in DispatchUnit::checkScheduler. This is another change done in preparation for the work to fix PR36663. No functional change intended. llvm-svn: 329835
* Revert "[llvm-mca][CMake] Remove unused libraries from set LLVM_LINK_COMPONENTS"Andrea Di Biagio2018-04-111-0/+6
| | | | | | It caused a buildbot failure (clang-ppc64le-linux-multistage - build #6424) llvm-svn: 329812
* [llvm-mca][CMake] Remove unused libraries from set LLVM_LINK_COMPONENTS.Andrea Di Biagio2018-04-111-6/+0
| | | | llvm-svn: 329807
* [llvm-mca] Minor code cleanup. NFCAndrea Di Biagio2018-04-115-26/+19
| | | | llvm-svn: 329796
* [llvm-mca] Renamed BackendStatistics to RetireControlUnitStatistics.Andrea Di Biagio2018-04-114-26/+26
| | | | | | Also, removed flag -verbose in favor of flag -retire-stats. llvm-svn: 329794
* [llvm-mca] Move the logic that prints scheduler statistics from ↵Andrea Di Biagio2018-04-116-124/+203
| | | | | | | | BackendStatistics to its own view. Added flag -scheduler-stats to print scheduler related statistics. llvm-svn: 329792
* [llvm-exegesis] Add a flag to disable libpfm even if present.Clement Courbet2018-04-111-2/+1
| | | | | | | | | | | | Summary: Fixes PR37053. Reviewers: uabelho, gchatelet Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D45436 llvm-svn: 329781
* Use contains_lower() instead of find_lower() != StringRef::npos. NFC.Rui Ueyama2018-04-101-6/+6
| | | | llvm-svn: 329767
* [llvm-mca] Simplify code. NFCAndrea Di Biagio2018-04-101-30/+18
| | | | llvm-svn: 329711
* [llvm-mca] Move the logic that prints dispatch unit statistics from ↵Andrea Di Biagio2018-04-106-81/+170
| | | | | | | | | | | BackendStatistics to its own view. This patch moves the logic that collects and analyzes dispatch events to the DispatchStatistics view. Added flag -dispatch-stats to print statistics related to the dispatch logic. llvm-svn: 329708
* [pdbutil] Print the checksum hex string when using the '-lines' optionAaron Smith2018-04-101-0/+6
| | | | llvm-svn: 329707
* [llvm-mca] Increase the default number of iterations to 100.Andrea Di Biagio2018-04-102-2/+2
| | | | llvm-svn: 329694
* Reapply "[llvm-mca] Do not separate iterations with a newline in the ↵Andrea Di Biagio2018-04-102-23/+17
| | | | | | | | timeline view." This reapplies r329403 with a fix for the floating point rounding issue. llvm-svn: 329680
* [MC][TableGen] Add optional libpfm counter names for ProcResUnits.Clement Courbet2018-04-102-47/+15
| | | | | | | | | | | | | | | | Summary: Subtargets can define the libpfm counter names that can be used to measure cycles and uops issued on ProcResUnits. This allows making llvm-exegesis available on more targets. Fixes PR36984. Reviewers: gchatelet, RKSimon, andreadb, craig.topper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45360 llvm-svn: 329675
* [llvm-ar] Fix lib.exe detection when running within MSVC toolchainAlexandre Ganea2018-04-101-6/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D44808 llvm-svn: 329658
* Fix line endings (CR/LF -> LF) introduced by rL329613Alexandre Ganea2018-04-101-556/+556
| | | | | reviewer: zturner llvm-svn: 329646
* [Debuginfo][COFF] Minimal serialization support for precompiled types recordsAlexandre Ganea2018-04-094-544/+567
| | | | | | | | | | | | | This change adds support for the LF_PRECOMP and LF_ENDPRECOMP records required to read/write Microsoft precompiled types .objs. See https://en.wikipedia.org/wiki/Precompiled_header#Microsoft_Visual_C_and_C++ This also adds handling for the .debug$P section, which is actually a .debug$T section in disguise, found only in precompiled .objs. Differential Revision: https://reviews.llvm.org/D45283 llvm-svn: 329613
* [llvm-mca] Fix MCACommentConsumerFangrui Song2018-04-091-1/+1
| | | | llvm-svn: 329592
* [llvm-mca] Add the ability to mark regions of code for analysis (PR36875)Andrea Di Biagio2018-04-095-46/+306
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch teaches llvm-mca how to parse code comments in search for special "markers" used to select regions of code. Example: # LLVM-MCA-BEGIN My Code Region .... # LLVM-MCA-END The MCAsmLexer now delegates to an object of class MCACommentParser (i.e. an AsmCommentConsumer) the parsing of code comments to search for begin/end code region markers. A comment starting with substring "LLVM-MCA-BEGIN" marks the beginning of a new region of code. A comment starting with substring "LLVM-MCA-END" marks the end of the last region. This implementation doesn't allow regions to overlap. Each region can have a optional description; internally, each region is identified by a range of source code locations (SMLoc). MCInst objects are added to a region R only if the source location for the MCInst is in the range of locations specified by R. By default, the tool allocates an implicit "Default" code region which contains every source location. See new tests llvm-mca-marker-*.s for a few examples. A new Backend object is created for every region. So, the analysis is conducted on every parsed code region. The final report is the union of the reports generated for every code region. Note that empty regions are skipped. Special "[#] Code Region - ..." strings are used in the report to mark the portion which is specific to a code region only. For example, see llvm-mca-markers-5.s. Differential Revision: https://reviews.llvm.org/D45433 llvm-svn: 329590
* [llvm-cov] Implement -ignore-filename-regex= option for excluding source files.Max Moroz2018-04-098-16/+63
| | | | | | | | | | | | | | | | | | | Summary: The option is helpful for large projects where it's not feasible to specify sources which user would like to see in the report. Instead, it allows to black-list specific sources via regular expressions (e.g. now it's possible to skip all files that have "test" in its name). This also partially fixes https://bugs.llvm.org/show_bug.cgi?id=34277 Reviewers: vsk, morehouse, liaoyuke Reviewed By: vsk Subscribers: kcc, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D43907 llvm-svn: 329581
* Revert r329403 "[llvm-mca] Do not separate iterations with a newline in the ↵Hans Wennborg2018-04-091-1/+1
| | | | | | | | | | | | timeline view." This made AArch64/CortexA57/direct-branch.s fail on Windows, e.g. http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/11251 > Also, update a few tests to minimize the diff in D45369. > No functional change intended. llvm-svn: 329569
* [dsymutil] Remove trailing colon. NFCJonas Devlieghere2018-04-091-2/+2
| | | | llvm-svn: 329554
* [dsymutil] Don't try to load Swift ASTs as objects.Jonas Devlieghere2018-04-091-0/+5
| | | | | | | | | | | | | | | | With the threading refactoring, loading of object files happens before checking whether we're dealing with a swift AST. While that's not an issue per se, it causes a warning to be printed: warning: /path/to/a.swiftmodule: The file was not recognized as a valid object file note: while processing /path/to/a.swiftmodule This suppresses the warning by checking for a Swift AST before attempting to load is as an object file. rdar://39240444 llvm-svn: 329553
* [dsymutil] Don't crash on empty CUJonas Devlieghere2018-04-081-1/+15
| | | | | | Add some additional checks so we don't crash on empty compile units. llvm-svn: 329537
* [llvm-mca] Simplify code. NFCAndrea Di Biagio2018-04-081-33/+26
| | | | llvm-svn: 329532
* [llvm-exegesis] Fix unused return value warning and add a useful error ↵Simon Pilgrim2018-04-071-1/+3
| | | | | | message for event counter reads. llvm-svn: 329496
* [LLVM-C] Move DIBuilder Bindings For Block ScopesRobert Widmann2018-04-071-0/+28
| | | | | | | | | | | | | | Summary: Move LLVMDIBuilderCreateFunction , LLVMDIBuilderCreateLexicalBlock, and LLVMDIBuilderCreateLexicalBlockFile from Go to LLVM-C. Reviewers: whitequark, harlanhaskins, deadalnix Reviewed By: whitequark, harlanhaskins Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45352 llvm-svn: 329488
* Revert r324557, "gold-plugin: Do not set codegen opt level based on LTO opt ↵Peter Collingbourne2018-04-061-0/+15
| | | | | | | | | | | | | level." It was reported that this change measurably regressed -plugin-opt=O3 performance. There is an ongoing discussion on llvm-dev about the correct way to set the CG opt level, see thread "[llvm-dev] [RFC] Adding function attributes to represent codegen optimization level". llvm-svn: 329458
* [llvm-mca] Do not separate iterations with a newline in the timeline view.Andrea Di Biagio2018-04-061-1/+1
| | | | | | | Also, update a few tests to minimize the diff in D45369. No functional change intended. llvm-svn: 329403
* [LLVM-C] Audit Inline Assembly APIs for ConsistencyRobert Widmann2018-04-061-0/+4
| | | | | | | | | | | | | | | | | | Summary: - Add a missing getter for module-level inline assembly - Add a missing append function for module-level inline assembly - Deprecate LLVMSetModuleInlineAsm and replace it with LLVMSetModuleInlineAsm2 which takes an explicit length parameter - Deprecate LLVMConstInlineAsm and replace it with LLVMGetInlineAsm, a function that allows passing a dialect and is not mis-classified as a constant operation Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45346 llvm-svn: 329369
* [llvm-cov] Prevent llvm-cov from hanging when a symblink doesn't exist.Max Moroz2018-04-051-4/+8
| | | | | | | | | | | | | | | | | | | | Summary: Previous code hangs indefinitely when trying to iterate through a symbol link file that points to an non-exist directory. This change fixes the bug to make the addCollectedPath function exit ealier and print out correct warning messages. Patch by Yuke Liao (@liaoyuke). Reviewers: Dor1s, vsk Reviewed By: vsk Subscribers: bruno, mgrang, llvm-commits Differential Revision: https://reviews.llvm.org/D44960 llvm-svn: 329338
* [llvm-pdbutil] Display types from MSVC precompiled header object files.Zachary Turner2018-04-052-2/+11
| | | | | | | | These appear in a .debug$P section, which is exactly the same in format as a .debug$T section. So we shouldn't ignore these when dumping types. llvm-svn: 329326
* [documentation][llvm-mca] Update the documentation.Andrea Di Biagio2018-04-051-34/+14
| | | | | | | Scheduling models can now describe processor register files and retire control units. This updates the existing documentation and the README file. llvm-svn: 329311
* [MC][Tablegen] Allow models to describe the retire control unit for llvm-mca. Andrea Di Biagio2018-04-053-17/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the ability to describe properties of the hardware retire control unit. Tablegen class RetireControlUnit has been added for this purpose (see TargetSchedule.td). A RetireControlUnit specifies the size of the reorder buffer, as well as the maximum number of opcodes that can be retired every cycle. A zero (or negative) value for the reorder buffer size means: "the size is unknown". If the size is unknown, then llvm-mca defaults it to the value of field SchedMachineModel::MicroOpBufferSize. A zero or negative number of opcodes retired per cycle means: "there is no restriction on the number of instructions that can be retired every cycle". Models can optionally specify an instance of RetireControlUnit. There can only be up-to one RetireControlUnit definition per scheduling model. Information related to the RCU (RetireControlUnit) is stored in (two new fields of) MCExtraProcessorInfo. llvm-mca loads that information when it initializes the DispatchUnit / RetireControlUnit (see Dispatch.h/Dispatch.cpp). This patch fixes PR36661. Differential Revision: https://reviews.llvm.org/D45259 llvm-svn: 329304
* Re-land r329273: [Plugins] Add a slim plugin API to work together with the ↵Philip Pfaffe2018-04-051-0/+17
| | | | | | | | | new PM Fix unittest: Do not link LLVM into the test plugin. Additionally, remove an unrelated change that slipped in in r329273. llvm-svn: 329293
* Revert "[Plugins] Add a slim plugin API to work together with the new PM"Philip Pfaffe2018-04-051-17/+0
| | | | | | This reverts commit ecf3ba1ab45edb1b0fadce716a7facf50dca4fbb/r329273. llvm-svn: 329276
* [llvm-mca] Remove flag -max-retire-per-cycle, and update the docs.Andrea Di Biagio2018-04-053-16/+10
| | | | | | | | This is done in preparation for D45259. With D45259, models can specify the size of the reorder buffer, and the retire throughput directly via tablegen. llvm-svn: 329274
* [Plugins] Add a slim plugin API to work together with the new PMPhilip Pfaffe2018-04-051-0/+17
| | | | | | | | | | | | | | | | | | | | | | Summary: Add a new plugin API. This closes the gap between pass registration and out-of-tree passes for the new PassManager. Unlike with the existing API, interaction with a plugin is always initiated from the tools perspective. I.e., when a plugin is loaded, it resolves and calls a well-known symbol `llvmGetPassPluginInfo` to obtain details about the plugin. The fundamental motivation is to get rid of as many global constructors as possible. The API exposed by the plugin info is kept intentionally minimal. Reviewers: chandlerc Reviewed By: chandlerc Subscribers: bollu, grosser, lksbhm, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D35258 llvm-svn: 329273
* [llvm-exegesis] Suppress a warning.Clement Courbet2018-04-051-1/+2
| | | | llvm-svn: 329257
* [gold] Add debug-pass-manager option, and use it to test new-pass-managerTeresa Johnson2018-04-051-0/+6
| | | | | | | | | | | | Summary: Follow up from r314963. Reviewers: pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45293 llvm-svn: 329249
* Fix a compilation failure with non MSVC compilers.Zachary Turner2018-04-041-1/+1
| | | | llvm-svn: 329209
* [llvm-pdbutil] Add the ability to explain binary files.Zachary Turner2018-04-046-113/+220
| | | | | | | | | | Using this, you can use llvm-pdbutil to export the contents of a stream to a binary file, then run explain on the binary file so that it treats the offset as an offset into the stream instead of an offset into a file. This makes it easy to compare the contents of the same stream from two different files. llvm-svn: 329207
* [llvm-exegesis] Add missing link libraries.Clement Courbet2018-04-041-0/+3
| | | | llvm-svn: 329185
* [llvm-exegesis] Do not initialize FileDescriptor when libpfm is notClement Courbet2018-04-041-1/+1
| | | | | | available. llvm-svn: 329177
* [llvm-exegesis] Fix compilation on lld-x86_64-darwin13Clement Courbet2018-04-041-1/+1
| | | | | | | YAMLTraits does not know how to serialize `size_t` portably. Use `int` instead. llvm-svn: 329176
* [llvm-exegesis][NFC] Fix compilation warning.Clement Courbet2018-04-041-1/+4
| | | | llvm-svn: 329175
* [llvm-exegesis][NFC] Fix a few warnings.Clement Courbet2018-04-042-1/+4
| | | | llvm-svn: 329174
* [llvm-exegesis] Fix compilation on some clang versions.Clement Courbet2018-04-041-1/+1
| | | | | | default initialization of an object of const type 'const llvm::DebugLoc' requires a user-provided default constructor. llvm-svn: 329171
* Re-land r329156 "Add llvm-exegesis tool."Clement Courbet2018-04-0426-0/+2305
| | | | | | Fixed to depend on and initialize the native target instead of X86. llvm-svn: 329169
OpenPOWER on IntegriCloud