7 Commits

Author SHA1 Message Date
Chandler Carruth
6b547686c5 Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-19 08:50:56 +00:00
Fangrui Song
467c30721b [llvm-mca] Move namespace mca inside llvm::
Summary: This allows to remove `using namespace llvm;` in those *.cpp files

When we want to revisit the decision (everything resides in llvm::mca::*) in the future, we can move things to a nested namespace of llvm::mca::, to conceptually make them separate from the rest of llvm::mca::*

Reviewers: andreadb, mattd

Reviewed By: andreadb

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345612 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-30 15:56:08 +00:00
Andrea Di Biagio
390074be65 [llvm-mca] Removed dependency on mca::SourcMgr in some Views. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345376 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-26 10:48:04 +00:00
Andrea Di Biagio
aa7c2d802d [llvm-mca] Removed a couple of redundant method declarations, and simplified code in ResourcePressureView. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345259 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-25 11:51:34 +00:00
Andrea Di Biagio
a9c48593d9 [llvm-mca] Refactor class SourceMgr. NFCI
Added begin()/end() methods to allow the usage of SourceMgr in foreach loops.
With this change, method getMCInstFromIndex() (as well as a couple of other
methods) are now redundant, and can be removed from the public interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345147 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-24 15:06:27 +00:00
Matt Davis
7aabb14503 [llvm-mca] Delay calculation of Cycles per Resources, separate the cycles and resource quantities.
Summary:
This patch removes the storing of accumulated floating point data 
within the llvm-mca library.

This patch splits-up the two quantities: cycles and number of resource units.
By splitting-up these two quantities, we delay the calculation of "cycles per resource unit"
until that value is read, reducing the chance of accumulating floating point error. 

I considered using the APFloat, but after measuring performance, for a large (many iteration)
sample, I decided to go with this faster solution.

Reviewers: andreadb, courbet, RKSimon

Reviewed By: andreadb

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341980 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-11 18:47:48 +00:00
Matt Davis
444bd8165f [llvm-mca] Move views and stats into a Views subdir. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340645 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-24 20:24:53 +00:00