13 Commits

Author SHA1 Message Date
Andrea Di Biagio
8b5d01038b [llvm-mca] Removed an empty line generated by the timeline view. NFC.
Also, regenerate all tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332853 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-21 17:11:56 +00:00
Andrea Di Biagio
eebfacb84e [llvm-mca] use a formatted_raw_ostream to insert padding and get rid of tabs. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332381 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-15 18:11:45 +00:00
Andrea Di Biagio
3529d77f3f [llvm-mca] Strip leading tabs and spaces from instruction strings before printing. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332361 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-15 15:18:05 +00:00
Matt Davis
c9a31109e7 [llvm-mca] Avoid exposing index values in the MCA interfaces.
Summary:
This patch eliminates many places where we originally needed to  pass index
values to represent an instruction.  The index is still used as a key, in various parts of 
MCA.  I'm  not comfortable eliminating the index just yet.    By burying the index in
the instruction, we can avoid exposing that value in many places.

Eventually, we should consider removing the Instructions list in the Backend 
all together,   it's only used to hold and reclaim the memory for the allocated 
Instruction instances.  Instead we could pass around a smart pointer.  But that's
a separate discussion/patch.

Reviewers: andreadb, courbet, RKSimon

Reviewed By: andreadb

Subscribers: javed.absar, tschuett, gbedwell, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331660 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-07 18:29:15 +00:00
Matt Davis
5646bfe92b [llvm-mca] Add descriptive names for the TimelineView report characters. NFC.
Summary:
This change makes the TimelineView source simpler to read and easier to modify in the future.
This patch introduces a class of static chars used as the display values in the TimelineView report, this change just eliminates a few magic characters.

Reviewers: andreadb, courbet, RKSimon

Reviewed By: andreadb

Subscribers: tschuett, gbedwell, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331540 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-04 17:19:40 +00:00
Andrea Di Biagio
76013a8ce6 Reapply "[llvm-mca] Do not separate iterations with a newline in the timeline view."
This reapplies r329403 with a fix for the floating point rounding issue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329680 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-10 09:55:33 +00:00
Hans Wennborg
b715890035 Revert r329403 "[llvm-mca] Do not separate iterations with a newline in the timeline view."
This made AArch64/CortexA57/direct-branch.s fail on Windows, e.g.
http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/11251

> Also, update a few tests to minimize the diff in D45369.
> No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329569 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-09 13:53:41 +00:00
Andrea Di Biagio
05de7ec01b [llvm-mca] Do not separate iterations with a newline in the timeline view.
Also, update a few tests to minimize the diff in D45369.
No functional change intended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329403 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-06 15:30:02 +00:00
Andrea Di Biagio
add7b3e24e [llvm-mca] run clang-format on all files.
This also addresses Simon's review comment in D44839.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328428 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-24 16:05:36 +00:00
Andrea Di Biagio
280f00a153 [llvm-mca] Simplify code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328187 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-22 10:19:20 +00:00
Clement Courbet
641c297f4d [llvm-mca] Refactor event listeners to make the backend agnostic to event types.
Summary: This is a first step towards making the pipeline configurable.

Subscribers: llvm-commits, andreadb

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327389 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-13 13:11:01 +00:00
Andrea Di Biagio
163bd8a42d [llvm-mca] Run clang-format on the source code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327125 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-09 12:50:42 +00:00
Andrea Di Biagio
29b29cc6a9 [llvm-mca] LLVM Machine Code Analyzer.
llvm-mca is an LLVM based performance analysis tool that can be used to
statically measure the performance of code, and to help triage potential
problems with target scheduling models.

llvm-mca uses information which is already available in LLVM (e.g. scheduling
models) to statically measure the performance of machine code in a specific cpu.
Performance is measured in terms of throughput as well as processor resource
consumption. The tool currently works for processors with an out-of-order
backend, for which there is a scheduling model available in LLVM.

The main goal of this tool is not just to predict the performance of the code
when run on the target, but also help with diagnosing potential performance
issues.

Given an assembly code sequence, llvm-mca estimates the IPC (instructions per
cycle), as well as hardware resources pressure. The analysis and reporting style
were mostly inspired by the IACA tool from Intel.

This patch is related to the RFC on llvm-dev visible at this link:
http://lists.llvm.org/pipermail/llvm-dev/2018-March/121490.html

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326998 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-08 13:05:02 +00:00