1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
llvm-mirror/test/Transforms/LoopDistribute
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
..
basic-with-memchecks.ll
basic.ll
bounds-expansion-bug.ll
crash-in-memcheck-generation.ll
diagnostics-with-hotness-lazy-BFI.ll [OptRemark,LDist] RFC: Add hotness attribute 2016-07-15 17:23:20 +00:00
diagnostics-with-hotness.ll [OptRemark,LDist] RFC: Add hotness attribute 2016-07-15 17:23:20 +00:00
diagnostics.ll [LoopDist] Fix typo in diagnostic 2016-07-14 22:33:46 +00:00
metadata.ll
no-if-convert.ll
outside-use.ll
pr28443.ll [LoopAccessAnalysis] Fix an integer overflow 2016-07-07 06:24:36 +00:00
program-order.ll
symbolic-stride.ll [LAA] Enable symbolic stride speculation for all LAA clients 2016-06-17 22:35:41 +00:00
unknown-bounds-for-memchecks.ll