1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/cmake/modules
Daniel Sanders 984a615c7c Re-commit: Make STATISTIC() values available programmatically
Summary:
It can be useful for tools to be able to retrieve the values of variables
declared via STATISTIC() directly without having to emit them and parse
them back. Use cases include:
* Needing to report specific statistics to a test harness
* Wanting to post-process statistics. For example, to produce a percentage of
  functions that were fully selected by GlobalISel

Make this possible by adding llvm::GetStatistics() which returns an
iterator_range that can be used to inspect the statistics that have been
touched during execution. When statistics are disabled (NDEBUG and not
LLVM_ENABLE_STATISTICS) this method will return an empty range.

This patch doesn't address the effect of multiple compilations within the same
process. In such situations, the statistics will be cumulative for all
compilations up to the GetStatistics() call.

Reviewers: qcolombet, rtereshin, aditya_nandakumar, bogner

Reviewed By: rtereshin, bogner

Subscribers: llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D43901

This re-commit fixes a missing include of <vector> which it seems clang didn't
mind but G++ and MSVC objected to. It seems that, clang was ok with std::vector
only being forward declared at the point of use since it was fully defined
eventually but G++/MSVC both rejected it at the point of use.

llvm-svn: 326738
2018-03-05 19:38:16 +00:00
..
AddLLVM.cmake [cmake] Use symlinks for Windows-hosted toolchains built on Unix 2018-01-09 07:50:18 +00:00
AddLLVMDefinitions.cmake cmake: Avoid leading space in LLVM_DEFINITIONS. 2015-10-12 10:42:03 +00:00
AddOCaml.cmake Move the srpm, ocaml_make_directory, llvm_vcsrevision_h, and llvm-headers projects into the Misc folder on IDEs like Visual Studio rather than leave them in the root directory. NFC. 2017-11-04 19:59:14 +00:00
AddSphinxTarget.cmake [cmake] Include project name in Sphinx doctree dir to fix race conditions 2017-11-30 19:09:22 +00:00
CheckAtomic.cmake [cmake] Always respect existing CMAKE_REQUIRED_FLAGS when adding additional ones. 2017-12-25 01:23:09 +00:00
CheckCompilerVersion.cmake [cmake] Always respect existing CMAKE_REQUIRED_FLAGS when adding additional ones. 2017-12-25 01:23:09 +00:00
CheckLinkerFlag.cmake [cmake] Make check_linker_flags operate via linker flags 2017-10-31 01:30:46 +00:00
ChooseMSVCCRT.cmake [CMake] Untabify. 2014-02-02 16:46:35 +00:00
CMakeLists.txt [llvm] Add stripped installation targets 2017-11-30 21:48:26 +00:00
CrossCompile.cmake [CMake] Support for cross-compilation when build runtimes 2018-01-08 23:50:59 +00:00
DetermineGCCCompatible.cmake CMake is funky on detecting Intel 17 as GCC compatible. 2017-01-26 23:50:18 +00:00
FindOCaml.cmake [OCaml] [cmake] Add CMake buildsystem for OCaml. 2014-12-01 19:50:23 +00:00
FindSphinx.cmake Add SPHINX_WARNINGS_AS_ERRORS CMake option to allow warnings to not be 2014-08-14 11:57:13 +00:00
GenerateVersionFromCVS.cmake Add SVN version to libLLVMLTO 2016-04-16 07:33:14 +00:00
GetHostTriple.cmake [cmake] Determine MSVC host triple correctly when cross-compiling 2017-12-13 21:11:14 +00:00
GetSVN.cmake [CMake] Update GetSVN.cmake to handle repo 2017-09-09 14:17:52 +00:00
HandleLLVMOptions.cmake Re-commit: Make STATISTIC() values available programmatically 2018-03-05 19:38:16 +00:00
HandleLLVMStdlib.cmake Remove LLVM_ENABLE_LIBCXXABI 2016-08-04 10:24:48 +00:00
LLVM-Config.cmake [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
LLVMConfig.cmake.in [cmake] Include LLVM_LIBXML2_ENABLED in LLVMConfig.cmake, PR36006 2018-01-19 17:47:03 +00:00
LLVMConfigVersion.cmake.in Teach LLVMConfigVersion.cmake to behave as find_package() expects. 2014-04-16 23:15:31 +00:00
LLVMExternalProjectUtils.cmake [cmake] Don't build Native llvm-config when cross compiling if passed by user. 2018-01-21 00:29:00 +00:00
LLVMInstallSymlink.cmake [cmake] Use symlinks for Windows-hosted toolchains built on Unix 2018-01-09 07:50:18 +00:00
LLVMProcessSources.cmake [CMake] Add LLVM_ENABLE_IDE option to better process sources for IDE's 2018-01-12 04:01:41 +00:00
TableGen.cmake [globalisel][tablegen] Generate rule coverage and use it to identify untested rules 2017-11-16 00:46:35 +00:00
VersionFromVCS.cmake CMake: Silence more stderr when running git. 2017-05-02 16:37:37 +00:00