teak-llvm/llvm/docs/CommandGuide
Andrea Di Biagio c65901282b [llvm-mca] Add the ability to mark regions of code for analysis (PR36875)
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
2018-04-09 16:39:52 +00:00
..
bugpoint.rst
dsymutil.rst [dsymutil] Upstream emitting of papertrail warnings. 2018-04-02 10:40:43 +00:00
FileCheck.rst Add a -D flag to FileCheck to define variables 2017-11-07 13:24:44 +00:00
index.rst Re-land r329156 "Add llvm-exegesis tool." 2018-04-04 11:37:06 +00:00
lit.rst Revert "lit.py: Add new %{shared_output(LABEL)} substitution" 2017-10-14 04:01:27 +00:00
llc.rst [MC] Fix -stack-size-section on ARM 2018-01-17 09:01:29 +00:00
lli.rst [docs] Update code block for compatibility with Sphinx 1.5.1 2017-11-06 11:47:24 +00:00
llvm-ar.rst
llvm-as.rst
llvm-bcanalyzer.rst
llvm-build.rst
llvm-config.rst
llvm-cov.rst [llvm-cov] Implement -ignore-filename-regex= option for excluding source files. 2018-04-09 15:20:35 +00:00
llvm-diff.rst
llvm-dis.rst
llvm-dwarfdump.rst Remove duplicate option from documentation. 2017-12-09 19:09:59 +00:00
llvm-exegesis.rst Re-land r329156 "Add llvm-exegesis tool." 2018-04-04 11:37:06 +00:00
llvm-extract.rst
llvm-lib.rst
llvm-link.rst
llvm-mca.rst [llvm-mca] Add the ability to mark regions of code for analysis (PR36875) 2018-04-09 16:39:52 +00:00
llvm-nm.rst llvm-nm: Add support for symbol demangling (-C/--demangle) 2017-06-29 18:29:05 +00:00
llvm-pdbutil.rst [docs] Update code block for compatibility with Sphinx 1.5.1 2017-11-06 11:47:24 +00:00
llvm-profdata.rst [ProfileData] Add new option to dump topn hottest functions 2017-07-11 20:30:43 +00:00
llvm-readobj.rst
llvm-stress.rst
llvm-symbolizer.rst
opt.rst
tblgen.rst