summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-exegesis] Revert accidentally commited code.Clement Courbet2018-05-141-1/+1
| | | | llvm-svn: 332231
* [llvm-exegesis] Fix a warning in r332221Clement Courbet2018-05-141-1/+1
| | | | | | | | | comparison of integers of different signs: 'const unsigned long' and 'const int' [-Werror,-Wsign-compare] unittests/tools/llvm-exegesis/BenchmarkResultTest.cpp:60:5: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<unsigned long, int>' requested here ASSERT_EQ(FromDiskVector.size(), 1); llvm-svn: 332230
* [llvm-exegesis] Allow lists of BenchmarkResults to be parsed as ↵Clement Courbet2018-05-141-0/+13
| | | | | | std::vector<BenchmarkResult>. llvm-svn: 332221
* Make CMakeLists.txt formatting more consistent with the rest of LLVM.Nico Weber2018-05-091-1/+2
| | | | llvm-svn: 331837
* Re-land r331622 "[llvm-exegesis] Add a library to cluster benchmark results."Clement Courbet2018-05-072-0/+87
| | | | | | Add missing move. llvm-svn: 331624
* Revert r331622 "[llvm-exegesis] Add a library to cluster benchmark results."Clement Courbet2018-05-072-87/+0
| | | | | | Breaks build over llvm::Error copy construction. llvm-svn: 331623
* [llvm-exegesis] Add a library to cluster benchmark results.Clement Courbet2018-05-072-0/+87
| | | | | | | | | | Reviewers: gchatelet Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D46432 llvm-svn: 331622
* Revert r330027: "[llvm-exegesis] re-enable failing tests after r330026."Clement Courbet2018-04-131-4/+4
| | | | | | The tests are still failing on some bots. llvm-svn: 330033
* [llvm-exegesis] re-enable failing tests after r330026.Clement Courbet2018-04-131-4/+4
| | | | llvm-svn: 330027
* [llvm-exegesis][NFC] Add more logging in case target creation fails.Clement Courbet2018-04-131-3/+5
| | | | llvm-svn: 330020
* [llvm-exegesis] Create test files in temporary directory.Clement Courbet2018-04-131-1/+6
| | | | | | Currently the test fails in sandboxed environnements. llvm-svn: 330015
* Partially revert r330008.Clement Courbet2018-04-131-4/+4
| | | | llvm-svn: 330010
* [llvm-exegesis] Run unit tests on more platforms.Clement Courbet2018-04-135-21/+63
| | | | | | | | | | | | | | | Summary: - Target-independent tests are run all the time. - Tests that codegen X86 code are run when X86 is in build targets. - Tests that run X86 jitted code are run only on X86 hosts. Reviewers: gchatelet Subscribers: mgorny, llvm-commits, tschuett Differential Revision: https://reviews.llvm.org/D45614 llvm-svn: 330008
* [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
* llvm-exegesis: Fix unittests include dirs when llvm is a part of another projectKonstantin Zhuravlyov2018-04-051-3/+3
| | | | | | | | | | When llvm is a part of another project (i.e. opencl), CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR are pointing to the parent project, which lead to build failures. Differential Revision: https://reviews.llvm.org/D45328 llvm-svn: 329325
* [llvm-exegesis] Temporarily disable a few tests.Clement Courbet2018-04-042-7/+7
| | | | | | | | These are failing on clang-ppc64le-linux-lnt, though the subdirectory is not even supposed to be built in CMakeLists. Disable the tests until we understand what's going on. llvm-svn: 329200
* [llvm-exegesis] Temporarily disable some tests.Clement Courbet2018-04-041-4/+6
| | | | | | | The tests fail on clang-x86-windows-msvc2015: unknown file: error: SEH exception with code 0x3221225477 thrown in the test body. llvm-svn: 329195
* [llvm-exegesis] Only run unit tests on x86_64 hosts.Clement Courbet2018-04-041-3/+5
| | | | llvm-svn: 329193
* [llvm-exegesis][NFC] Fix a few warnings.Clement Courbet2018-04-041-1/+1
| | | | llvm-svn: 329174
* [llvm-exegesis] Fix build when libpfm is not available.Clement Courbet2018-04-041-1/+1
| | | | llvm-svn: 329172
* Re-land r329156 "Add llvm-exegesis tool."Clement Courbet2018-04-047-1/+587
| | | | | | Fixed to depend on and initialize the native target instead of X86. llvm-svn: 329169
* Revert r329156 "Add llvm-exegesis tool."Clement Courbet2018-04-047-594/+1
| | | | | | Breaks a bunch of bots. llvm-svn: 329157
* Add llvm-exegesis tool.Clement Courbet2018-04-047-1/+594
| | | | | | | | | | | | | | | | | Summary: [llvm-exegesis][RFC] Automatic Measurement of Instruction Latency/Uops This is the code corresponding to the RFC "llvm-exegesis Automatic Measurement of Instruction Latency/Uops". The RFC is available on the LLVM mailing lists as well as the following document for easier reading: https://docs.google.com/document/d/1QidaJMJUyQdRrFKD66vE1_N55whe0coQ3h1GpFzz27M/edit?usp=sharing Subscribers: mgorny, gchatelet, orwant, llvm-commits Differential Revision: https://reviews.llvm.org/D44519 llvm-svn: 329156
* [CMake] Use PRIVATE in target_link_libraries for executablesShoaib Meenai2017-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently use target_link_libraries without an explicit scope specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables. Dependencies added in this way apply to both the target and its dependencies, i.e. they become part of the executable's link interface and are transitive. Transitive dependencies generally don't make sense for executables, since you wouldn't normally be linking against an executable. This also causes issues for generating install export files when using LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM library dependencies, which are currently added as interface dependencies. If clang is in the distribution components but the LLVM libraries it depends on aren't (which is a perfectly legitimate use case if the LLVM libraries are being built static and there are therefore no run-time dependencies on them), CMake will complain about the LLVM libraries not being in export set when attempting to generate the install export file for clang. This is reasonable behavior on CMake's part, and the right thing is for LLVM's build system to explicitly use PRIVATE dependencies for executables. Unfortunately, CMake doesn't allow you to mix and match the keyword and non-keyword target_link_libraries signatures for a single target; i.e., if a single call to target_link_libraries for a particular target uses one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must also be updated to use those keywords. This means we must do this change in a single shot. I also fully expect to have missed some instances; I tested by enabling all the projects in the monorepo (except dragonegg), and configuring both with and without shared libraries, on both Darwin and Linux, but I'm planning to rely on the buildbots for other configurations (since it should be pretty easy to fix those). Even after this change, we still have a lot of target_link_libraries calls that don't specify a scope keyword, mostly for shared libraries. I'm thinking about addressing those in a follow-up, but that's a separate change IMO. Differential Revision: https://reviews.llvm.org/D40823 llvm-svn: 319840
* [cfi-verify] Validate there are no register clobbers between CFI-check and ↵Mitch Phillips2017-11-151-0/+66
| | | | | | | | | | | | | | | | | | | instruction execution. Summary: This patch adds another failure mode for `validateCFIProtection(..)`, wherein any register that affects the indirect control flow instruction is clobbered to between the CFI-check and the instruction's execution. Also includes a modification to make MCInstrDesc::hasDefOfPhysReg public. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Subscribers: llvm-commits, pcc, kcc Differential Revision: https://reviews.llvm.org/D39820 llvm-svn: 318238
* [cfi-verify] Made FileAnalysis operate on a GraphResult rather than build ↵Mitch Phillips2017-11-101-17/+51
| | | | | | | | | | | | | | | | one and validate it. Refactors the behaviour of building graphs out of FileAnalysis, allowing for analysis of the GraphResult by the callee without having to rebuild the graph. Means when we want to analyse the constructed graph (planned for later revisions), we don't do repeated work. Also makes CFI verification in FileAnalysis now return an enum that allows us to differentiate why something failed, not just that it did/didn't fail. Reviewers: vlad.tsyrklevich Subscribers: kcc, pcc, llvm-commits Differential Revision: https://reviews.llvm.org/D39764 llvm-svn: 317927
* [cfi-verify] Add blacklist parsing for result filtering.Mitch Phillips2017-11-033-0/+3
| | | | | | | | | | | | | | | | | | | | | Adds blacklist parsing behaviour for filtering results into four categories: - Expected Protected: Things that are not in the blacklist and are protected. - Unexpected Protected: Things that are in the blacklist and are protected. - Expected Unprotected: Things that are in the blacklist and are unprotected. - Unexpected Unprotected: Things that are not in the blacklist and are unprotected. now can optionally be invoked with a second command line argument, which specifies the blacklist file that the binary was built with. Current statistics for chromium: Reviewers: vlad.tsyrklevich Subscribers: mgorny, llvm-commits, pcc, kcc Differential Revision: https://reviews.llvm.org/D39525 llvm-svn: 317364
* [cfi-verify] Add an interesting unit test where undef search length changes ↵Mitch Phillips2017-11-031-0/+53
| | | | | | | | | | | | | | result. Add an interesting unit test, found by changing --search-length-undef from the default. Program handles it correctly but good for ensuring correctness on further changes :) Reviewers: pcc Subscribers: mgorny, llvm-commits, kcc, vlad.tsyrklevich Differential Revision: https://reviews.llvm.org/D38658 llvm-svn: 317355
* Add FileVerifier::isCFIProtected().Mitch Phillips2017-10-251-0/+172
| | | | | | | | | | | | Add a CFI protection check that is implemented by building a graph and inspecting the output to deduce if the indirect CF instruction is CFI protected. Also added the output of this instruction to printIndirectInstructions(). Reviewers: vlad.tsyrklevich Subscribers: llvm-commits, kcc, pcc, mgorny Differential Revision: https://reviews.llvm.org/D38428 llvm-svn: 316610
* Fix LLVM_LINK_LLVM_DYLIB=On build of llvm-cfi-verifySam Clegg2017-10-241-1/+0
| | | | | | | | Subscribers: mgorny, aheejin Differential Revision: https://reviews.llvm.org/D39250 llvm-svn: 316493
* Restore the fix rL316059 eliminated by rL316372Serguei Katkov2017-10-241-0/+1
| | | | | | | | | rL316059 fixed the potential build failure when compiling with -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON. rL316372 just reverted the part of the fix, so restore it. llvm-svn: 316422
* Made llvm-cfi-verify not execute unit tests on non-x86 builds.Mitch Phillips2017-10-233-10/+59
| | | | | | | | | | | | | | Patched out from D38427. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Subscribers: llvm-commits, kcc, pcc, mgorny Differential Revision: https://reviews.llvm.org/D39197 llvm-svn: 316375
* Graph builder implementation.Mitch Phillips2017-10-232-2/+555
| | | | | | | | | | | | | | | | | | Implement a localised graph builder for indirect control flow instructions. Main interface is through GraphBuilder::buildFlowGraph, which will build a flow graph around an indirect CF instruction. Various modifications to FileVerifier are also made to const-expose some members needed for machine code analysis done by the graph builder. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Subscribers: llvm-commits, kcc, pcc Differential Revision: https://reviews.llvm.org/D38427 llvm-svn: 316372
* Accidently merged an incomplete upstream patch in ↵Mitch Phillips2017-10-231-3/+2
| | | | | | 10e6ee563a6b5ca498f27972ca6dbe6c308f1ac2 - reverting the changes. llvm-svn: 316359
* Patch inMitch Phillips2017-10-231-2/+3
| | | | llvm-svn: 316358
* Statically link llvm-cfi-verify's libraries.Vlad Tsyrklevich2017-10-181-1/+1
| | | | | | | | | | | | | | | | | | | Summary: llvm-cfi-verify (D38379) introduced a potential build failure when compiling with `-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON`. Specific versions of cmake seem to treat the `add_subdirectory()` rule differently. It seems as if old versions of cmake BFS these rules, adding them to the fringe for expansion later. Newer versions of cmake seem to immediately execute CMakeFiles that are present in this subdirectory. If the subdirectory is expanded through the fringe, the globbing resultant from `llvm_add_implicit_projects()` from `cmake/modules/AddLLVM.cmake:1012` means that `tools/llvm-shlib/CMakeFile.txt` gets executed before `tools/llvm-cfi-verify/lib/CMakeFile.txt`. As the latter CMakeFile adds a new library, this expansion order means that the library files required the unit tests in `unittests/tools/llvm-cfi-verify/` are not present in the dynamic library. This causes unit tests to fail as the required functions can't be found. This change now ensures that the libraries created by `llvm-cfi-verify` are statically linked into the unit tests. As `tools/llvm-cfi-verify/lib` no longer adds anything to `llvm-shlib`, there should be no concern about the order-of-compilation. Reviewers: skatkov, pcc Reviewed By: skatkov, pcc Subscribers: llvm-commits, kcc, pcc, aheejin, vlad.tsyrklevich, mgorny Differential Revision: https://reviews.llvm.org/D39020 llvm-svn: 316059
* [unittests] Only build llvm-cfi-verify if X86 is in LLVM_TARGETS_TO_BUILDKrzysztof Parzyszek2017-10-151-1/+4
| | | | | | | The test requires a target for triple x86-64, and it fails in builds that do not have the X86 backend. llvm-svn: 315861
* [cfi-verify] Fix typo, actually check X86 targetVlad Tsyrklevich2017-10-121-1/+1
| | | | | | | The typo in r315556 disabled the cfi-verify unit tests from building unconditionally, have it correctly check for the X86 target. llvm-svn: 315581
* [cfi-verify] Fix unittest failures w/o x86 targetVlad Tsyrklevich2017-10-121-2/+5
| | | | | | | | The llvm-cfi-verify unit tests fail if LLVM is built without the X86 target, disable the unit tests from being built unless X86 is enabled for now. llvm-svn: 315556
* MC Helpers for llvm-cfi-verify.Vlad Tsyrklevich2017-10-111-0/+263
| | | | | | | | | | | | | | | Add instruction analysis and machinecode traversal helpers in preparation for control flow graph generation implementation. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Subscribers: mgorny, llvm-commits, pcc, kcc Differential Revision: https://reviews.llvm.org/D38424 llvm-svn: 315528
* Reland 'Classify llvm-cfi-verify.'Vlad Tsyrklevich2017-10-113-0/+232
Summary: Move llvm-cfi-verify into a class in preparation for CFI analysis to come. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Subscribers: mgorny, llvm-commits, pcc, kcc Differential Revision: https://reviews.llvm.org/D38379 llvm-svn: 315504
OpenPOWER on IntegriCloud