1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/tools
Adam Nemet cb89dd6834 [OptRemark,LDist] RFC: Add hotness attribute
Summary:
This is the first set of changes implementing the RFC from
http://thread.gmane.org/gmane.comp.compilers.llvm.devel/98334

This is a cross-sectional patch; rather than implementing the hotness
attribute for all optimization remarks and all passes in a patch set, it
implements it for the 'missed-optimization' remark for Loop
Distribution.  My goal is to shake out the design issues before scaling
it up to other types and passes.

Hotness is computed as an integer as the multiplication of the block
frequency with the function entry count.  It's only printed in opt
currently since clang prints the diagnostic fields directly.  E.g.:

  remark: /tmp/t.c:3:3: loop not distributed: use -Rpass-analysis=loop-distribute for more info (hotness: 300)

A new API added is similar to emitOptimizationRemarkMissed.  The
difference is that it additionally takes a code region that the
diagnostic corresponds to.  From this, hotness is computed using BFI.
The new API is exposed via an analysis pass so that it can be made
dependent on LazyBFI.  (Thanks to Hal for the analysis pass idea.)

This feature can all be enabled by setDiagnosticHotnessRequested in the
LLVM context.  If this is off, LazyBFI is not calculated (D22141) so
there should be no overhead.

A new command-line option is added to turn this on in opt.

My plan is to switch all user of emitOptimizationRemark* to use this
module instead.

Reviewers: hfinkel

Subscribers: rcox2, mzolotukhin, llvm-commits

Differential Revision: http://reviews.llvm.org/D21771

llvm-svn: 275583
2016-07-15 17:23:20 +00:00
..
bugpoint [bugpoint] Delete a stale comment. 2016-06-29 03:02:01 +00:00
bugpoint-passes Remove autoconf support 2016-01-26 21:29:08 +00:00
dsymutil [Object] Re-apply r275316 now that I have the corresponding LLD patch ready. 2016-07-14 02:24:01 +00:00
gold [ThinLTO/gold] Perform index-based weak/linkonce resolution 2016-07-14 21:13:24 +00:00
llc [MIR] Print on the given output instead of stderr. 2016-07-13 20:36:03 +00:00
lli [cmake] Change lli-child-target to use add_llvm_utility instead of add_llvm_executable. 2016-07-10 02:43:50 +00:00
llvm-ar [Object] Re-apply r275316 now that I have the corresponding LLD patch ready. 2016-07-14 02:24:01 +00:00
llvm-as Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-as-fuzzer Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
llvm-bcanalyzer Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-c-test Add support for callsite in the new C API for attributes 2016-06-15 05:14:29 +00:00
llvm-config [build] Make sure to link main executable with pthreads 2016-06-21 19:34:40 +00:00
llvm-cov [llvm-cov] Improve error messages 2016-07-15 01:53:39 +00:00
llvm-cxxdump [Object] Re-apply r275316 now that I have the corresponding LLD patch ready. 2016-07-14 02:24:01 +00:00
llvm-diff [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
llvm-dis IR: Allow metadata attachments on declarations, and fix lazy loaded metadata issue with globals. 2016-06-21 23:42:48 +00:00
llvm-dwarfdump Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-dwp llvm-dwp: Ensure uncompressed sections are not relocated during processing of later inputs 2016-05-25 23:37:06 +00:00
llvm-extract Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-go Remove autoconf support 2016-01-26 21:29:08 +00:00
llvm-jitlistener Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-link Don't verify inputs to the Linker if ODR merging. 2016-06-29 18:31:48 +00:00
llvm-lto Move legacy LTO interface headers to legacy/ directory. 2016-07-14 21:21:16 +00:00
llvm-mc Provide support for preserving assembly comments 2016-07-11 12:42:14 +00:00
llvm-mc-fuzzer [llvm-mc-fuzzer] Use LLVMFuzzerInitialize() instead of a custom main() and FuzzerDriver() 2016-05-13 10:23:04 +00:00
llvm-mcmarkup Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-nm [Object] Re-apply r275316 now that I have the corresponding LLD patch ready. 2016-07-14 02:24:01 +00:00
llvm-objdump llvm-objdump: extend __mh_execute_header handling to other special syms 2016-07-14 23:13:03 +00:00
llvm-pdbdump Refactor the PDB writing to use a builder approach 2016-07-11 21:45:26 +00:00
llvm-profdata Apply another batch of fixes from clang-tidy's performance-unnecessary-value-param. 2016-06-17 20:41:14 +00:00
llvm-readobj [Object] Re-apply r275316 now that I have the corresponding LLD patch ready. 2016-07-14 02:24:01 +00:00
llvm-rtdyld Thread Expected<...> up from libObject’s getSymbolAddress() for symbols to allow 2016-06-24 18:24:42 +00:00
llvm-shlib Revert "[CMake] LINK_LIBS need to be public for Darwin dylib targets" 2016-05-26 04:35:35 +00:00
llvm-size [Object] Re-apply r275316 now that I have the corresponding LLD patch ready. 2016-07-14 02:24:01 +00:00
llvm-split Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
llvm-stress [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
llvm-symbolizer Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
lto Move legacy LTO interface headers to legacy/ directory. 2016-07-14 21:21:16 +00:00
msbuild
obj2yaml [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
opt [OptRemark,LDist] RFC: Add hotness attribute 2016-07-15 17:23:20 +00:00
sancov [Object] Re-apply r275316 now that I have the corresponding LLD patch ready. 2016-07-14 02:24:01 +00:00
sanstats [Symbolize] Check if the PE file has a PDB and emit an error if we can't load it 2016-06-03 20:25:09 +00:00
verify-uselistorder Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
xcode-toolchain [CMake] Cleanup uses of USES_TERMINAL 2016-06-08 22:19:25 +00:00
yaml2obj [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
CMakeLists.txt Fixup r271533, or check-clang didn't find llvm-lto as the target. 2016-06-02 20:39:24 +00:00
LLVMBuild.txt llvm-dwp: Initial layout 2015-12-01 00:48:34 +00:00